Excel databases: Creating relational tables (2024)

Excel possesses formidable database powers. Creating a relational database starts with a Master table that links it to subordinates, called (awkwardly) Slave, Child, or Detail tables.

Before we dive in, we’ve provided you with a sample workbook you can use to follow along with our how-to and practice each step. Just click the arrow or link below to start the download.

download

This is a workbook with multiple spreadsheets whose content can be used to practice Excel tasks in relational databases, reports, and pivot tables. JD Sartain

How relational databases work

Excel’s organizational structure lends itself well to how databases work. A database is a collection of connected items (spreadsheet) that, when associated, creates a single record (row) inside a group of multiple records (table).

One spreadsheet, alone, is a database, but nota relational one. The relational database is a combination of the Master spreadsheet table and all of its Slave tables or spreadsheets.

For example, your driver’s license is a single record in a flat-file database that resides on a computer at the Department of Motor Vehicles (DMV). Your license contains your name, gender, height, weight, eyes and hair color, address, date of birth, license issue and expiration date, license class.

Because it’s possible to have multiple people with the same name, address, gender, and description (like a father and son), driver’s licenses all have license numbers. This unique number is called a Key Field, which is used to connect a flat-file database to other associated databases (called relational databases).

Excel databases: Creating relational tables (1) JD Sartain / PC World

This foundational Master database (in this example) contains all the information that’s on your driver’s license. One or more related databases, called Slave, Child, or Detail databases, contain additional information that’s related to the individual drivers (identified by the unique key field License Number). For example, one Slave database might contain all of the individual’s driving violations, while another might contain all the previous addresses of the individual drivers. This type of relational database is called a One-to-Many relationship, which means each driver can have multiple violations or multiple addresses, but the violations and/or addresses databases cannot have multiple drivers.

Other types of relationships include One-to-One and Many-to-Many. In a Sales database where customers purchase products, some customers might receive special discount rates (such as wholesale, retail, tax exempt, etc.), which would require a Discount Rate database. That would be a one-to-one relationship with the Customer database. When a customer can purchase many products and the same product can be purchased by many customers, you have a many-to-many relationship.

Excel databases: Creating relational tables (2) JD Sartain / PC World

Who needs a relational database

There are many reasons to create relational databases. The most obvious is so you don’t repeat the same data on every spreadsheet in your workbook. For example, it’s redundant, time-consuming, and resource-intensive to retype all the driver’s names and birth dates from the Master database to the multiple Slave databases. And even if you copy the information from one to the other, it still uses unnecessary disk space and memory, which slows everything down. Also, the name and birthdate are not really unique. For example, there are likely hundreds of Jack Taylors and John Smiths, and some of these could easily have the same birthdate. But if you just use the License Number, you can’t identify the drivers, so you’re forced (to be safe) to use all three fields (at least).

The most essential reason for relational databases is to create queries and filters that can extract specific information and print reports. Say your boss wants a report that shows everyone in Santa Rosa County, Florida with traffic fines in excess of $300; or how many drivers in Pensacola have license renewal dates in December? Without the relational database capacity, you would have to cut and paste this information together from three or more spreadsheets onto a fourth spreadsheet, then hope—when you’re all finished—your boss doesn’t announce, “I said Sarasota County, not Santa Rosa County.”

Excel databases: Creating relational tables (3) JD Sartain / PC World

Create a relational database

Let’s create a relational database with several separate tables or spreadsheets.

Creating the Master Table

1. Use the same fields shown in the first screenshot above (“A basic flat-file spreadsheet database”), and then fill in12-15 records with your own data (or use ours). Those fields are: License Number, Name, Address, City, State, Zip, Date of Birth, Expiration Date, and Gender.

2. When finished, highlight the entire table including the headers; that is A1 through I15 (A1:I15). Rememberthat CTRL+A highlights the entire table in one stroke, as long as your cursor is positioned somewhere/anywhere inside the table range.

3. Select the tab and button: Insert > Table

4. If the range is highlighted (which it should be), the range address appears in the field called: Where is the data for your table in the Create Table dialog box. Check the box that says: My Table Has Headers, then click OK.

Excel databases: Creating relational tables (4) JD Sartain / PC World

5. As soon as that dialog window closes, BE SURE to name your table in the Table Name field box (top left corner) in the Properties group (on the current screen). Type MASTER, then press the Return key.

6. Notice the table now shows down arrows beside each field name. Click one of the down arrows (e.g., City) and notice the dialog menu box that appears. This box contains Sort options that include filters, which allow you to display specific information based on the selected filter. For example, if you uncheck the Select All field box, and then check only the field boxes that say Miami and Destin, Excel filters OUT all cities EXCEPT Miami and Destin.

NOTE: Don’t panic when all the remaining records disappear. They are not gone, just hidden. To view them again, click the down arrow beside the field City, then click the All button, and they’re visible again immediately.

TIP:Click the Text Filters option on the Filters dropdown menu to select filtering options from the popup list (as opposed to just matching fields from the Checkbox List). Options include Equals, Does Not Equal, Begins With, Ends With, Contains, Does Not Contain, Custom Filter.

7. Remember to change the tab (that says Sheet1) at the bottom of the spreadsheet to say Master.Double-click the spreadsheet tab to change the name quickly.

Excel databases: Creating relational tables (5) JD Sartain / PC World

Slave Tables

1. Next, create the Slave Tables. Press the + (plus sign) on the Navigation bar to add two additional spreadsheets. Name one of these Violations and the other Addresses.

2. Copy column A (License Numbers) to column A in both of the other spreadsheets. Adjust the column widths to 11.

NOTE: Remember, the Slave table in this example is a one-to-many, which means there are multiple records per driver, so the Key field (License Number) can—and will—be repeated many times. We are copying it to the Slave tables so you don’t have to re-enter the data. For each multiple entry, just recopy the License Number before you enter the data in the rest of each record.

3. Use the same fields shown in the following screenshot “Relational database: Violations Slave Table” below, and then fill in your own data (or use ours). Those fields are: License Number (in column A, of course), Violation Type, Violation Fee, Violation Date, Expiration Date, Fee Paid Date

4. Enter around 30 records with repeated License Numbers. For example: License number F298-6588 is repeated three times. This means Roger Anderson (the driver with this license number) has three driver’s violations.

5. When finished, highlight the entire table including the headers: A1:H31.

6. Select Insert> Table

7. The range address appears in the field called:Where is the data for your table in theCreate Table dialog box. Check the box that says: My Table Has Headers, then click OK.

8. As soon as that dialog window closes, BE SURE to name your table in the Table Name field box (top left corner) in the Properties group (on the current screen). Type VIOLATIONS, then press the Return key.

9. Click one of the down arrows beside one of the columns/fields. Notice the dialog menu box that appears. Experiment with the Sorting and Filters to view different results from this table.

Excel databases: Creating relational tables (6) JD Sartain / PC World

10. For the Addresses Slave table, return to the Master and copy columns C, D, E, and F (Address, City, State, Zip) to columns B, C, D, and E in the Adresses table (remember, License Number—the unique key field—is already in column A.)

11. Adjust the column widths to accommodate the data.

12. Enter around 30 records with repeated License Numbers. For example: License number F298-6588 is repeated three times. This means Roger Anderson (the driver with this license number) has three previous addresses.

13. Repeat the instructions from 5 through 9 above, this time naming the Table Addresses and defining the range as A1:E31. And that’s all there is to it.

Excel databases: Creating relational tables (7) JD Sartain / PC World
Excel databases: Creating relational tables (2024)

FAQs

Can you create a relational database in Excel? ›

However, Excel doesn't allow the creation of a relational database, but you can still cross-reference and cross-link different tables and pull the data into a master table.

How do you create a relational data model in Excel? ›

Create relationships within your data model

Click on the "Analyze" tab within the Excel ribbon. Choose the "Relationships" button. Within the "Manage Relationships" dialog box, choose the "New" button. Select the tables and columns you want to incorporate into your relationship.

How do I create a database table in Excel? ›

Create a database without using a template
  1. On the File tab, click New, and then click Blank Database.
  2. Type a file name in the File Name box. ...
  3. Click Create. ...
  4. Begin typing to add data, or you can paste data from another source, as described in the section Copy data from another source into an Access table.

How do I create a master database in Excel? ›

How to Create a Database in Excel
  1. Step 1: Set up a data spreadsheet framework. Open an Excel spreadsheet, place your cursor in the A1 cell, and type in your database title. ...
  2. Step 2: Add or import data. ...
  3. Step 3: Convert your data into a table. ...
  4. Step 4: Format the table. ...
  5. Step 5: Save your database spreadsheet.
Sep 12, 2022

Is it possible to use Excel as a database? ›

The database capabilities of Excel are very powerful. In fact, not only can Excel be used to create a simple searchable database, it also can be used to create a proper relational database. A relational database consists of a master table that links with its slave tables, which are also known as child tables.

Why not to use Excel as a database? ›

Why you shouldn't be using Excel as a database
  • Not suitable for collaboration. ...
  • Version confusion. ...
  • Security issues. ...
  • Unmanageable. ...
  • Input errors. ...
  • Relational databases store information more effectively. ...
  • Relational databases can handle large volumes of information. ...
  • Multiple users can access the same database.
Nov 4, 2021

What are the 3 types of relational that data model used? ›

Three well-known data models of this type are relational data models, network data models and hierarchical data models. The relational model represents data as relations, or tables.

How do I create a dynamic table in Excel? ›

The Pivot Table option can create dynamic Tables in Excel. For this, select the complete data to be included in Dynamic Table and then click on the Pivot Table option under the Insert menu tab or else press short cut key ALT + N + V simultaneously to apply it.

How do I create a simple database table? ›

Create a new table in a new database
  1. Click File > New, and then select Blank desktop database.
  2. In the File Name box, type a file name for the new database.
  3. To browse to a different location and save the database, click the folder icon.
  4. Click Create.

Can SharePoint be used as a database? ›

In summary, while SharePoint shares some features with databases, and is a great tool for document management, it's not designed to be used as a database.

How to use Excel for database management? ›

Steps to create a database in Excel
  1. Create a data spreadsheet.
  2. Add or import data.
  3. Convert your data into a table.
  4. Customize the table design and assign a name.
  5. Interact with the data.
Feb 24, 2023

What is master table in Excel? ›

This means that, unlike a 'normal' Excel range, a reference to a Table column can adjust automatically to include new rows. Tables have lots of other useful features. For example: . * Formulae and formats can be copied automatically to the other rows in the same column and will extend to new rows added to the Table.

Why are spreadsheets better than databases? ›

Spreadsheets are great for storing and manipulating smaller data sets. If you're looking for a solution that allows for complex information and automation, you'll want to opt for a database. If you're ready for a robust data management solution, learn more about HubSpot's CRM.

Can Excel act as a simple database? ›

As a spreadsheet program, Excel can store large amounts of data in workbooks that contain one or more worksheets. However, instead of serving as a database management system, such as Access, Excel is optimized for data analysis and calculation.

What is difference between Excel and database? ›

Database is actually very similar to Excel workbook. Databases store data in table (worksheet) and tables have records (rows) and fields (columns). But worksheet in an Excel workbook can only store one million rows where tables in database can store billion, trillion... records.

Which database is easiest to use? ›

MySQL is extremely easy to deploy and manage. It supports ACID (Atomicity, Consistency, Isolation, Durability), thereby making it the most reliable. This Relational Database Management System (RDBMS) offers fast-loading utilities with different memory cache to maintain and administer Servers.

What database is better than Excel? ›

Unlike Excel, SQL can handle well over one million fields of data with ease. SQL queries are also more flexible and powerful than Excel formulas. Data analysts use SQL to interact with enormous databases by: Manipulating data.

What are relational database tables? ›

A relational database (RDB) is a way of structuring information in tables, rows, and columns. An RDB has the ability to establish links—or relationships–between information by joining tables, which makes it easy to understand and gain insights about the relationship between various data points.

What is relational database for beginners? ›

A relational database is a type of database that stores and provides access to data points that are related to one another. Relational databases are based on the relational model, an intuitive, straightforward way of representing data in tables.

What is an example of relational database? ›

Examples of relational databases

Popular examples of standard relational databases include Microsoft SQL Server, Oracle Database, MySQL and IBM DB2.

What is the difference between relational model and relational database? ›

The relational model represents how data is stored in Relational Databases. A relational database stores data in the form of relations (tables).

What is the most popular database model? ›

The most popular example of a database model is the relational model, which uses a table-based format.

How do I create a dynamic SQL query in Excel? ›

