0% found this document useful (0 votes)
20 views

Relational Data Model - Lec2

The document discusses the relational data model. It describes the key concepts of the relational model including relations, tuples, attributes, domains and keys. It also explains how relationships are represented in the relational model including one-to-one, one-to-many, and many-to-many relationships.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Relational Data Model - Lec2

The document discusses the relational data model. It describes the key concepts of the relational model including relations, tuples, attributes, domains and keys. It also explains how relationships are represented in the relational model including one-to-one, one-to-many, and many-to-many relationships.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Relational Data Model

Final Subject Marking Structure

Method Marks Pass Mark Final Weightage


Course Works ( Assignments ) 100 50 50%
Final Exam 100 40 50%
What is Relational Model ?

• The relational model for database


management is a mathematical model for
describing the structure of data.
What is a Database Model ?

• A database model is a type of data model that


determines the logical structure of a database
and fundamentally determines in which
manner data can be stored, organized, and
manipulated.
History
• This was first introduced by Ted
Codd of IBM research in 1970.

Ted Codd
• After that subsequently
maintained and developed by
Chris Date and Hugh Darwen
among others.

Chris Date
Other Logical Data Models

• Hierarchical database model.


• Network Model.
• Object Model.
• Document Model.
• Star Schema.
Relational Model vs. Relational DBMS
• The relational model is concerned with what
is required, which separates it from concerns
of how the model will be implemented.
• Relational Model focuses on representing data
through relationship held between those data
items.
• Data is represented in the form of Tuples.
• The data in the Relational Model is queried /
manipulated using Relational Algebra.
Relational Model vs. Relational DBMS

• How is the concern of relational DBMS.


• Data from the Relational Data Model is
represented in the form of tables and rows.
• The data is queried using particular query
languages, commonly this is a language
known as SQL ( Sequential Query Language ).
Three Parts of Relational Model ?
1) Structural :
-Defines the core of the data and the
relationships involved.
2) Manipulative :
-Queries (Operations that retrieve
information) .
-Modifications (Operations that change the
database).
3) Constraints :
-Limitations ( Ex : valid ranges, values of data
to be included, etc… ).
Structural
• This is described using four terms.
1. Relation – A relation comprises a set of tuples.
2. Tuple – A tuple is a sequence of attributes ( Ex :
a row in the relation table ).
3. Attribute – An attribute is a named column in
the relation table.
4. Domain – The domain construct is important as
it identifies the type of an attribute.
Structural
Properties of Relations

• There are three important properties.


1. Name – This will help to identify the relation.
( Ex : Smith is a Student, etc… ).
2. Cardinality – Number of tuples ( data rows ) in
the relation.
3. Degree – The number of attributes in each tuple.
Domains

• The Domain of an attribute defines the set of


values which can apply to that attribute.
Ex: Years – 1950 … 2020
Person Names - String
Notations to Describe the Relational Schema

• There are two main ways. Those are,


1. Detailing the domains of the attribute.

2.
Notations to Describe the Relational Schema
• Primary Key – The attribute that uniquely
identifies one tuple in a relation from another.
• Candidate Key – Attribute that can act as
primary key. There can be many candidate
keys on one table. One is chosen as primary
key.
• Foreign Key – An attribute that represents a
relationship with another relation. It is a
primary key of one relation which is included
as an attribute in another relation.
Null Values

• Special value Null can occur in any attribute.

• Has ambiguous meaning.


Ex: for cousellorNo may mean, student
doesn’t have a counsellor or that the
counsellor isn’t known.
Representing 1 : 1 Relationships
Representing 1 : 1 Relationships

Staff

Department
Representing 1 : N Relationships
Representing 1 : N Relationships

Staff

Student
Representing M : N Relationships

Taught at
Location
Representing M : N Relationships

Course

Location
Representing M : N Relationships

Taught at

You might also like