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

Unit 2 Lecture1

The document discusses the relational data model, emphasizing its fundamental elements such as relations (tables), tuples (rows), and attributes (columns). It defines key terminologies and characteristics of relations, including uniqueness, atomicity of values, and the importance of domains in data modeling. Additionally, it highlights the significance of relational models in managing structured data within databases.

Uploaded by

ishita15205
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Unit 2 Lecture1

The document discusses the relational data model, emphasizing its fundamental elements such as relations (tables), tuples (rows), and attributes (columns). It defines key terminologies and characteristics of relations, including uniqueness, atomicity of values, and the importance of domains in data modeling. Additionally, it highlights the significance of relational models in managing structured data within databases.

Uploaded by

ishita15205
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Unit-2

Relational data Model and Language


Relational Model Contd.
• The most fundamental elements in the relational model are relations,
which users and modern RDBMSs recognize as tables.
• A relation is a set of tuples or rows, with each tuple sharing a set
of attributes or columns.
• A domain of possible values represents the data type describing the
types of values that can appear in each column.
• The number of attributes in a relation is called degree or arity.
• SQL (Structured Query Language) has been widely used as the
language for relational database queries.

2
Relational Model Contd.

3
Relational Model Objects
Common Terminologies used in relational model objects are as follows :
-

• Database
• Relation/Table
• Attribute/Field/Column
• Domain
• Record/Row/Tuple
• Degree/Arity
24
Formal Definition - Relation
• A relation (or relation state) r of the relation schema R(A1, A2, … ,
An), also denoted by r(R), is a set of n-tuples r = {t 1, t2, … , tm}.
• Each n-tuple t is an ordered list of n values t =<v1, v2, …,vn>, where
each value vi, 1 ≤ i ≤ n, is an element of dom(Ai) or special NULL
value.
• The ith value in tuple t, which corresponds to the attribute A i, is
referred to as t[Ai] or t.Ai.

25
Characteristics of Relations
• Duplicate tuples must not be present in a relation

• Each tuple must have exactly one data (atomic) value for an attribute

6
Characteristics of Relations
• Each relation in a database must have a distinct or unique name that
would separate it from the other relations in a database.
• A relation must not have two attributes with the same name

27
Characteristics of Relations
• Tuples in a relation do not have to follow a significant order as the
relation is not order-sensitive. Both of these DEPARTMENT relations
are the same.

8
Formal Definition - Attribute

A relation schema R, denoted by R(A1, A2, …, An), comprises a relation


name R and a list of attributes, A1, A2, …, An.
Each attribute Ai is the name of a role played by some domain D in the
relation schema R.
The degree of a relation is the number of attributes n of its relation schema.
For Ex :
STUDENT relation: dom(roll_no): Roll_number; dom(first_name) :Names; dom(middle_name): Names;
dom(last_name): Names; dom(dob) =Dates, dom(gender):Genders, dom(house_no): Address, dom(street_name):
Address, dom(city): City_names, dom(state): State_names, dom(Pincode): Pincodes

29
Formal Definition - Domain
• A domain is the original set of atomic values used to model data.
• Domain can be specified via data type , format , and set of possible values
from which the data values are drawn

Attribute Domain Name Meaning Domain definition


roll_no Roll_Numbers The set of all roll numbers of students character: size 15
first_name First_Names The set of all first names of students character: size 15
middle_ name Middle_Names The set of all middle names of students character: size 15
last_ name Last_Names The set of all last names of students character: size 15
dob Dates_of_Birth The set of all possible values of birth dates of students date, format dd-mm-yyyy
character: size 15
gender Genders The set of all genders
value: Male or Female
house_no House_Numbers The set of all valid house numbers on a street character: size 25
street_name Street_Names The set of all valid street names in a city character: size 25
city City_Names The set of all valid city names in a state character: size 20
state State_Names The set of all valid state names in India character: size 20
pincode Pincode_Numbers The set of all valid Pincode numbers in India character: size 6

30
Importance of Relation Models
• It is best suitable for managing the structured in the database.
• It represent the database as a collection of relations .
• Each row in the table represent a collection of related data value
( when relation is represented in table) .
• The table name and column names are used to help to interpret the
meaning of values in each row

35

You might also like