Tuesday, February 8, 2011

Creating a new database

Tables store data, so they're essential building blocks of any database.
A database should have a separate table for every major subject, such as employee records, customer orders, shipping methods, or suppliers. Data should not be duplicated in multiple tables. Duplicating data is a common error, but it's easy to avoid if you structure your tables well.


Each table contains rows called records and columns called fields.
A record is a collection of facts about a particular person, event, CD, or other item of interest.
A field is a single kind of fact that may apply to each person, event, or other record


The fields in your database have settings that determine the type of data they can store, how the data is displayed, and what you can do with the data.
One important setting for fields is the data type, including number, text, currency (money), and date/time (shown together as one type in Access). The data type limits and describes the kind of information in the field. The data type also determines the actions you can perform on a field and how much memory the data uses. Fields also have properties that control the details of information inside them, including a character length, a default value, and a validation rule that makes sure the data meets certain criteria. The properties make it easier to enter and manage data.


To distinguish one record from another, tables can contain a primary key field.
The primary key is an identifier—such as a part number, a product code, or an employee ID—that's unique to each record.A primary key separates similar information and makes each record unique. It also brings information together. You relate one table to another using a primary key. This is how tables share data, and how you can avoid repeating information in both the tables

No comments:

Post a Comment