Wednesday, October 28, 2009

General Database Rules...

Here are a few rules that should help clear up any confusion when taken in context with the rest of the blog.
  1. Databases are supposed to have unique data. There is no point in having the same data twice. This doesn't mean it shouldn't be very similar. Occasionally you'll have two sets of the same data but with a different time stamp. Like a patient could come in with the same symptoms and the same diagnosis and the same treatment at two different times.
  2. While typically tables can have many keys (fields that link to other tables), every table should have one primary key (with the exception of child tables). A primary key is the number or code that MUST be unique with every row of data. It is also typically the field used to reference the other data from other tables, and to link the tables together. Child tables are different only because they have two fields that, in combination, make the primary key. While a code can appear more than once in a child table (that is the point of a child table), the combination of the components must be unique.
  3. Other "rules" that I don't feel are as important but are considered convention can be found at The Access Web, in Ten Commandment form!

No comments:

Post a Comment