RDBMS. Stands for "Relational Database Management System." An RDBMS is a DBMS designed specifically for relational databases. ... A relational database refers to a database that stores data in a structured format, using rows and columns. This makes it easy to locate and access specific values within the database.
3. SOME PRELIMINARIES
The theory taught in this part of the course was originally devised by Edgar
F. Codd in 1969. His seminal paper (1970) was entitled A Relational Model
of Data for Large Shared Data Banks.
We will use a language called Tutorial D for examples and exercises.
We will use Rel, an implementation of Tutorial D, for our on-line work.
4. WHAT IS A DATABASE?
An organised, machine-readable collection of
symbols, to be interpreted as a true account of some
enterprise.
Machine-updatable, too …
… so a database is also a collection of variables.
A database is typically available to a community of users,
with possibly varying requirements.
5. “ORGANISED COLLECTION
OF SYMBOLS”
StudentId Name CourseId
S1 Anne C1
S1 Anne C2
S2 Boris C1
S3 Cindy C3
For example:
The symbols are organised into rows and columns, thus forming a table.
One of the rows is different in kind from the others.
7. RELATIONAL MODEL
RDBMS (Relational Database Management System)
external view
The data are represented as a set of relations.
A relation is a two-dimensional table.
This doesn’t mean that data are stored as tables;
the physical storage of the data is independent of
the way the data are logically organized.
8. Relation
Name – each relation in a relational database should have a name that is
unique among other relations.
Attribute – each column in a relation.
The degree of the relation – the total number of attributes for a relation.
Tuple – each row in a relation.
The cardinality of the relation – the total number of rows in a relation.
10. OPERATIONS ON
RELATIONS
In a relational database, we can define several
operations to create new relations out of the existing
ones.
Basic operations:
Insert
Delete
Update
Select
Project
Join
Union
Intersection
Difference
12. Delete operation
An unary operation.
Delete a tuple defined by a criterion from the relation.
13. Update operation
An unary operation.
Changes the value of some attributes of a tuple.
14. Select operation
An unary operation.
It is applied to one single relation and creates another
relation.
The tuples in the resulting relation are a subset of the tuples
in the original relation.
Use some criteria to select
15. Project operation
An unary operation.
It is applied to one single relation and creates another
relation.
The attributes in the resulting relation are a subset of the
attributes in the original relation.
16. Join operation
A binary operation.
Combines two relations based on common attributes.
17. Union operation
A binary operation.
Creates a new relation in which each tuple is either in the
first relation, in the second, or in both.
The two relations must have the same attributes.
18. Intersection operation
A binary operation.
Creates a new relation in which each tuple is a member in
both relations.
The two relations must have the same attributes.
19. Difference operation
A binary operation.
Creates a new relation in which each tuple is in the first
relation but not the second.
The two relations must have the same attributes.