2.1 Relational Databases
A relational database is a collection of information that has been organized into tables. Each table contains rows with entries organized into columns. Tables are stored in distinct storage areas known as schemas. A schema may be thought of as an area in which an individual user of the database may store his or her tables schemas serve to separate tables created by one user from those created by another.
What does the term relational mean when used in the context of a database? It indicates that there are relationships between the columns in the database tables. This is an important concept, and you will learn more about it later in this chapter. The relational database model for the representation of data was developed by Dr. E. F. Codd in the early 1970s, and was described in his paper titled "A Relational Model of Data for Large Shared Data Banks," published in Communications of the ACM (Association for Computing Machinery) Vol. 13, No. 6, June 1970.
We are all familiar with data represented in the form of tables. For example, customer information can be represented as a table of rows containing the customer's first name, last name, date of birth, and phone number:
first_name last_name dob phone ---------- ---------- ----------- ------------ John Smith 01-JAN-1965 650-555-1212 Cynthia Stevens 05-MAR-1968 650-555-1213 Steve Seymour 16-JUN-1971 650-555-1214 Gail Williams 01-DEC-1975 650-555-1215 Doreen Heyson 20-AUG-1970 650-555-1216
The data in a database can be stored using a variety of methods, for example, by putting pieces of paper into an indexed filing cabinet, or storing binary files on the disk of a computer. It is important to differentiate between the information that makes up a database and the database management system that is used to manage the storage and retrieval of that information. For an electronic database, the database management system is the software that manages the information stored in binary files on the hard disks of the computer.
The structure of a database is divided into two areas: the logical design and the physical design. The logical design captures the business rules that the database must satisfy and defines the information that the database must store. The logical design is then mapped to a physical design used to build the database using a real database management system.
Once you design and create a database, you need a way to get data into and out of it. For that purpose, today's electronic database management systems universally implement a data access language known as the Structured Query Language, or SQL.