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

Lecture 4

The document outlines Codd's Twelve Commandments for relational database management systems, detailing essential rules for database structure and integrity. It also introduces the Unified Modeling Language (UML) as a tool for visualizing software design, emphasizing its importance in facilitating communication among teams. Additionally, it covers integrity rules such as entity integrity and referential integrity, which are crucial for maintaining accurate and reliable database records.

Uploaded by

zainab.haider
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)
4 views

Lecture 4

The document outlines Codd's Twelve Commandments for relational database management systems, detailing essential rules for database structure and integrity. It also introduces the Unified Modeling Language (UML) as a tool for visualizing software design, emphasizing its importance in facilitating communication among teams. Additionally, it covers integrity rules such as entity integrity and referential integrity, which are crucial for maintaining accurate and reliable database records.

Uploaded by

zainab.haider
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/ 7

DATABASE SYSTEMS

2rd Class, Dept. Cyber Security Eng


1st Semester
Lecture 4
Assist.Lect:Zainab mohammed &Zainab haider

1|Page
-Codd’s rules

Codd's Twelve Commandments are a set of thirteen rules (numbered from


zero to twelve) by Edgar F. Codd, a pioneer of the relational model of
databases, designed to specify what is required of a database management
system in order to be considered a relational, i.e., a relational database
management system (RDBMS). They are sometimes referred to as "Codd's
Twelve Commandments".

Rule 0: The Foundation Rule

The database must be in relational form. So that the system can handle the
database through its relational capabilitie

Rule 1: Information Rule

2|Page
A database contains various information, and this information must be stored
in each cell of a table in the form of rows and columns

Rule 2: Guaranteed Access Rule

Every single or precise data (atomic value) may be accessed logically from a
relational database using the combination of primary key value, table name,
and column name

Rule 3: Systematic Treatment of Null Values

This rule defines the systematic treatment of Null values in database records.
The null value has various meanings in the database, like missing the data,
no value in a cell, inappropriate information, unknown data and the primary
key should not be null

Rule 4: Active/Dynamic Online Catalog based on the relational model

It represents the entire logical structure of the descriptive database that must
be stored online and is known as a database dictionary. It authorizes users to
access the database and implement a similar query language to access the
database

Rule 5: Comprehensive Data Sub Language Rule

The relational database supports various languages, and if we want to access


the database, the language must be the explicit, linear or well-defined
syntax, character strings and supports the comprehensive: data definition,
view definition, data manipulation, integrity constraints, and limit
transaction management operations. If the database allows access to the data
without any language, it is considered a violation of the database

Rule 6: View Updating Rule

All views table can be theoretically updated and must be practically updated
by the database systems.

Rule 7: Relational Level Operation (High-Level Insert, Update and delete)


Rule

3|Page
A database system should follow high-level relational operations such as
insert, update, and delete in each level or a single row. It also supports
union, intersection and minus operation in the database system

Rule 8: Physical Data Independence Rule

All stored data in a database or an application must be physically


independent to access the database. Each data should not depend on other
data or an application. If data is updated or the physical structure of the
database is changed, it will not show any effect on external applications that
are accessing the data from the database

Rule 9: Logical Data Independence Rule

It is similar to physical data independence. It means, if any changes occurred


to the logical level (table structures), it should not affect the user's view
(application). For example, suppose a table either split into two tables, or
two table joins to create a single table, these changes should not be impacted
on the user view application

Rule 10: Integrity Independence Rule

A database must maintain integrity independence when inserting data into


table's cells using the SQL query language. All entered values should not be
changed or rely on any external factor or application to maintain integrity. It
is also helpful in making the database-independent for each front-end
application

Rule 11: Distribution Independence Rule

The distribution independence rule represents a database that must work


properly, even if it is stored in different locations and used by different end-
users. Suppose a user accesses the database through an application; in that
case, they should not be aware that another user uses particular data, and the
data they always get is only located on one site. The end users can access the
database, and these access data should be independent for every user to
perform the SQL queries

Rule 12: Non Subversion Rule

4|Page
The non-submersion rule defines RDBMS as a SQL language to store and
manipulate the data in the database. If a system has a low-level or separate
language other than SQL to access the database system, it should not subvert
or bypass integrity to transform data

-Introduction to UML

What is UML?
Unified Modeling Language (UML) is a standardized visual modeling
language used in the field of software engineering to provide a general-
purpose, developmental, and intuitive way to visualize the design of a
system. UML helps in specifying, visualizing, constructing, and
documenting the artifacts of software systems.

Why do we need UML?


 Complex applications need collaboration and planning from multiple
teams and hence require a clear and concise way to communicate
amongst them.
 Businessmen do not understand code. So UML becomes essential to
communicate with non-programmers about essential requirements,
functionalities, and processes of the system.
 A lot of time is saved down the line when teams can visualize processes,
user interactions, and the static structure of the system.

5|Page
Steps to create UML Diagrams

-INTEGRITY RULES

Relational database integrity rules are very important to good database


design. Many RDBMS enforce integrity rules automatically. Those rules are:

1-ENTITY INTEGRITY

All primary key entries are unique, and no part of primary key may
be null. Each row will have a unique identity, and foreign key values
can properly reference primary key values, for example... No invoice
can have a duplicate number, nor can it be null. In short, all invoices
are uniquely identified by their invoice number.

2-REFERENTIAL INTEGRITY

A foreign key may have either a null entry, as long as it is not a part
of its table's primary key, or an entry that matches the primary key

6|Page
value in a table to which it is related.(every non –null foreign key
value must reference an existing primary key value).It is possible for
an attribute not to have corresponding value, but it will be impossible
to have an invalid entry. for example, A Customer might not yet have
an assigned sales representative(number),but it will be impossible to
have an invalid sales representative(number).

To avoid nulls, some designers use special codes, known as flags, to indicate
the absence of some value.

7|Page

You might also like