Normalization :Un-normalized File :emp_no 211 211 211 301 301 emp_name Arnold Arnold Arnold Jim Jim

store_branch Downtown Downtown Downtown Fashion Square Fashion Square department Hardware Hardware Hardware Home appliance Home appliance item_no TR100 SA10 PT65 TT14 DS104 item_name Router Saw Drill Plates Dishwasher price 35 19 21 114 262

Before appalling data into any data model of a database system, the data has to be analyzed, required by the system for DD (Data Dictionary). One of the most useful methods of analyzing data has developed from research into relational databases, particularly the work of E. F. Codd, is method of analyzing data is called normalizations. 1NF :The first page of normalization is to reduce the data to its 1NF by removing repeating items and showing them as separate records by including in them key field to the original record. 2NF :The next stage of reduction to the 2NF is to check that all the items, incase record, are entirely dependent on the key of the record, but on partially dependent on the composite key, then it is reduced with its key to form another record. This is done until each records contains data items which are entirely dependent on the key of there records. 3NF :In 3NF, you will check that any data item is mutually dependent on a data item which is not a key, then remove these two data items and form a table where first data item will be the key field and also it will stay in the original table. emp (#emp_no, emp_name, store_branch, department) item (#emp_no, #item_no, item_name, price)

1NF

Candidate key Now we view that the field item name is not wholly dependent on the composite key (#emp_no, #item_no – Candidate key), it is partially dependent on the item_no, so we form a new table with name item_mast with two fields (#item_no, item_name) where item_no is the primary key. emp (#emp_no, emp_name, store_branch, department) item (#emp_no, #item_no, price) item_mast (#item_no, item_name)

2NF

Now, we check in the above tables (in 2NF from tables), any attribute is dependent on a non key attribute, if there exist that a attribute (a) is dependent on a non key attribute (b) then we from a new table with b as a key and a as a simple field (non key attribute), for the sake of the example purpose we assume that the department field is dependent on the store_branch then the table of 3NF will be :emp (#emp_no, emp_name, store_branch, department) item (#emp_no, #item_no, price) item_mast (#item_no, item_name) store (#store_branch, department)

3NF

we will use the term relver (relational variable) as a convenient shorthand for relation variable. Conceder the following example that we deleted those record whose employee id is E4, indeed, the delete operation is question is basically just short hand for a certain relational assignment operation that might look something like EMP := EMP MINUS (EMP where EMP # = 'E4');

Status) S# City City Status FD for relver SC FD for relver CS On the other hand CS and SC are in BCNF. R be a relver. Qty S# P# City Status Fig :. the set of B values matching a given (a value. First contains 3 determinants namely {S#}. P#} is a candidate key. C value) pair depends only on A value and is independent of the C value. because in each case the sole candidate key is the only determinant in the relver. then we say that B is multi dependent on A – in symbol A →→ B. A. Green Basic Mechanics . and C are subset of the attributes of R. then we say that Y is functionally dependent on X – is symbols x → y. {S#. Qty) Primary Key (S#. If and only if every possible legal value of R.FDs for relver first Before considering the relver first. because every tupple of the relation with a given S# value as a same city value. Of these only {S#.In analogous fashion. Status. Functional Dependency :SPC S# CITY P# Qty S1 London P1 100 S1 London P2 100 S2 Paris P1 200 S2 Paris P2 200 S3 Paris P2 300 S4 London P2 400 S4 London P4 400 S4 London P5 400 Let. Multi-value Dependency :Let. P#} → {Qty} {S#. P#). and let. also not in BCNF. of course. P#} and {City}. P#. r be a relation and let. CTX Course Teacher Text Physics Prof. City) CS (City. relational insert and update operations are also basically short hand for certain relational assignments. SC (S#. X and Y are arbitrary subsets of the set of attributes of r. P#} → {city} Etc. For example the relation SPC satisfies the FD {S#} → {city} {S#. The left and right hand sides of an FD are sometimes called the determinant and the dependent respectively. so first is not BCNF. For {S#} → {city}. which are not in 3NF. Boyce Code Normal Form (BCNF):A relver is in BCNF if and only if the only determinants are candidate keys. B. City. First (S#.

Physics Prof. Join Dependencies and 5NF :we have tacitly assume that the sole operation necessary or available in the farther normalization process is the replacement of the relver in a non loss way by exactly two of its projections. although a course does not have a course → Teacher does not hold – nevertheless. B. t2. C}. Observe that for a given course. (c. Teacher} and CX {Course. (c. to discover that there exist relvers that cannot be non loss decompose into two projections but can be non loss decompose into three (or more). Text : x} appears in CTX if and only if Course : c can be thought by Teacher : t and uses Text : x as a reference. Green Basic Mechanics Math Prof. Brown Physics Principal of optics Math Prof. t2. since it involve an MVD that is not an FD. Brown Basic Mechanics Physics Prof. Intuitively what these MDV means is that. By well defined here we mean more preciously. The second MVD Course →→ Text is interpreted analogously. Green Physics Basic Mechanics Physics Prof. all possible combinations of teacher and text appear. t1. x2) both appear also. MVDs always go together in pairs in this way. It should be appear that relver CTX involves a good deal of redundancy. that is CTX satisfies the (relver) constraints. For these reason it is common to represent them both in one statement. the MVD A →→ B holds if and only if the MVD A →→ C also holds. each course does have a well define set of corresponding teachers. It is easy to show that given relver R {A. that for a given course c and a given text x. Let. SPJ S# P# J# S1 P1 J2 S1 P2 J1 S2 P1 J1 S1 P1 J1 SP PJ JS S# P# P# J# J# S# S1 P1 P1 J2 J2 S1 . CT CX Course Teacher Course Text Physics Prof. Green Principal of optics Physics Prof. x2). If tuppels (c. Relver CTX is not in 4NF. Matter would be much improved if CTX were decomposed in to its two projections called them CT and CX as CT {Course. t1. in the sense that every FD is an MDV. the set of teachers t matching the pair (c. For example Course →→ Teacher Text 4NF :A table is in the 4NF if it is in BCNF and all multi-valued dependencies are also functional dependencies. Green Trigonometry The meaning of relver CTX is basically as follows :a tupple {Course : c. Teacher : t. The two projections CT and CX are both in 4NF. but the converse is not true. the MDV A→→B is read as B is multi-dependent on A or equivalently A multidetermines B. This assumption has successfully carried us far as 4NF. In the case of relver CTX there are two MDVs that hold :Course →→ Teacher Course →→ Text Note the double arrows. x2) both appear then tupples (c. thus : A →→ B | C. Green Math Basic Mechanics Math Vector Analysis Math Trigonometry Multivalued dependencies are a generalization of functional dependencies. Conceder the relver SPJ from the suppliers – parts – projects database. x1). Green Vector analysis Math Prof. Course →→ Teacher. Brown Principal of optics Math Prof. therefore. It comes perhaps as a surprise. Text}. leading as usual to certain update online. us concentrate on the first MVD. x) in CTX depends on the value alone – it makes no deference which particularly value of x we chose.

P1. … . The JD *{A. Z. and similarly for PJ and JS then relver SPJ satisfies the JD *{SP. S2 P1 J1 • Yet converse is not true. DKNF :. For example if we agree to use SP to mean the subset {S#. JS}. …. JS is preciously equivalent to the following statement :It is the fair (S1. The converse of these statement that if (S1. J#} is a candidate key. i. P1. … . after three decomposition. Z is the identity projection of R (i. PJ. Relver SPJ is not in 5NF. Since (S1. (S2. P1. …. P#. B. then we say that R satisfies the JD *{A. PJ. J2). P1 → SP → J2 S1. Some examples of such problems are illustrated in figure below :SPJ S# P# J# SPJ S1 P1 J2 S# P# J# S1 P2 J1 S1 P1 J2 • If (S2.e. …. S1) appears in JS then the triple (S1.. and let. PJ and JS are each in 5NF. P1. because a>. P1) appears in SP if and only if (S1. P2. P#} of the attributes of SPJ. and similarly for (P1. That three decomposability is not implied by the fact that the combination {S#. is clearly true for any degree 3 relation SPJ. namely constraint 3D. the three projections SP. J2) appears in SPJ for some J@. B. P1. J1) appears in SPJ Because the triple (S1. J1). certainly not implied by its sole candidate key (that key being the combination of all of its attributes). To state this difficulty. It can be three decomposed and b>. Js. P1. etc. relver SPJ is not in 5NF. J1) obviously appears in the join of SP. J1) appears in PJ and the pair (J1. P1. By contrast. S1 P1 J1 5NF :A relver R is in 5NF – also called projection join normal form (PJ/NF) if and only if every non trivial join dependency that holds for R is implied by the candidate keys of R. R is a relver.S1 S2 P2 P1 P2 P1 J1 J1 J1 J1 S1 S2 S# P# J# S# P# J# S1 P1 J2 S1 P1 J2 S1 P2 J1 S1 P2 J1 S2 P1 J1 S2 P1 J1 → S2 P1 J2 S1 P1 J1 S1 P1 J1 To understand what that constraint must be. J1 → SP → P2 SPJ P1. problems that are removed when it is three decomposed. B. J1) appears in SPJ then (S1. the projection over all attributes of R). J1) and (J1. Z} is trivial if and only if one of the projections A. P1) appears in SP and the pair (P1. (S1. J1) appears in the SPJ then (S1. S1). P1. observed first that the statement SPJ is equal to the join of its 3 projections SP. Z are subsets of the attributes of R. A. J1) appears in SPJ also S1. PJ. we can rewrite the statement above as a constraint on SPJ :if (S1.. A table is said to be in the 5NF if and only it is in 4NF and every join dependency in it is implied by the candidate keys. it satisfies a certain join dependency. P1. J1) must also be inserted.Domain Key Normal Form .e. since they do not involve any (non-trivial) JDs attack. J1 → PJ → S2 Join Dependency :Let. J1) is inserted S1 P2 J1 (S1. Z} if and only if every possible legal value of R is equal to the join of its projections on A. B. Relver SPJ (with its JD) suffers from a number of problems over update operations. P1) appears in SP. B.

Unfortunately. 'SR') building in char (4) fee in dec (4) Relation and key definitions student (sid. these are many constraints that we can not express by using only these special forms. Domain definition :sid is cddd.The hardware could be damaged due to a number of reasons from power surges to fire or other natural calamities or due to sabotage by antisocial elements. 'SO'.DKNF requires that each key uniquely identifies each row in a table. By enforcing key and domain restrictions. The sum of all loan amounts for each branch must be less than sum of all account balances at the branch. Any 6NF relver is necessary is in 5NF. ii>. building) key :. Hence. 'JR'. Equivalently. most current SQL technologies as of 2005 do not take into account these work. fee) key :. and most temporal extensions to SQL are not relational. The programs . Hardware and application software :. An assertions in SQL takes the form :Create assertion <assertion name> check <predicate>. A relver R is in DKNF if and only if every constraints on R is a logical consequence of the domain constraints and key constraints that apply to R. you must address security issues in many dimensions. the database is assured of being freed from modification anomalism. Your computers and other equipments must be physically in accessible to unauthorized users.fee (building.The DBMS could be damaged by unauthorized personnel. fee) key :. We have paid substantial attention to these forms of assertions because they are easily tested and apply to a wide range of database applications. These testing may introduce a significant amount of overhead if complex assertions have been made. Every loan has at least one customer who maintains an account with a minimum balance of $1000. DBMS and application software :. Example of DKNF :student (sid. Database Security :Dimensions of database security :To protect all the elements of complex computing system. plus atmost one additional attribute. where c is [1…9] and d is [0…9] gradelevel in ('FR'. gradlevel. If the assertion is valid then any further modification to the database is allow only if it does not cause that assertion to be violated. gradelevel. a regular relver is in 6NF if and only if it consists of a single key.building 6NF :Relver R is in 6NF if and only if it satisfies no non trivial JDs at all. building.building → fee sid must not begin with digit 1. assertion should be used with grate care. The 6th Normal Form was only define when extending the relational model to take into account the temporal dimension. A 6NF relver is sometimes said to be irreducible. However. Assertions:An assert ions is a predicate expressing a condition that we wish the database always to satisfy. A domain is the set of permissible values for an attribute. 1.sid bldg :. When an assertion is created. the system tests it for validity. 2. Domain constrains and referential integrity constrains are special form of assertions. The application programs could altered or damaged. They could corrupt or delete the data in the databases. Two examples of such constraints are :i>. because it can not be non loss decomposed via projection at all.sid constraints :.

Database administrators 2. application administrators. one person might be responsible for database backups. There should be sound security policies and efficient people to implement it. The employees of the company should be given adequate training in database security issues and there should be periodic audits to check whether the employees practicing the company's database security risks to your data and make sure the solutions you adopt actually fit the problems. Her only role is to be sure the database is up and running. security officers. 4. This could happen if the security mechanism is not good enough or if it fails and gives access to unauthorized people. Network administrators 4.There are a number of people who intact with the DBMS and the databases – database administrator.The procedures used in the operation of your system must assure reliable data. Technical :. Personnel :. The DBAs and security officers could give database access to the wrong people or if they are not good the security counter masseurs and policies they design and implement might not be good enough to prevent an attack on the database. His role is to examine the data verify its integrity. access. a technical solution may be in appropriate. Types of database users :The main users of database are :1. All these people could do damage to the system if they want. Another person might be responsible for generating application reports involving payroll. 3. For example. etc.and data could be stolen and could be used against you. Security officers 3. network administrators. other users. Application administrators 6. It may be wise to separate out users functional roles in data management. or sales data. 5. Procedural :. In some instances.Strong. Database users. application developers. . manipulation and transmission of data must be safeguard by technology that enforces your particular information control policies. Application developers 5.