(1) Three
main types of data
Numbers (Numeric)
|
Use for data to be included in mathematical calculations, except
calculations involving money (use Currency type).
|
Date / Time
|
Use for dates and times
|
Text (Alphanumeric or String)
|
Use for text or combinations of text and numbers, such as
addresses, or for numbers that do not require calculations, such as phone
numbers, part numbers, or postal codes.
Stores up to 255 characters. The FieldSize property controls the
maximum number of characters that can be entered.
|
(2) Primary and Foreign Keys
Primary Key (Definition): The
primary key of a relational table uniquely identifies each record in the table.
It can either be a normal attribute that is guaranteed to be unique (such as
Social Security Number in a table with no more than one record per person) or
it can be generated by the DBMS (such as a globally unique identifier, or GUID,
in Microsoft SQL Server). Primary keys may consist of a single attribute or
multiple attributes in combination.
Foreign Key (Definition): A foreign key is a field in a
relational table that matches the primary key column of another table. The
foreign key can be used to cross-reference tables.
In the
context of relational databases, a foreign key is a field (or collection
of fields) in one table that uniquely identifies a row of another table. In
other words, a foreign key is a column or a combination of columns that
is used to establish and enforce a link between two tables.
(3) Relational Database
A database structured to recognize
relations among stored items of information.
A
relational database is a collection of data items organized as a set of
formally-described tables from which data can be accessed or reassembled in
many different ways without having to reorganize the database tables. The
relational database was invented by E. F. Codd at IBM in 1970.
No comments:
Post a Comment