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

Introduction to Relational Model

The document introduces the Relational Model and Codd's Rules in Database Management Systems (DBMS), detailing its structure, advantages, and key terminologies. It outlines Codd's 12 rules that define the requirements for a true relational database, emphasizing data integrity and accessibility. Additionally, it discusses the limitations of modern systems in fully complying with these rules and the shift towards NoSQL databases.

Uploaded by

hakurap112005
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Introduction to Relational Model

The document introduces the Relational Model and Codd's Rules in Database Management Systems (DBMS), detailing its structure, advantages, and key terminologies. It outlines Codd's 12 rules that define the requirements for a true relational database, emphasizing data integrity and accessibility. Additionally, it discusses the limitations of modern systems in fully complying with these rules and the shift towards NoSQL databases.

Uploaded by

hakurap112005
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

G. H.

Raisoni College of Engineering, Nagpur


Department Of Artificial Intelligence

Introduction of Relational Model and Codd


Rules in DBMS
Group Members

1. Arju Thakur (05)


2. Abhijeet Moghe (18)
3. Rutuj Langde (45)

Guided by:- Prof. Anirudh Bhagwat


INDEX

Sr No. Topic
1 Introduction to relational model

2
Example of relational model
3 Important Terminologies

4 Advantage and Disadvantages of the Relational Model

5 Codd Rules in Relational Model


Introduction to relational model

⮚ Proposed by E.F. Codd: The Relational Model was


introduced by E.F. Codd to structure data in the form of
relations (tables).
⮚ ER Diagram to Relational Model: After designing the
conceptual database using an ER diagram, it is
converted into a relational model, which can be
implemented using RDBMS languages like SQL.
⮚ Data Representation in Tables: The Relational Model
uses a collection of tables. Tables (or relations) consist
of rows (records) and columns (attributes), with each
column having a unique name.
⮚ Widely Used Data Model: The Relational Model is the
most commonly used database model, forming the
foundation of the majority of database systems today.
Example of Relational model
Important Terminologies

⮚ Attribute: Attributes are the properties that define an entity.


e.g.; ROLL_NO, NAME, ADDRESS
⮚ Relation Schema: A relation schema defines the structure of the relation and
represents the name of the relation with its attributes. e.g.; STUDENT
(ROLL_NO, NAME, ADDRESS, PHONE, and AGE) is the relation schema for
STUDENT. If a schema has more than 1 relation, it is called Relational Schema.
⮚ Tuple: Each row in the relation is known as a tuple.
⮚ Degree: The number of attributes in the relation is known as the degree of the
relation.
⮚ Cardinality: The number of tuples in a relation is known as cardinality.
⮚ NULL Values: The value which is not known or unavailable is called a NULL
value. It is represented by blank space
Advantage and Disadvantages of the
Relational Model
Introduction to Codd’s Rule

● What are Codd's 12 Rules?


○ A set of guidelines proposed by E.F. Codd in 1985 to define what a true
Relational Database Management System (RDBMS) should comply with.
● Purpose:
○ Ensure data consistency, integrity, and independence.
○ Set the foundation for modern relational databases.
● Key Focus Areas:
○ Data representation in tables.
○ Data accessibility and independence.
○ Handling null values, integrity, and view management.
● Significance:
○ These rules laid the groundwork for the development of relational databases
like SQL-based systems (MySQL, PostgreSQL, Oracle).
Codd’s Rules 1,2
1. The Foundation Rule 2. The Information Rule

Definition: All information (data and metadata) is Definition: Every data element must be accessible by
represented explicitly as values in tables. specifying the table name, primary key, and column
name.
Explanation: In a relational database, everything,
including the schema (structure), should be stored in Explanation: The DBMS should allow direct access to
tables. any piece of data using a combination of table name,
row identifier (primary key), and attribute (column).
Importance: This ensures data is stored in a
standardized, structured way, accessible through Importance: Ensures that data is organized in a
queries. predictable way and no hidden data can exist.

Example: A customer’s information is stored as rows Example: You can retrieve a customer’s email by
in a table where columns represent different attributes specifying the table name (Customer), primary key
(Name, Age, Address). (CustomerID), and attribute (Email).
Codd’s rules 3,4
3. Systematic Treatment of NULL Values 4. Dynamic Online Catalog Based

Definition: The system must support NULL Definition: The database schema and structure
values (representing missing or inapplicable data) should also be stored in relational tables and
and treat them systematically. accessible via SQL queries.