Approach 1: Parameterising the SQL connector's SQL Statements, Ignoring Privacy Levels
  1. In Excel, navigate to the Data tab.
  2. Click the Get Data dropdown.
  3. Hover over the From Database option and click the From SQL Server Database.
  4. Enter the Server.
  5. Enter the Database.
  6. Expand the Advanced options.
  7. Type EXEC [dbo]. ...
  8. Click OK.
Sep 22, 2022

Are pivot tables dynamic? ›

A dynamic range will automatically expand or contract, if new columns or rows of data are added, or data is removed. You can base a pivot table on the dynamic range. Then, when you refresh the pivot table, it will include all of the data in the range, even if new rows or columns have been added.

What is the difference between CREATE table and create database? ›

Create Database is creation of container which will contain table after create table statement. Tables will contain structure and Data but Database will contain Database Objects like Tables , Constraints , Views , PK , Indexes etc.

What is the simplest database software? ›

Simple Database Software Programs: List
  • Database Oasis. Database Oasis is a popular solution that allows you to create and custom databases in minutes. ...
  • Amazon SimpleDB. Another super popular solid but simple database software solution. ...
  • Apache OpenOffice Base. ...
  • Basemaster. ...
  • Knack. ...
  • Sesame Database Manager. ...
  • Restdb.io. ...
  • Pakker.

Can I create my own database for free? ›

You can sign up for MongoDB Atlas and create an online database for free here. To get started, you will need some basic knowledge of programming concepts such as command line or Unix shell commands, functions, variables, and boolean operators.

How can you create a database with a many to many relationship? ›

To create a many-to-many relationship:
  1. Create a new table to serve as the intermediate table. ...
  2. Create a relationship between the new table and the existing tables. ...
  3. Add lookup fields to the relationship. ...
  4. Delete unnecessary fields from parent tables. ...
  5. Create automated email notifications for the new table.

How many records can a user put in an Excel database? ›

Yes, Excel has maximum row limits! According to Microsoft Support (latest version): Excel's maximum row limit is 1,048,576. Columns are limited to 16,384. This applies to Excel for Microsoft 365, Excel 2019, Excel 2016, Excel 2013, Excel 2010, and Excel 2007.

How can I convert data from Excel to database? ›

On the External Data tab, in the Export group, click Excel. In the Export - Excel Spreadsheet dialog box, review the suggested file name for the Excel workbook (Access uses the name of the source object). If you want, you can modify the file name. In the File Format box, select the file format that you want.

Can I create a relational database in SharePoint? ›

You cannot substitute a relational database with SharePoint. Lists are not called tables in SharePoint for a reason. The main purpose of SharePoint is storing documents centrally and editing them together. Use the right tool for each of your business needs.

How do I create a simple database in SharePoint? ›

In the Databases section, click Manage content databases.
...
On the Add Content Database page:
  1. Specify a web application for the new database.
  2. Specify a database server to host the new database.
  3. Specify the authentication method that the new database will use and supply an account name and password, if they are necessary.
Jan 20, 2023

Does Office 365 have a database? ›

Data storage

If you use Microsoft 365 with SharePoint Online, data is stored in Microsoft Azure SQL Database.

What is the difference between master table and transaction table? ›

A transaction is an activity performed by entities(master tables) within the system. These activities are captured in transaction tables and usually, these transaction entries have foreign keys to master records. Transaction tables are designed to store events in the system.

Is it worth it to master Excel? ›

Yes, they are absolutely worth it. Your potential employer has no way of knowing if you've opened Excel once or if you have an expert certification. Earning a Microsoft Excel certificate can help you stand out in the job market by demonstrating to employers and hiring managers that you have the necessary skills.

What is the best way to master Excel? ›

How to master Excel quickly in 11 steps
  1. How to navigate the interface. A good start is to be efficient at navigating the Excel interface. ...
  2. Learn some useful shortcuts. ...
  3. Freeze panes. ...
  4. Create a simple drop-down list. ...
  5. Visualize key data with conditional formatting. ...
  6. Flash fill. ...
  7. Summarize data with PivotTables. ...
  8. Protect Excel data.

When would you have to use a relational database instead of a spreadsheet? ›

Unlike spreadsheets, modern relational databases are designed for multiple users. For circ*mstances that require many users to share information, add new data, and/or make changes to data, a spreadsheet is a bad choice. Databases are ideal for sharing and collaboration of information.

Why do people use Excel as a database? ›

