Print
Category: Uncategorised
Hits: 4189

Database tables are similar to the sorts of tables you'll find in books, such as this:

CustomerID Name Address Email
1 Smith Ltd Manston, Yorkshire This email address is being protected from spambots. You need JavaScript enabled to view it.
2 Wigglesworth Ltd Leeds, Yorkshire This email address is being protected from spambots. You need JavaScript enabled to view it.
3 William J Seymour Azusa Street, LA, USA This email address is being protected from spambots. You need JavaScript enabled to view it.

This shows you both the table design, ie what columns it has in it, and table data.

When a database table is being designed, we would not normally expect specific data to be in it- users like to have their own data in their database! There are exceptions, such as internal-use-only data, such as some accounting codes, but they are notable by their rarity.

So, what makes for a good table design?

1. The right fields.

This might sound trivial, but making sure that your "Customers" table doesn't have details of specific orders means that your customers won't be restricted to just one order each! Similarly making sure that the customer's address is part of the Customers table and not the "Products" table would also be good!

2. The right indexes.

An index to a table is a bit like an index in a book- it allows you to find things quickly. Tables should normally have what is called a "Primary Key"- this is an index that should be unique so that no two records have the same value, so that they can be found quickly, such as by using the CustomerID. Tables can also have a large number of "Secondary Indexes" that also allow data rows (called "records") to be found quickly, such as finding all the customers with a particular surname, but normally they have less than 3.

3. The right help.

DBDesigner supports the entry of help fields as the table is being designed so that the finished program can show the user a hint if he puts the mouse cursor over a field or table.

This email address is being protected from spambots. You need JavaScript enabled to view it. on 0115 840 5500 to learn more.