You are on page 1of 4

Codd’s rule

Codd's Rule for Relational DBMS


Rule zero: Able to manage entire database relationally.
Rule 1: Information rule- data is stored in cells of tables.
Rule 2: Guaranteed Access: Each unique piece of data should be accesicible by
Table Name + Primary Key + Attribute
Rule 3: Systematic treatment of NULL
Rule 4: Active Online Catalog
Rule 5: Powerful and Well-Structured Language
Rule 6: View Updation Rule
Rule 7: Relational Level Operation
Rule 8: Physical Data Independence
Rule 9: Logical Data Independence
Rule 10: Integrity Independence-able to enforce its own integrity
Rule 11: Distribution Independence
Rule 12: Nonsubversion Rule- lower level access should not by pass integrity

Tuple: Row
Attribute:
Attribute Domain
When an attribute is defined in a relation(table), it is defined to hold only a certain type of
values, which is known as Attribute Domain. Hence, the attribute Name will hold the name
of employee for every tuple.
Relation Schema: A relation schema describes the structure of the relation, with the name of
the relation(name of table),
its attributes and their names and type.
Relation Key
A relation key is an attribute which can uniquely identify a particular tuple(row) in a
relation(table).
Relational Integrity Constraints
Every relation in a relational database model should abide by or follow a few constraints to be a
valid relation, these constraints are called as Relational Integrity Constraints.
The three main Integrity Constraints are:
• Key Constraints
• Domain Constraints
• Referential integrity Constraints

Key Constraints ( Key attribute.)


The Key Constraint specifies that there should be such an attribute(column) in a relation(table),
which can be used to fetch data for any tuple(row).
The Key attribute should never be NULL or same for two different row of data.
Domain Constraint
Domain constraints refers to the rules defined for the values that can be stored for a certain
attribute.
Referential Integrity Constraint
Database Design Objective
 Eliminate Data Redundancy: the same piece of data shall not be stored in more than one
place. This is because duplicate data not only waste storage spaces but also easily lead
to inconsistencies.
 Ensure Data Integrity and Accuracy:
Relational Database Design Process
 Step 1: Define the Purpose of the Database (Requirement Analysis) ...
 Step 2: Gather Data, Organize in tables and Specify the Primary Keys. ...
 Step 3: Create Relationships among Tables. ...
 Step 4: Refine & Normalize the Design.
Primary Key
Choose one column (or a few columns) as the so-called primary key, which uniquely
identify the each of the rows.
In the relational model, a table cannot contain duplicate rows, because that would create
ambiguities in retrieval. To ensure uniqueness, each table should have a column (or a set of
columns), called primary key, that uniquely identifies every records of the table.

You might also like