The lack of appropriate entry level toos is probably the main reason why people (mis)use Excel for their database projects. The other reason is that if your problem is better to be solved by a database then odds are there already is an app for it.

What can a database do that a spreadsheet Cannot? ›

The main technical difference between a spreadsheet and a database comes down to the way they store data. In a spreadsheet, data is stored in a cell, and can be formatted, edited, and manipulated within that cell. In a database, cells contain records that come from external tables.

Does Microsoft have a relational database? ›

Microsoft Azure provides multiple services for relational databases. You can choose the relational database management system that's best for your needs, and host relational data in the cloud.

What Microsoft program creates relational databases? ›

Microsoft Access is a well-known database management system produced by Microsoft and is part of the Microsoft 365 office suite. Microsoft Access combines Microsoft's relational Jet Database Engine with software development tools and a graphic user interface (GUI).

How do I create a dynamic database in Excel? ›

The Pivot Table option can create dynamic Tables in Excel. For this, select the complete data to be included in Dynamic Table and then click on the Pivot Table option under the Insert menu tab or else press short cut key ALT + N + V simultaneously to apply it.

Does Office 365 have a database program? ›

Data storage

If you use Microsoft 365 with SharePoint Online, data is stored in Microsoft Azure SQL Database.

Does Microsoft still have a database program? ›

Is Microsoft Access still available in 2022? Microsoft Access is still available and continues to be supported. A proven product for 25+ years it is still the most widely used desktop, team, and small/medium sized business database product.

What is replacing Microsoft Access? ›

Microsoft Power Platform (Power Apps) Touted as Microsoft's replacement for Access, this suite of app development, business intelligence, and connectivity tools enables developers to create complicated applications for Web deployment through a coordinated suite of tools, such as Power BI, which operates as an ERP.

Is Microsoft Excel Rdbms? ›

Excel is not database — it is spreadsheet software. Even though many users try to force it to function like a database, its limitations in that regard are considerable. Starting with the most obvious, Excel is limited to 1M rows of data, while databases don't suffer from such restrictions.

Can I use Microsoft Access to create a database? ›

Open Access. If Access is already open, select File > New. Select Blank database, or select a template. Enter a name for the database, select a location, and then select Create.

What is the easiest relational database? ›

MySQL is extremely easy to deploy and manage. It supports ACID (Atomicity, Consistency, Isolation, Durability), thereby making it the most reliable. This Relational Database Management System (RDBMS) offers fast-loading utilities with different memory cache to maintain and administer Servers.

What are the three types of relational database? ›

There are 3 different types of relations in the database:
  • one-to-one.
  • one-to-many, and.
  • many-to-many.
Jan 22, 2020

What are the four basic requirements of a relational database? ›

Four crucial properties define relational database transactions: atomicity, consistency, isolation, and durability—typically referred to as ACID.

What is a dynamic table in Excel? ›

Dynamic tables in Excel are the tables where when a new value is inserted into it. As a result, the table adjusts its size by itself. To create a dynamic table in Excel, we have two different methods: making a table of the data from the table section while another using the offset function.

How do I make Excel automatically update tables? ›

Automatically refresh data at regular intervals
  1. Click a cell in the external data range.
  2. On the Data tab, in the Connections group, click Refresh All, and then click Connection Properties.
  3. Click the Usage tab.
  4. Select the Refresh every check box, and then enter the number of minutes between each refresh operation.

How do I create an automatic table in Excel? ›

How to create a table in Excel
  1. Select any cell within your data set.
  2. On the Insert tab, in the Tables group, click the Table button or press the Ctrl + T shortcut.
  3. The Create Table dialog box appears with all the data selected for you automatically; you can adjust the range if needed. ...
  4. Click OK.
Feb 2, 2023

Top Articles
Latest Posts
Article information

Author: Delena Feil

Last Updated:

Views: 5558

Rating: 4.4 / 5 (65 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Delena Feil

Birthday: 1998-08-29

Address: 747 Lubowitz Run, Sidmouth, HI 90646-5543

Phone: +99513241752844

Job: Design Supervisor

Hobby: Digital arts, Lacemaking, Air sports, Running, Scouting, Shooting, Puzzles

Introduction: My name is Delena Feil, I am a clean, splendid, calm, fancy, jolly, bright, faithful person who loves writing and wants to share my knowledge and understanding with you.