Docsity

Relational Databases-Distributive Database System-Lecture Slides, Slides of Distributed Database Management Systems

Partial preview of the text

Download Relational Databases-Distributive Database System-Lecture Slides and more Slides Distributed Database Management Systems in PDF only on Docsity!

In the name of Allah

Distributed Database Systems

(CS-5323)

Spring 2012

Relational Databases

Dept of CS, MAJU, Ibd

Data Model  A set of tools/ constructs used to model a database  Record/Semantic

Dept of CS, MAJU, Ibd

Relational Data Model

 Two major Strengths  Three Components  Relational databases based on relational DM

Dept of CS, MAJU, Ibd

 A relation R defined over domains D

, D

, …., D

n

is a set of n-tuples, <d

, d

, …, d

n

such that <d

 D

……, d

n

D

n

Formalism

Dept of CS, MAJU, Ibd

eNo eName eTitle eSal pNo eResp eDur 12 7 12 15 10 10 Work Mangr Cons Cons Cons Mangr

P
P
P
P
P
P

Supr Desin Prog Eng Prog Anlyst Naeem Rahila Narjis Aslam Hafeez Liaqat

E
E
E
E
E
E

Dept of CS, MAJU, Ibd

 Each of the attribute in these two relations has a domain, like…  Domains need not to be distinct

Characteristics of DB Relations

Dept of CS, MAJU, Ibd

 Minimum nonempty subset of a relation whose values uniquely identify each tuple in relation

Primary Key

Dept of CS, MAJU, Ibd

 The superset of the key is super key, like…  We also have candidate, alternate, secondary, foreign key

Keys

Dept of CS, MAJU, Ibd

 Three Normal Forms  BCNF  Lossless decomposition  Dependency preservation

Normalization

Dept of CS, MAJU, Ibd

Dependency Structure

 Norm. based on dependencies  Up to BCNF on FDs  MVD and P-JD

Dept of CS, MAJU, Ibd

Basic Normal Forms

 1 st: A relation is in first normal form iff every attribute in every tuple contains an atomic value or there is no multivaued (repeating group) in the relation  2 nd: A relation is in 2nd^ normal form iff it is in the first normal form and all non key attributes are fully functionally dependent on key, that is, there is no partial dependency  3 rd: A table is in third normal form (3NF) iff it is in 2NF and there is no transitive dependency, that is, no non-key attribute is dependent on another non-key attribute  BCNF: A table is in BCNF if every determinant is a candidate key

Multivalued Dependency