Explanation: A NULL represents the absence of a Explanation: The catalog (or metadata) that
value and should be treated differently from a describes the structure of the database should be
blank or zero. It must be consistently handled queryable just like any other data.
across the DBMS.
Importance: Allows the database structure to be
Importance: Ensures that missing data is explored and manipulated programmatically.
recognized but not confused with valid data.
Example: Retrieving table structure information
Example: In a customer database, a missing (like column names, data types) using SQL queries.
phone number should be marked NULL, not an
empty string.
Codd’s Rules 5, 6
5. The Comprehensive 6. The View Updating Rule
Data Sublanguage Rule

Definition: The system must support a comprehensive Definition: All views (virtual tables derived from base
language for data definition, manipulation, and querying tables) must be updatable, as long as the update doesn’t
(like SQL). violate integrity constraints.

Explanation: A relational database should have a well- Explanation: Views allow users to see a subset of data. If a
defined query language that allows the user to define the view represents data from a single table, it should be
schema, insert/update/delete data, and perform queries. possible to update that view.

Importance: Provides a standard and unified way to Importance: Provides flexibility by allowing users to work
interact with the database. with different views of the same data.

Example: SQL is the most widely used comprehensive Example: If you have a view that shows only employees in
language for relational databases. a specific department, you should be able to update the
salary of an employee directly through that view.
Codd’s Rules 7,8
7. Possible for High-Level 8. Physical Data
Insert, Update, and Delete Independence

Definition: The system must support high-level Definition: Changes in the physical storage of the data (like
operations like inserting, updating, and deleting data how it is stored on disk) should not affect how the data is
in multiple rows simultaneously. accessed and manipulated logically.

Explanation: A relational DBMS should allow users Explanation: Users should not need to know or be concerned
to operate on sets of rows at once (set-at-a-time) with how the data is physically stored. The DBMS should
rather than requiring procedural row-by-row handle that abstraction.
operations.
Importance: Ensures that the system can evolve (storage
Importance: Makes data manipulation more optimizations) without affecting applications that use the
efficient and less error-prone. database.

Example: In SQL, you can update the salary for all Example: Changing the way customer data is partitioned across
employees in a department with a single command. storage disks should not affect how the application queries
customer information.
Codd’s Rules 9,10
10.Integrity Independence 9. Logical Data Independence

Definition: Integrity constraints must be stored and Definition: Changes to the logical structure (e.g.,
enforced independently of application programs. adding or modifying columns) should not affect the
way data is accessed unless it directly relates to that
Explanation: Integrity rules, such as foreign keys, change.
primary keys, and constraints (e.g., age must be > 18),
should be defined in the DBMS and not at the Explanation: Applications accessing the data should
application level. remain unaffected if the schema is modified, such as
adding a new column or modifying a table structure.
Importance: Ensures that data integrity is maintained
across all applications and not reliant on external Importance: Allows the database structure to evolve
programs. without breaking existing applications.

Example: A foreign key constraint between two tables Example: Adding a new “MiddleName” column to a
should be enforced by the DBMS, preventing invalid customer table should not affect queries that only use
data entry, regardless of how the data is being accessed FirstName and LastName.
or inserted.
Codd’s Rules 11,12
12. The Non-subversion
11. Distribution Independence
Rule

Definition: The system should work the same whether data is Definition: If a relational system has any low-level access
distributed across multiple locations or stored in a single methods (e.g., direct record access), they must not be able to
location. bypass relational integrity rules or constraints.

Explanation: A user should not need to know whether the Explanation: The DBMS should ensure that even low-level
data is distributed across different databases or located operations (like direct record manipulation) must follow the
centrally. same integrity constraints as high-level operations (like SQL
queries).
Importance: Enables scalability and distributed systems Importance: Prevents corrupting the data or bypassing
without affecting data access or integrity. integrity rules.

Example: A DBMS should allow seamless querying and Example: Direct file access should not allow a user to violate
updating, even if the data is distributed across multiple primary key constraints.
servers.
Importance of Codd’s Rules in Modern
Databases

Ensures Relational Integrity:

● Codd's rules enforce a consistent and standardized approach to managing data.

Widespread Adoption in SQL Databases:

● Major RDBMS systems like Oracle, MySQL, PostgreSQL, and SQL Server have
adopted Codd's principles.

Impact on Data Management:

● Codd’s rules continue to influence how data is modeled, queried, and maintained.a
Limitations and Challenges

Modern Systems Don't Fully Comply:

● Not all relational databases strictly adhere to all 12 rules due to practical
limitations.
● Example: Some systems do not fully support view updating or integrity
constraints independent of applications.

Shift Toward NoSQL Databases:

● Newer database systems like NoSQL prioritize flexibility, scalability, and


handling unstructured data, which are not strictly bound by relational rules.
Thank You!

You might also like