Suppliers and Parts database
From Wikipedia, the free encyclopedia
The Suppliers and Parts database is an example of a relational database 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. 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.
[edit] References
- Date, C.J. (2004). "8 Relational Calculus", in Maite Suarez-Rivas; Katherine Harutunian: An Introduction to Database Systems. Pearson Education Inc.. ISBN 0-321-18956-6.