What is a Relationship?

In relational database design, a relationship is where two or more tables are linked together because they contain related data. This enables users to run queries for related data across multiple tables.

Relationships are a key element in relational database design.

Here’s an example:

Diagram of one-to-many relationship
Example of one-to-many relationship.

In the above example, the City table has a relationship with the Customer table. Each customer is assigned a city. This is done by using a CityId field in the Customer table that matches a CityId in the City table.

While it’s certainly possible to store the full city name in the Customer table, it’s better to have a separate table that stores the city details. You can easily use a query to look up the CityName by using the CityId that’s stored for that customer.

Continue reading

What is an RDBMS?

RDBMS stands for Relational Database Management System.

An RDBMS is a particular type of DBMS that uses a relational model for its databases. An RDBMS therefore enables you to create relational databases.

Relational database management systems have become the most popular type of database system. Most major database management systems are relational. Popular examples include Microsoft Access, SQL Server, Oracle DatabaseMySQL, FileMaker, PostgreSQL, and more below.

Continue reading

How to Create a Database in MySQL Workbench using the GUI

To create a database in the MySQL Workbench GUI:

  1. Click the “new schema” button on the MySQL Workbench toolbar
  2. Enter a schema name (database name) and its default collation and click Apply
  3. Review the SQL statement and click Apply

The database will now be created, and a message will display advising that the script was successful.

Continue reading

How to Create a Table in MySQL Workbench using the GUI

To create a table in the MySQL Workbench GUI:

  1. Under the appropriate database in the left navigation pane, right-click Tables and select Create Table...
  2. Enter the table name, add all column names, their data type, constraints, default values, and any other details as required, then click Apply
  3. Review the SQL statement that will be run against the database and click Apply

The table will now be created, and a message will display advising that the script was successful.

Continue reading

How to Create a Table in SQL Server

To create a table in SQL Server using the GUI:

  1. Ensuring that the right database is expanded in Object Explorer, right click on the Tables icon and select Table... from the contextual menu
  2. A new table will open in Design view. Add the columns, their data types, and column properties.
  3. Save the table (either from the File menu, or by right-clicking on the table tab and selecting Save Table1)

The table will appear in the Object Explorer under the Tables icon for the applicable database.

Continue reading

How to Create a Table in Access

To create a table in Microsoft Access 2013 or 2016:

  1. Click CREATE from the Ribbon
  2. Click Table

Here’s what that button looks like on the Ribbon:

Screenshot of the CREATE tab of the Ribbon in Microsoft Access 2013
Clicking the “Table” icon from the “CREATE” tab creates a new table.

Those two steps create a blank table.

Once you’ve created your table, you will need to add fields (these will contain the data). You will also need to specify the type of data that the fields will contain (eg, text, number, date, etc).

You can also add extra rules about the type of data that can be entered into each field (eg, that phone numbers should be entered this way, dates should be entered that way, etc), as well as other properties for each field.

Continue reading

How to Create a Database in Access

In Microsoft Access 2013 & 2016, you can create a database straight from the Welcome screen or from the work area. You can create either a blank database, or a database from a template.

Create a Blank Database

From the Welcome Screen

When you first open Access, the Welcome screen is displayed. You can create your database straight from here.

  1. Click Blank desktop database
  2. Name the database at the prompt and click Create

Your new database will have one table called “Table1”. You can modify this table to your needs. You can also create new tables and other database objects.

Continue reading