Suppliers and Parts database
Encyclopedia
The Suppliers and Parts database is an example of a relational database
Relational database
A relational database is a database that conforms to relational model theory. The software used in a relational database is called a relational database management system . Colloquial use of the term "relational database" may refer to the RDBMS software, or the relational database itself...

 very much referred to in literature. It is a very simple and straightforward database containing only three tables: Supplier, Part and Orders.

This example is often used because it illustrates the dependencies and relations between two or more tables in a database. This knowledge is critical for any person who wishes to create an efficient database, where one table relies on some kind of data in another table.
The semantics behind these tables are simple: the Supplier table holds information about several Suppliers, and contains a set of data fields, each containing one type of information (Supplier_name, Supplier_address and so on).
The Parts table holds information about different parts, for example Part_number, Part_price, as well as a field identifying the supplier of each particular part, also known as a Foreign key
Foreign key
In the context of relational databases, a foreign key is a referential constraint between two tables.A foreign key is a field in a relational table that matches a candidate key of another table...

.
The Orders table holds the information about the orders a company have placed, X numbers of part Y, from supplier Z. The most basic design of this table, would contain a foreign key identifying the part, such as the part number, as well as the number of parts ordered.
This way, it is shown that the order table doesn't need to store every detail, about every supplier and every part for each order placed, but that these data can be stored separately, and then referenced.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK