0% found this document useful (0 votes)
6 views13 pages

DBMS 9

The document outlines the Relational Model in database management, emphasizing its structure of tables, relationships, and attributes. It discusses key concepts such as data integrity, normalization, and various database languages including DDL, DML, DCL, and TCL. Additionally, it details Codd's 12 rules that define the requirements for a database management system to be considered relational.

Uploaded by

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

DBMS 9

The document outlines the Relational Model in database management, emphasizing its structure of tables, relationships, and attributes. It discusses key concepts such as data integrity, normalization, and various database languages including DDL, DML, DCL, and TCL. Additionally, it details Codd's 12 rules that define the requirements for a database management system to be considered relational.

Uploaded by

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

Relational Model

Dr.Sharmistha Roy

Database Management Relational Model

Relational Database

System 9 Relational Data


Integrity

Relational Model Database Languages

CODD’s Rules

Dr. Sharmistha Roy


FCIT,
Usha Martin University
9.1
Relational Model
Relational Model
Dr.Sharmistha Roy

• Relational data model is the primary data model for Relational Model

Relational Database
commercial data- processing applications
Relational Data
• A relational database consists of a collection of tables, Integrity

Database Languages
each of which is assigned a unique name
CODD’s Rules
• A row in a table represents a relationship among a set of
values. Thus, a table is an entity set and a row is an entity
• The columns or properties are called attributes
• For each attribute, there is a set of permitted values, called
the domain of that attribute. Same domain can be shared
by more than one attribute
• Degree is the number of attributes in the relation/ table,
where as Cardinality is the number of tuples or rows in the
relation/table
• The attribute values are required to be atomic, i.e.
indivisible

9.2
Relational Model
Relational Model...
Dr.Sharmistha Roy

Relational Model
• Let D1 , D2 , and D3 are the domains. Any row of the table
Relational Database
consists of a 3-tuple (v1 , v2 , v3 ) where v1 ∈ D1 , v2 ∈ D2
Relational Data
and v3 ∈ D3 . Thus, the table will contain only a subset of Integrity

the set of all possible rows. Therefore, the table is a subset Database Languages

of D1 x D2 x D3 CODD’s Rules

• Each attribute of a relation has a unique name


• NULL Value is a domain value which is a member of any
possible domain
• Database Schema is the logical design of the database. If
(a1 , a2 ...an ) be the attributes, then the relation schema will
be R=(a1 ,a2 ...an )
• Database Instance is the snapshot of the data in the
database at a given instant of time
• Relation is denoted by lower case names and Relation
Schema is the name beginning with an uppercase letter

9.3
Relational Model
Relational Database
Dr.Sharmistha Roy

Relational Model

Relational Database

Relational Data
Integrity

Database Languages
Relational Database
CODD’s Rules
Relational database is a database consisting of multiple
relations or tables. The information about an enterprise is
broken up into parts, with each relation storing one part of the
information

The normalization process deals with how to design relational


schemas

9.4
Relational Model
Relational Data Integrity
Dr.Sharmistha Roy

Relational Data Integrity


Candidate key is an attribute or set of attributes that can Relational Model

Relational Database
uniquely identify a row or tuple in a table. Let R be the relation
Relational Data
with attributes a1 , a2 ... an . The set of attributes of R is said to Integrity

be a candidate key of R iff the following two properties holds: Database Languages

CODD’s Rules
• Uniqueness: At any given time, no two distinct tuples or
rows of R have the same value for ai , the same value for aj
...an
• Minimality: No proper subset of the set (ai , aj ... an ) has
the uniqueness property

The major types of integrity constraints are:


1. Domain Constraints

• All the values that appear in a column of a relation must be


taken from the same domain
• This constraint can be applied by specifying a particular
data type to a column
9.5
Relational Model
Relational Data Integrity...
Dr.Sharmistha Roy

2. Entity Integrity
Relational Model

• The entity integrity rule is designed to assure that every Relational Database

Relational Data
relation has a primary key, and that the data values for that Integrity

primary key are all valid Database Languages

CODD’s Rules
• Usually, the primary key of each relation is the first column
• Entity integrity guarantees that every primary key attribute
is NOT NULL
• Primary key performs the unique identification function in a
relational model

3. Referential Integrity

• In relational data model, associations between tables are


defined by using foreign keys
• A referential integrity constraint is a rule that maintains
consistency among the rows of two relations

9.6
Relational Model
Relational Data Integrity...
Dr.Sharmistha Roy

Relational Model
3. Referential Integrity...
Relational Database

Relational Data
• The rule states that if there is a foreign key in one relation, Integrity

either each foreign key value must match a primary key Database Languages

value in the other table or else the foreign key value must CODD’s Rules

be NULL
• A foreign key that references its own relation is known as
recursive foreign key
• The linking between the foreign key and primary key
allows a set of relations to form an integrated database

4. Operational Constraints

• These are the constraints enforced in the database by the


business rules or real world limitations

9.7
Relational Model
Database Languages
Dr.Sharmistha Roy
DDL (Data Definition Language)
Relational Model
• DDL is used to define the conceptual schema. The
Relational Database
definition includes the information of all the entity sets and Relational Data
their associated attributes as well as the relationships Integrity

Database Languages
between the entity sets
CODD’s Rules
• The data values stored in the database must specify
certain consistency constraints. The database systems
check these constraints every time the database is
updated
• The output of the DDL is placed in the Data Dictionary
which contains the metadata (data about data)
• The data dictionary is considered to be a special type of
table, which can only be accessed and updated by the
database system itself
• The database system consults the data dictionary, before
querying or modifying the actual data, for the validation
purpose
• CREATE, ALTER, DROP, RENAME & TRUNCATE
9.8
Relational Model
Database Languages...
Dr.Sharmistha Roy

DML (Data Manipulation Language)


Relational Model
• DML is used to manipulate data in the database Relational Database

• A query is a statement in the DML that requests the Relational Data


Integrity
retrieval of data from the database Database Languages

• SELECT, INSERT, UPDATE & DELETE CODD’s Rules

DCL (Data Control Languages)

• DCL allows in changing the permissions on database


structures
• GRANT & REVOKE

TCL (Transaction Control Language)

• TCL allows permanently recording the changes made to


the rows stored in a table or undoing such changes
• COMMIT, ROLLBACK & SAVEPOINT
9.9
Relational Model
CODD’s Rules
Dr.Sharmistha Roy
Codd’s rules are a set of 12 rules proposed by E. F. Codd
designed to define what is required from a database
Relational Model
management system in order for it to be considered relational,
Relational Database
i.e. RDBMS. Any database that satisfies even six rules may be Relational Data
categorized as RDBMS Integrity

Database Languages
Rule0 CODD’s Rules

A relational system should be able to manage databases,


entirely through its relational capabilities

Rule1: Information representation


The entire information is explicitly and logically represented by
the data values of the tables in the relational data model

Rule2: Guaranteed access


In relational model, at each cell, i.e. the interaction of each row
and column, it will have one and only one value of data (or
NULL value). Each value of data must be addressable via the
combination of a table name, primary key value and the
column name
9.10
Relational Model
CODD’s Rules...
Dr.Sharmistha Roy

Rule3: Systematic treatment of NULL values Relational Model

NULL values are supported in fully relational DBMS for Relational Database

Relational Data
representing missing information and inapplicable information Integrity
in a systematic way independent of data type Database Languages

CODD’s Rules

Rule4: Database description rule


The database description is represented at the logical level in
the same way as ordinary data, so that authorized users can
apply the same relational language to its interrogation as they
apply to the regular data. This means, the RDBMS should have
a data dictionary

Rule5: Comprehensive data sub-language


The RDBMS should have its own extension of SQL. The SQL
should support Data Definition, View Definition, Data
Manipulation, Integrity Constraint, and Authorization

9.11
Relational Model
CODD’s Rules...
Dr.Sharmistha Roy
Rule6: Views updation
All views that are theoretically updatable are also updatable by Relational Model

the system. Similarly, the views which are theoretically Relational Database

Relational Data
non-updatable are also non-updatable by the database system Integrity

Database Languages

Rule7: High-level update, insert, deletes CODD’s Rules

A RDBMS should not only support retrieval of data as


relational sets, but should also support insertion, updation and
deletion of data as a relational set

Rule8: Physical data independence


Application programs and terminal activities are not disturbed if
any changes are made either in storage representations or
access methods

Rule9: Logical data independence


User programs and the user should not be aware of any
changes to the structure of the tables such as the addition of
extra columns
9.12
Relational Model
CODD’s Rules...
Dr.Sharmistha Roy
Rule10: Distribution independence
A relational DBMS has distribution independence. The RDBMS Relational Model

may spread across more than one system and across several Relational Database

Relational Data
networks. However to the end-user, the tables should appear Integrity

no different to those that are local Database Languages

CODD’s Rules

Rule11: Integrity rule


Integrity rules must be supported by the relational data
sub-language; they can be stored in the catalogue and not in
the application program. Entity integrity: no component of a
primary key may have a NULL value. Referential integrity: for
every unique non-null ’foreign key’ values in the database,
there should be a matching primary key value from the same
domain

Rule12: Data integrity cannot be subverted


If a relational system has a low-level language, that low level
cannot be used to subvert or bypass the integrity rules and
constraints expressed in the higher level relational language
9.13

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy