Professional Documents
Culture Documents
Group 2
A Relational Database is a type of database that stores and provides access
to data points that are related to one another. The columns of the table hold
Relational Database
attributes of the data, and each record usually has a value for each attribute,
making it easy to establish the relationships among data points
The “bi” in a binary relation R refers to the fact that R has two columns when
we write R as a table. It is often useful to allow a table to have an arbitrary
number of columns. If a table has n columns, the corresponding relation is
called an n-ary relation.
Table 2.6.1 represents a 4-ary relation. This table expresses the relationship
among identification numbers, names, positions, and ages.
Example
We can also express an n-ary relation as a collection of n-tuples.
22012 Johnsonbaugh C 22
93831 Glover Of 24
58199 Battey P 18
84341 Cage C 30
01180 Homer Lb 37
26710 Score P 22
61049 Johnsonbaugh Of 30
39826 Singleton 2b 31
Database A Database is a collection of records that are manipulated by a computer.
For example, an airline database might contain records of passenger’s
reservations, flight schedules, equipment and so on. Computer system are
capable of storing large amounts of information in databases. The data are
available to various applications.
Database Management
System Database Management System (DBMS) are programs that help users
access the information in databases.
The relational model (RM) was designed to solve the problem of multiple
Relational Model
arbitrary data structures and was invented by Edgar F. Codd in 1970, is based
on the concept of an n-ary relation. We will briefly introduce some of the
fundamental ideas in the theory of relation databases.
93831 Glover Of 24
58199 Battey P 18
84341 Cage C 30
01180 Homer 1b 37
26710 Score P 22
61049 Johnsonbaugh Of 30
39826 Singleton 2b 31
93831 Glover Of 24
58199 Battey P 18
84341 Cage C 30
01180 Homer 1b 37
26710 Score P 22
61049 Johnsonbaugh Of 30
39826 Singleton 2b 31
ID Number = PID
We take a row from Table 2.6.1 and row from Table 2.6.2 and if ID Number = PID, we combine the rows. For example, the
ID Number 01180 in the fifth row (01180, Homer, lb, 37) of Table 2.6.1 matches the PID in the fourth row (01180, Mutts) of
Table 2.6.2. These tuples are combined by the first writing the tuple from Table 2.6.1, following it by the tuple from the Table
2.6.2 and eliminating the equal entries in the specified attributes to give
(01180, Homer, lb, 37, Mutts),
Describe operations that provide the answer to the query “Find the names of
all persons who play for some team”.
If we first join the relations given by Tables 2.6.1 and 2.6.2 subject to the
condition ID Number = PID, we will obtain Table 2.6.3, which lists all
persons who play for some team as well as other information. To obtain the Name
names, we need only project on the attribute Name. We obtain the relation.
Battey
Homer
Score
Singleton
Describe operations that provide the answer to the query “Find the names of all
persons who play for the Mutts”. PID Team
If we first use the selection operator to pick the rows of Table 2.6.2 that 26740 Mutts
reference Mutts’ players, we obtain the relation.
01180 Mutts
If we now join Table 2.6.1 and the relation TEMP1 subject to ID Number
Temp2 = PID, we obtain the relation
Name
Homer If we project the relation TEMP2 on the attribute Name, we obtain the
relation
Score
Thank You