0% found this document useful (0 votes)
4 views15 pages

Relational Data Model Overview

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)
4 views15 pages

Relational Data Model Overview

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

Data Base Management System

Relational Data Model : Concepts


Relational Data Model
• The model was first proposed by Dr. E.F. Codd of IBM Research in 1970 in the
following paper: "A Relational Model for Large Shared Data Banks" Communications of
the ACM, June 1970.
 A Relation is a mathematical concept based on the idea of sets.
• Relation : Collection of Rows and Columns.
• Sets : Unordered collection of distinct elements.
 Relational data model is the primary data model, which is used widely around the
world for data storage and Data processing.
Relational Database
 Relational Model represents how data is stored in Relational Databases.
 A Relational Database is a collection of multiple interrelated Relations.
 A relation is made up of two parts: Relation Instance and Relation Schema
 A relational database has following other major components:
1. Table
2. Record/Tuple/Row
3. Field/Column/Attribute
4. Domain
7. Keys
Components

1. Tables (Relation) : A table is a collection of data represented in rows and columns. Each
table has a name in database.
2. Tuple (Row/Record) : A single row of a table, which contains a single record for that
relation is called a tuple. These rows in the table denote a real-world entity or relationship.
3. Attribute (Column/Field) : Attributes are a set of characteristics of the table.
4. Attribute domain : Each attribute has a set of valid values, known as attribute domain.
5. Key : Each row has one or more attributes which can identify the row in the relation (table)
uniquely. Sometimes row-ids or sequential numbers are assigned as keys to identify the rows
in a table Called artificial key or surrogate key.
6. Relation Schema : A Relation schema describes the Relation name, Attributes, and Attribute names.
7. Relation Instance : The data stored in Table at a particular moment of time is called Relation
instance.
Table or Relation

In this Customer table, Cust_ID is the key.

 The Total number of attributes in the relation = degree of the relation = 3


 The Total number of tuples = Cardinality of this relation = 4
Relation Schema
 A Relation schema describes the Relation name, Attributes, and Attribute names.

 The Schema (or description) of a Relation: Denoted by R(A1, A2, .....An)


 Where, R is the name of the relation
 The attributes of the relation are A1, A2, ..., An
 Degree (or arity) of a relation is the number of attributes n of its relation schema

 E.g: CUSTOMER (Cust-id, Cust-name, Address, Phone_No,Gender)


• Where, CUSTOMER is the relation name which is defined over the four attributes: Cust-id, Cust-
name, Address, Phone_No
• For example, the domain of Gender is {Male, Female}.
Relation Instance

 A finite set of tuples in the relational database system represents relation instance.
 The data stored in Table at a particular moment of time is called Relation instance.
 The Relation Schema: Branch (BranchNo, Street, City, PostalCode )
 The Relation Instance:
• (B005, 55 Jln Dobi, Johor Bahru, 80100)
• (B006, 55 Jalan Perai, Johor Bahru, 80000)
 Relation instances do not have duplicate tuples.
 The relation instance change when tuple is updated, deleted or inserted.
Codd’s Rule For
RDBMS
 Dr. Edgar Frank Codd, after his extensive research on the Relational Model of
database systems, came up with 13 rules of his own, numbered from 0 to 12.
 These rules are Theoretical basis for Relational Databases.
 According to him, if a DBMS meets these rules, it can be called RDBMS.
 But none of the database follows all these rules; but obeys to some extent.
• For example, oracle follows only 8.5 Codd’s rules.
Other 12 Rules are derived from this Rule.
Consider a “Student” Relation-
Roll_No Name Age
201 x 10

202 y 12
Student:

Roll_ Nam Age


No e
201 x 10
202 y 12
Diff erence
Between
DBMS and
RDBMS
DBMS is a software that is used to define, create and maintain a
database and provides controlled access to the data and RDBMS is an
advanced version of a DBMS.
Database Management System (DBMS) Relational Database Management System
(RDBMS)
DBMS stores data as file. RDBMS stores data in tabular form.
Multiple data elements can be accessed at the
Data elements need to access individually.
same time.
Data is stored in the form of tables which are
No relationship between data.
related to each other.
Normalization is not present. Normalization is present.
DBMS does not support distributed database. RDBMS supports distributed database.
It uses a tabular structure where the headers are
It stores data in either a navigational or
the column names, and the rows contain
hierarchical form.
corresponding values.
Database Management System (DBMS) Relational Database Management System
(RDBMS)
Keys and indexes do not allow Data
Data redundancy is common in this model.
redundancy.
It is used for small organization and deal with
It is used to handle large amount of data.
small data.
It supports single user. It supports multiple users.
Data fetching is slower for the large amount of Data fetching is fast because of relational
data. approach.
The data in a DBMS is subject to low security There exists multiple levels of data security in
levels with regards to data manipulation. a RDBMS.
Low software and hardware necessities. Higher software and hardware necessities.
Examples: MySQL, PostgreSQL, SQL Server,
Examples: XML, Microsoft Access, etc.
Oracle, etc.

You might also like