Dbms Unit 3 Notes.
Dbms Unit 3 Notes.
Dbms Unit 3 Notes.
1
Relational Model
Object Relational Model
Object Based data Model
Brief Histor y of the Relational Model
2
“A DBMS that manages data as collection of tables
in which all data relationships are represented by
common values in related tables.”
3
Relational Database definition
4
PRINCIPLES
PRINCIPLES OF
OFRELATIONAL
RELATIONAL MODEL
MODEL
Data about various entities and their relationships
are stored in a series of logical tables (also known as
relations).
Note: A domain is the set of all possible values an attribute may assume.
Example: Domain of Major= (Acct, Mktg, Mgmt, ISOM, Fina)
5
Relational database: a set of relations.
Relation: made up of 2 parts:
– Schema : specifies name of relation, plus
name and type of each column.
• E.g. Students(sid: string, name: string, login: string,
age: integer, gpa: real)
– Instance : a table, with rows and columns.
•#rows = cardinality
•#fields = degree / arity
• Can think of a relation as a set of rows or tuples.
– i.e., all rows are distinct
6
The Relational Model developed by Dr. E. F. Codd at IBM
in the late 1960s
The model built on mathematical concepts, which
expounded in the famous work called "A Relational
Model of Data for Large Shared Databanks ".
At the core of the relational model is the concept of a
table (also called a relation) in which all data is stored.
Records (horizontal rows also known as tuples) &
Fields (ver tical columns also known as attributes).
It is important to note that how or where the tables of data
are stored makes no difference.
Table can be identified by a unique name.
This is quite a bit different from the Hierarchical & Network
models in which the user had to have an understanding
of how the data was structured within the
database in order to retrieve, inser t, update, or
delete records from the database.
7
Advantages:
The data access methodology in relational
model is quite different from and better than the
earlier database models .
Another benefit of the relational system is that it
provides extremely useful tools for database
administration.
Meta-data (data about the table and field names
which form the database structure, access rights to
the database, integrity and data validation
rules etc).
Thus everything within the relational model can be
stored in tables. This means that many relational
systems can use operations recursively in order
to provide information about the database.
8
TABLE (Relation) Domain Domain
Primary
Supplier Key
a SName Quantity City
S1 Keyur 20 Ahmedabad
S2 Vinay 10 Surat
Tuples Cardin
S3 Chirag 40 Baroda ality
S4 kevin 34 Rajkot
S5 Nayan 25 Bhavnagar
Attributes
Degree 9
Attribute (field):
Member of a relation type (set / table).
Attribute Name:
All attribute names must be unique within a
table / relation.
Attribute Domain:
A set of all possible values that can be attain by
an attribute.
Attribute Value Set:
Values currently contained in an attribute.
Relation / Table Degree:
Number of attributes in a relation / table.
Tuples: Rows in a table / relation.
Cardinality: Number of tuples in a relation / table. 10
Student(studno,name,address) Schema
Course(courseno,lecturer)
Student(123,Bloggs,Woolton) Instance
(321,Jones,Owens)
sid Name Login age GPA
Schema Diagram
Displayed schema is called schema diagram.
Each object in schema is called a schema
construct.
12
Database instance (occurrence or state)
The data in a database at a particular
moment of time.
13
Table
Field
CD_ID Title Artist Genre
1 The Wall Pink Floyd Rock
14
15
Tuple:
16
EXAMPLES OF ATTRIBUTE
DOMAINS
17
18
Built in data integrity
Data consistency and accuracy
Easy data retrieval and data sharing
How and where the tables of data stored make no difference
You can access child table with out accessing parent table.
Non-navigational in nature
Find the data on the basis of the data values themselves.
One point data administration
Controlling redundancy
Data abstraction
Provide security
Data entry , update and deletion will be efficient.
Changes to the of the database is somewhat self-
documenting.
Support multiple users
19
DBMS RDBMS
The concepts of relationships is It is based on the concept
missing in a DBMS. If it exits it is
very less. Of relationships
21
EXAMPES
22
Car
23
THANKYOU…
24