6.3: Database Design
- Page ID
A properly designed database will divide data into tables to eliminate duplicate information (also known as data redundancy). Redundancy occurs when data is repeated several times in a database. Redundant data is bad, because it wastes space and increases the likelihood of errors and inconsistencies. A good database prevents redundant data when, for example, customer data (ID, Name, Address, etc) is stored in one table and then other tables store just the customer ID to refer to the customers. Another important design consideration to maintain is data accuracy. A common motto when performing data entry is “garbage in, garbage out”. The correctness and completeness of information is important if the user wants to rely on their data. If your database contains incorrect information, any reports that pull information from the database will also contain incorrect information. As a result, any decisions you make that are based on those reports will then be misinformed.
Creating a new database involves determining the database schema, which is a description of the data and the organization of the data into tables. Designing a schema consists of the following steps:
- Determine the purpose of the database and which data to include in the database. It is a good idea to write down the purpose of the database on paper — its purpose, how you expect to use it, and who will use it.
- Divide information into related groups to create tables and then give each table a descriptive name. Data should be grouped to ensure there is little to no redundancy. Each table must have data related to at least one other table through a table relationship.
- Describe the fields and determine the primary key for each table.