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. 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.