Data Structure and Terminology ,
Notation
In the relational model, a database is a
collection of relational tables. A relational table is a flat
file composed of a set of named columns and an arbitrary number
of unnamed rows. The columns of the tables contain information
about the table. The rows of the table represent occurrences of
the "thing" represented by the table. A data value is stored in
the intersection of a row and column. Each named column has a
domain, which is the set of values that may appear in that
column.
Figure shows the relational tables for a simple
bibliographic database that stores information about book title,
authors, and publishers.
Figure 1
|
A Relational Database |
| Author |
|
Au-id |
Au_name |
Au_fname |
Address |
City |
State |
|
172-32-1176 |
White |
Johnson |
10932 Bigge Red. |
Menlo Park |
CA |
|
213-46-8915 |
Green |
Marjorie |
309 63rd St.#411 |
Oakland |
CA |
|
238-95-7766 |
Carson |
Chery1 |
589 Darvin Ln. |
Berkeley |
CA |
|
267-41-2394 |
O Leary |
Michael |
22 Cleveland Av#14 |
San Jose |
CA |
|
274-80-9391 |
Straight |
Dean |
5420 Collage Av. |
Oakland |
CA |
|
341-22-1782 |
Smith |
Meander |
10 Mississippi Dr |
Lawrence |
CA |
|
409-56-7008 |
Bennet |
Abraham |
6223 Bateman St |
Berkeley |
CA |
|
427-17-2319 |
Dull |
Ann |
3410 Blonde St. |
Palo Alto |
CA |
|
472-27-2349 |
Gringlesby |
Burt |
PO Box 792 |
Covelo |
CA |
|
486-29-1786 |
Locksley |
Charlene |
18 Broadway Av. |
San Francisco |
CA |
Notation :- (au_id, au_name, au_fname,
address, city, state, zip)
Figure 3
|
Publisher |
|
pub_id |
pub_name |
city |
|
736 |
New moon books |
Boston |
|
877 |
Binnet $ Hardley |
Washington |
|
1389 |
Algotada Info. |
Berkeiey |
|
1622 |
Five lacks |
Chicago |
|
1756 |
Romana Publishers |
Dallas |
|
9901 |
GGG$G |
Munchen |
|
9952 |
Scootney |
New york |
|
9999 |
Lucerney |
Paris |
Notation :- (pub_id,
pub_name, city)
Figure 2
| Title |
|
Title_id |
Title |
Type |
Price |
Pub-id |
| BU1032 |
Database guide |
Business |
20.99 |
1389 |
| BU1111 |
Computer guide |
Business |
16.95 |
1389 |
| BU2075 |
Computer stress |
Business |
10.00 |
736 |
| BU7832 |
About Computer |
Business |
11.66 |
1389 |
| MC2222 |
Treats |
Mod-cook |
13.55 |
877 |
| MC3021 |
Microwave |
Mod-cook |
15.44 |
877 |
| MC3026 |
Computer cooking |
Undecided |
- |
877 |
| PC1035 |
User friendly |
Popular |
33.00 |
1389 |
| PC8888 |
Silicon valley |
Popular |
63.00 |
1389 |
| PC9999 |
Etiquette |
Popular |
80.22 |
1389 |
| PC2091 |
Enemy |
Psychology |
62.02 |
736 |
Notation :- (title_id, title, type, price, pub_id)
Figure 4
|
Author_Title |
|
Au-id |
Title_id |
|
172-32-1176 |
PS3333 |
|
213-46-8915 |
BU1032 |
|
213-46-8915 |
BU1032 |
|
238-95-7766 |
PC1035 |
|
267-41-2394 |
BU1111 |
|
274-80-9391 |
MC2222 |
|
341-22-1782 |
MC3021 |
|
409-56-7008 |
MC3026 |
|
427-17-2319 |
PC1035 |
|
472-27-2349 |
PC8888 |
|
486-29-1786 |
PC9999 |
Notation :- (au_id, title_id)
There are alternate names used to describe relational
tables. Some manuals use the terms tables, fields, and records
to describe relational tables, columns, and rows,
respectively. The formal literature tends to use the
mathematical terms, relations, attributes, and tuples. Figure
2 summarizes these naming conventions.