|Designing Your Database
To meet your data storage requirements, you will likely need a structured database that stores the necessary data to support your information effectively and efficiently. This database should guarantee data consistency and validity, as well as support every level of data integrity. You can achieve this through logical database design.
Poor database design can disable an application, causing errors and problems with inaccuracy, inconsistency, and inflexibility. However, applying some rules during the design process will help to prevent problems in the future. Here are a few tips to keep in mind when structuring a database.
Put Your Design on Paper
This may save you a lot of time. When you design on paper first, you will focus on designing an effective and efficient database. You need to ensure that your database contains minimal redundant data and that you have eliminated duplicate data as well. Making changes to your database structure is easier on paper than online. Erasers are faster than typing.
Design a New Database; Do Not Rehab an Existing One
The problem with using an existing database as the structure for your new one is that it may contain inaccurate information, inconsistent data, or even redundant data. These are the very things you are trying to eliminate. You may import errors into the new database that may be difficult to identify and eliminate. They will surface at the worst time and then it may be too late to do anything. Start from scratch; you will thank me later.
One Table, One Subject
Your subject is probably an object or an event. Objects are tangible items such as people, places, or things, while events represent intangibles: something that occurs at a specific point in time. Both of these can be stored as data and processed as information.
If a table represents more than one subject, you will have duplicate, even redundant, data. You will avoid these problems if your table represents one subject.
Every table should have one. A primary key uniquely identifies each record in a given table and ensures against redundant data. Primary keys establish relationships between table pairs. This is important when you retrieve data from several tables in one query. Here are guidelines for establishing a primary key:
A table should not have a multipart or multivalued field. A multipart field's value can be divided into smaller parts; a multivalued field contains several occurrences of the same value type. The best way to resolve these issues is to break the multipart fields into separate and distinct fields.
Many problems with inaccurate or erroneous information are a direct result of poor data integrity. It may seem like an initial waste of time, but it will save you more time in the future because you will not need to keep fixing things. Do it right the first time and you will not have to do it over.
Do not rush through your database building. Take your time, remain focused, and be as thorough as possible before implementation. When you do these things, your blueprint is excellent and your structure is strong.
Copyright © 2001 - 2017 MJ Technologies, LLC. All rights reserved.