Thursday, February 19, 2015

Codd's Twelve Rules - Rule 2 - Guaranteed Access Rule


Codd's Twelve Rules - Rule 2 - Guaranteed Access Rule



Rule 2
Guaranteed Access Rule
Rule
Each and every datum (atomic value) is guaranteed to be logically accessible by resorting to a combination of table name, primary key value, and column name.
Description
We must be able to access every single piece of information from the tables in some way. The combination “Table name + Primary key + Column name” must let us find the information what we need. In the case of multiple records in the result, the combination of “Table name + Column name” or the “Table name + * “ would find what we need.
Example
SELECT Emp_Salary FROM Employee WHERE ENo = ‘101’;
          where, Employee is table name, Emp_Salary is required field, and ENo is the primary key.
Some DBMS that fulfills this property
SQL in Oracle, Transact SQL in SQL Server, and SQL in MySQL supports primary keys, and are able to access the data as said above.
 

Go to Home - Codd's Twelve Rules



Codd's Twelve Rules - Rule 3 - Systematic treatment of NULL values


Codd's Twelve Rules - Rule 3 - Systematic treatment of NULL values



Rule 3
Systematic treatment of NULL values
Rule
NULL values (distinct from empty character string or a string of blank characters and distinct from zero or any other number) are supported in the fully relational RDBMS for representing missing information in a systematic way, independent of data type.
Description
This rule demands that we must be able to use a NULL placeholder irrespective of data type used. NULLs are distinct from an empty character string or any other number, and they are always to be considered as unknown values. This rule insists provisions for manipulating NULL values in all the possible ways.
Example
SELECT Emp_Salary FROM Employee WHERE EPhone IS NULL;
          This query should return Emp_Salary if EPhone value is NULL/Not known.
Some DBMS that fulfills this property
Oracle, SQL Server, and MySQL supports NULL values to be handled. They provide mechanisms to handle NULL values like other values.


Codd's Twelve Rules - Rule 7 - High level Insert, Update, and Delete


Codd's Twelve Rules - Rule 7 - High level Insert, Update, and Delete



Rule 7
High level Insert, Update, and Delete
Rule
The capability of handling a base relation or a derived relation as a single operand applies not only to the retrieval of data but also to the insertion, update, and deletion of data.
Description
This rule stresses the set-oriented nature of a relational database. It requires that rows be treated as sets in insert, delete, and update operations. The rule is designed to prohibit implementations that support only row-at-a-time, navigational modification of the database. The SQL language covers this via the INSERT, UPDATE, and DELETE statements.
Example
SQL Server,          MySQL, and Oracle support bulk insert, delete, and update.
          INSERT INTO yourtable VALUES (1,2), (5,5), ...; - this can be used to insert multiple rows at a time in MySQL.
Some DBMS that fulfills this property
SQL Server,          MySQL, and Oracle

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents