If you’re familiar with spreadsheets like Microsoft Excel, you already understand how data can be used with tables. Databases also use tables to store, manage, and retrieve information.

You Already Use Databases

You may not realize it but you encounter the power of databases all the time in your daily life. For example, when you log into your online banking account, your bank first authenticates your login using your username and password and then displays your account balance and any transactions. A database operating behind the scenes evaluates your username and password combination and provides access to your account. It then filters your transactions to display them by date or type, as you request.

Databases vs. Spreadsheets

Databases are different from spreadsheets in that they’re better at storing large amounts of data and manipulating it in various ways. Here are just a few actions you can perform with a database that would be difficult, if not impossible, to perform using a spreadsheet:

  • Retrieve all records that match certain criteriaUpdate records in bulkCross-reference records in different tablesPerform complex aggregate calculations

Elements of a Database

A database is made up of many different tables. Like Excel tables, database tables consist of columns and rows. Each column corresponds to an attribute and each row corresponds to a single record.

For example, consider a database table that contains names and telephone numbers for the 50 employees at Company X. The table is set up with columns labeled “FirstName,” “LastName,” and “TelephoneNumber.” Each row contains the corresponding information for one individual. Because there are 50 individuals, the table has 50 entry rows and one label row. ​

The data in a database is protected by constraints, which enforce rules on the data to ensure its overall integrity. A unique constraint ensures that a primary key cannot be duplicated. A check constraint controls the type of data you can enter. For example, a Name field can accept plain text, but a Social Security Number field must include a specific set of numbers.

Each table in a database must have a unique name and each must have a primary key column so that each row (or record) has a unique field to identify it. 

One of the most powerful features of a database is the ability to create relationships between tables using foreign keys. For example, you might have a Customers table and an Orders table. Each customer can be linked to an order in your Orders table. The Orders table, in turn, might be linked to a Products table. This method simplifies database design so you can organize data by category, rather than trying to put all the data into one or just a few tables.

A Database Management System

A database only holds data. To make real use of that data, you need a database management system. A DBMS is the database itself, along with the software and functionality required to retrieve or insert data. A DBMS creates reports, enforces database rules and constraints, and maintains the database schema. Without a DBMS, a database is just a collection of bits and bytes with little meaning.

If you’d like to try creating a database, a good place to start would be a database program like Microsoft Access.

  • What is a database schema?
  • A database’s schema is its structure. It specifies what information, or objects, can enter the database and defines the relationship between them. Scheme are typically defined using ​Structured Query Language (SQL).
  • What is a relational database?
  • A relational database stores data points that are related to each other. It organizes the data into one or more tables, each one with a unique key identifying it.
  • What is a database query?
  • A query is simply a request for information from a database. The data can come from one or more tables in the database, or it can come from other queries. Whenever you type in a Google search, you’re sending a query, for example.
  • What is a database record?
  • A record is the set of data that’s stored in a table. Records are also sometimes called a tuple.
  • What is a foreign key in a database?
  • A foreign key is a common component that links data in two tables together. The foreign key refers to the primary key of another table called the parent table. The table containing the foreign key is called the child table.
  • What is an entity in a database?
  • An entity is an object that exists within the database. It can be a person, place, unit, or any abstract concept you wish to store information about. For example, a school database can contain students, teachers, and courses as entities.

A database’s schema is its structure. It specifies what information, or objects, can enter the database and defines the relationship between them. Scheme are typically defined using ​Structured Query Language (SQL).

A relational database stores data points that are related to each other. It organizes the data into one or more tables, each one with a unique key identifying it.

A query is simply a request for information from a database. The data can come from one or more tables in the database, or it can come from other queries. Whenever you type in a Google search, you’re sending a query, for example.

A record is the set of data that’s stored in a table. Records are also sometimes called a tuple.

A foreign key is a common component that links data in two tables together. The foreign key refers to the primary key of another table called the parent table. The table containing the foreign key is called the child table.

An entity is an object that exists within the database. It can be a person, place, unit, or any abstract concept you wish to store information about. For example, a school database can contain students, teachers, and courses as entities.

Get the Latest Tech News Delivered Every Day