Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
sql9_normalization_and_acid_ propertys

sql9_normalization_and_acid_ propertys

Ratings: (0)|Views: 4|Likes:
Published by bookworm_shashi

More info:

Published by: bookworm_shashi on Sep 11, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

05/09/2014

pdf

text

original

ACID properties of databases
Description of the properties
ACID stands for
\u2022
Atomicity
\u2022
Consistency
\u2022
Isolation
\u2022
Durablity
Atomicity

It states that database modifications must follow an \u201call or nothing\u201d rule. Each transaction is said to be \u201catomic.\u201d If one part of the transaction fails, the entire transaction fails. It is critical that the database management system maintain the atomic nature of transactions in spite of any DBMS, operating system or hardware failure.

Consistency

It states that only valid data will be written to the database. If, for some reason, a
transaction is executed that violates the database\u2019s consistency rules, the entire
transaction will be rolled back and the database will be restored to a state consistent with
those rules. On the other hand, if a transaction successfully executes, it will take the
database from one state that is consistent with the rules to another state that is also
consistent with the rules.

Isolation

It requires that multiple transactions occurring at the same time not impact each other\u2019s
execution or One transaction does not interfere with another. The 'executor' of a
transaction has the feeling that he has the entire database for himeself.

Durablity

A commited(Saved) transaction will not be lost. Durability is ensured through the use of
database backups and transaction logs that facilitate the restoration of committed
transactions in spite of any subsequent software or hardware failures.

Normalization:

Database normalization can essentially be defined as the practice of optimizing table
structures. Normalization helps us to elimate redundant data and to store the data we have
in a manner that makes sense. Atomicity also must be maintained in tables via
normalization. Normalization helps us to create atomic tables by removing redundant
data within rows of a table, thus creating atomic tables.

Denormalized Data

Let\u2019s take a look at some denormalized data. I\u2019m going to use the simplest example that
comes to mind, and that is a auto repair shop that specializes in domestic automobiles
(domestic to the US, that is). Our table lists automobile manufactuers and the makes of
automobiles they manufactuer that the shop services.

Fig. 1
Manufactuer
Make 1
Make 2
Make 3
Ford
Mercury
Lincoln
Ford
GM
Chevrolet
Pontiac
Saturn, Buick
Chrysler
Dodge
Normal Forms:
First Normal Form (1NF)
We want to take fig. 1 and normalize it a bit. Before we can do that, we need to know
what the rules of 1NF are. There are 2 rules to 1NF.
\u2022
Remove duplicate columns.
\u2022
Each column by row position must have a unique value.

As you can see, 1NF is already enforcing the atomic nature of a table. So first we need to
remove duplicate columns from the table, at the same time creating column by row
positions that have unique values, which means we also have to seperate Saturn, Buick
into individual values.

Fig. 2
Manufactuer
Make
Ford
Mercury
Ford
Lincoln
Ford
Ford
GM
Chevrolet
GM
Pontiac
GM
Saturn
GM
Buick
Chrysler
Dodge
Second Normal Form (2NF)

For each level of normal form, the next level must adhere to the rules of the previous
level, in addition to adding its own rules. This means in order to create a data structure
that meets the requirements of 2NF, we must first meet the requirements of 1NF. We
have already discussed the rules for 1NF, so let\u2019s look at the rules required to meet 2NF.

\u2022
Remove duplicate data in a single column and place the data in seperate tables.
\u2022
Create relationships between the sets of data.
Manufactuer Table
ManufactuerId
Manufactuer
1
Ford
2
GM

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->