Functional dependencies in Database Management SystemKevin Jadiya
Slides attached here describes mainly Functional dependencies in database management system, how to find closure set of functional dependencies and in last how decomposition is done in any database tables
Dbms architecture
Three level architecture is also called ANSI/SPARC architecture or three schema architecture
This framework is used for describing the structure of specific database systems (small systems may not support all aspects of the architecture)
In this architecture the database schemas can be defined at three levels explained in next slide
Functional dependencies in Database Management SystemKevin Jadiya
Slides attached here describes mainly Functional dependencies in database management system, how to find closure set of functional dependencies and in last how decomposition is done in any database tables
Dbms architecture
Three level architecture is also called ANSI/SPARC architecture or three schema architecture
This framework is used for describing the structure of specific database systems (small systems may not support all aspects of the architecture)
In this architecture the database schemas can be defined at three levels explained in next slide
• Process for heuristics optimization
1. The parser of a high-level query generates an initial internal representation;
2. Apply heuristics rules to optimize the internal representation.
3. A query execution plan is generated to execute groups of operations based on the access paths available on the files involved in the query.
You can get clear knowledge about the functional dependencies in "Normalization". And also the rules, types of FDs and finally the closure and its applications
Database normalization is the process of refining the data in accordance with a series of normal forms. This is done to reduce data redundancy and improve data integrity. This process divides large tables into small tables and links them using relationships.
Here is the link of full article: https://www.support.dbagenesis.com/post/database-normalization
Super keyword is a reference variable that is used for refer parent class object. Super keyword is used in java at three level, at variable level, at method level and at constructor level.
• Process for heuristics optimization
1. The parser of a high-level query generates an initial internal representation;
2. Apply heuristics rules to optimize the internal representation.
3. A query execution plan is generated to execute groups of operations based on the access paths available on the files involved in the query.
You can get clear knowledge about the functional dependencies in "Normalization". And also the rules, types of FDs and finally the closure and its applications
Database normalization is the process of refining the data in accordance with a series of normal forms. This is done to reduce data redundancy and improve data integrity. This process divides large tables into small tables and links them using relationships.
Here is the link of full article: https://www.support.dbagenesis.com/post/database-normalization
Super keyword is a reference variable that is used for refer parent class object. Super keyword is used in java at three level, at variable level, at method level and at constructor level.
Lecture notes on Functional dependencies, normal forms, first, second, third normal forms, BCNF, inclusion dependence, loss less join decompositions, normalization using FD, MVD, and JDs, alternative approaches to database design.
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Dr.Costas Sachpazis
Terzaghi's soil bearing capacity theory, developed by Karl Terzaghi, is a fundamental principle in geotechnical engineering used to determine the bearing capacity of shallow foundations. This theory provides a method to calculate the ultimate bearing capacity of soil, which is the maximum load per unit area that the soil can support without undergoing shear failure. The Calculation HTML Code included.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...Amil Baba Dawood bangali
Contact with Dawood Bhai Just call on +92322-6382012 and we'll help you. We'll solve all your problems within 12 to 24 hours and with 101% guarantee and with astrology systematic. If you want to take any personal or professional advice then also you can call us on +92322-6382012 , ONLINE LOVE PROBLEM & Other all types of Daily Life Problem's.Then CALL or WHATSAPP us on +92322-6382012 and Get all these problems solutions here by Amil Baba DAWOOD BANGALI
#vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore#blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #blackmagicforlove #blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #Amilbabainuk #amilbabainspain #amilbabaindubai #Amilbabainnorway #amilbabainkrachi #amilbabainlahore #amilbabaingujranwalan #amilbabainislamabad
2. There are two levels at which we discuss the goodness of
relation schema
•Logical (or Conceptual)Level
•Implementation (or storage ) Level
prepared by Visakh V,Assistant
Professor,LBSITW
4. 4 Informal measures of quality for
relation schemas are
I. Semantics of the attribute
• interpretation of attribute values
from tuples
• The attribute belonging to one relation
have certain real-world meaning and a
proper interpretation associated with
them
prepared by Visakh V,Assistant
Professor,LBSITW
5. ii. Reducing redundant information in tuples
• minimize the storage space used by the base
relation
• Problem of update anomalies
• Insertion of anomalies
• Deletion of anomalies
• Modification of anomalies
iii. Reducing the NULL values in the tuples
• Waste space at storage levels
• Also lead to problems with understanding
the meaning of attributes (ex:count,join )
iv. Disallowing the possibility of generating
spurious tuples
• Seems to be genuine but it is falseprepared by Visakh V,Assistant
Professor,LBSITW
9. • Most important concept in relational schema design
theory.
• A functional dependency is a constraint between
two set of attributes from the database.
• it is denoted by X Y(functional dependency
from x to y or y is functionally dependent on X.)
• i.e. Y component of a tuple in r depend on , or are
determined by , the values of the Y component.
•A functional dependency is a property of the of the
semantics or meaning .prepared by Visakh V,Assistant
Professor,LBSITW
11. Inference ???
•Dept_no Mgr_SSN , each department has one manager
• Mgr_SSN Mgr_phone : Each manager has a unique phone number
• then we can infer Dept_no Mgr_phone
prepared by Visakh V,Assistant
Professor,LBSITW
12. Closure : includes all dependencies that can
be inferred from the given set F, it is denoted
by F
closure ???
+
Let us see some examples on board
prepared by Visakh V,Assistant
Professor,LBSITW
13. The notation F XY means the functional
dependency XY is inferred from functional
dependencies F.
To determine a systematic way to infer dependencies,
we use inference rules that can be used to infer new
dependencies
prepared by Visakh V,Assistant
Professor,LBSITW
14. Inference rules for functional dependencies are :
• IR1 (reflexive rule) : If Y subset-of X,
then X Y
•IR2 (augmentation rule) : If X -> Y, then XZ -> YZ
•IR3 (transitive rule) :If X Y & Y Z, then
X Z
•IR4 (decomposition ,or projective rule) : If X YZ then X Y
•IR5 (Union or additive rule) : If XY,XZ then XYZ
•IR6 (pseudo transitive rule) : If XY,WYZ then
WX Z
Trivial
otherwise
Non-Trivial
prepared by Visakh V,Assistant
Professor,LBSITW
15. Inference rules IR1 through IR3
are sound and complete
Dependency that we
can infer from F by
using IR1 to IR3 holds
every relation state r
of R that satisfies the
dependencies in F.
Using IR1to IR3
repeatedly to infer
dependencies until no
more dependencies
can be inferred from F
The closure of F , can be determined from F by using
inference rules IR1 to IR3 are known as Armstrong ‘s
inference rules.
prepared by Visakh V,Assistant
Professor,LBSITW
17. Cover : A set of functional dependencies F is said
to cover another set of dependencies E if every
FD in E is also in F .
Or we can say that E is covered by F.
+
Two sets of functional dependencies E and F are
equivalent if E = F .+ +
prepared by Visakh V,Assistant
Professor,LBSITW
19. Minimal cover : minimal cover of a functional dependencies E
is a set functional dependencies F that satisfies the property
that every dependency in E is in the closure of F of F.+
•Every set of FDs has an equivalent minimal set
•There can be several equivalent minimal sets
•There is no simple algorithm for computing a minimal
set of FDs that is equivalent to a set F of FDs
•To synthesize a set of relations, we assume that we
start with a set of dependencies that is a minimal set
prepared by Visakh V,Assistant
Professor,LBSITW
20. • Set F:= E
• Replace each functional dependencies X{A1,A2,. . . .,An}
in F by the n functional dependencies X A1,XA2,. ..
.,XAn.
• For each functional dependencies X A in
For each attribute B that is an element of X
• if {F – {XA}} U {(x-{B}) a} }
Algorithm
Finding a Minimal cover F for a set of functional dependencies E
CANONICAL formprepared by Visakh V,Assistant
Professor,LBSITW
21. Find minimum cover for E
{B A, DA,ABD}
Find minimum cover for E
{AD,BCA,BCD,CB,EA,ED}
Find minimum cover for E
{ AB -> C, C -> A, BC -> D, ACD -> B, D -> E, D ->
G, BE -> C, CG -> B, CG -> D, CE -> A, CE -> G}
prepared by Visakh V,Assistant
Professor,LBSITW
22. Find minimum cover for E
{noname
noage
no,nameage
noage,name}
prepared by Visakh V,Assistant
Professor,LBSITW
25. •First proposed by Codd (1972)
•Initially proposed first ,second and
3NF
• later Boyce and Codd proposed
BCNF
• later 4th and 5th NF are proposed
based on the concept of multi-
valued dependency and join
dependencies
prepared by Visakh V,Assistant
Professor,LBSITW
26. Advantages
•Minimizing redundancy
•Minimizing insertion , deletion, and
modification of anomalies
Normal form a relation refers to the highest
normal form condition that it meets, and hence
indicate the degree to which it has been
normalized prepared by Visakh V,Assistant
Professor,LBSITW
27. Non-prime attribute
A non-prime attribute is an attribute that does not occur in any
candidate key.
Prime attribute
A prime attribute, conversely, is an attribute that does occur in
some candidate key.
prepared by Visakh V,Assistant
Professor,LBSITW
29. •Disallow multi valued attributes and composite attributes
• it states that domain of an attributes must include only
atomic (simple, indivisible)values.
•Ex: address
prepared by Visakh V,Assistant
Professor,LBSITW
32. Must be in 1NF
prepared by Visakh V,Assistant
Professor,LBSITW
33. Full functional dependency : A functional dependency X Y is a
FULL FUNCTIONAL dependency if removal of any attribute A from X
means that dependency does not hold any more;
Partial dependency : A functional dependency X Y is a partial
dependency if some attribute A in X can be removed from X and
dependency still holds
Def : A relation schema R is in 2NF if every non
prime attribute A in R is fully functionally
dependent on the primary key of R
prepared by Visakh V,Assistant
Professor,LBSITW
36. •it must be in 2NF
Def : A Relation Schema R is in 3nF ,
Whenever a non-trivial functional
dependency holds in R ,either
(a)X is a super key of R or (b) A is a
prime attribute of R
X A
prepared by Visakh V,Assistant
Professor,LBSITW
37. X A If A is non prime attribute
then X must be super key
prepared by Visakh V,Assistant
Professor,LBSITW
39. Def : A Relation Schema R is in BCNF ,
Whenever a non-trvial functional
dependency holds in R , X is a
superkey
X A
prepared by Visakh V,Assistant
Professor,LBSITW
40. More stricter than 3NF
X A Always the left hand side
must be super key
whether A is prime or non
prime
prepared by Visakh V,Assistant
Professor,LBSITW
41. Here {student, course instructor}
{instructor course}
It is 3NF but not BCNF
prepared by Visakh V,Assistant
Professor,LBSITW
42. In BCNF must check TWO conditions
• X Y allowed ,if it is trivial functional dependency
OR
• X is a super key for schema R
BCNF is
More stricter than 3NF
prepared by Visakh V,Assistant
Professor,LBSITW
43. A 3NF table which does not have
multiple overlapping candidate keys
is guaranteed to be in BCNF
Ex: 3NF but not BCNF
Court Start Time End Time Rate Type
1 09:30 10:00 SAVER
1 11:00 12:00 SAVER
1 14:00 15:30 STANDARD
2 10:00 11:30 PREMIUM-B
2 11:30 13:30 PREMIUM-B
2 15:00 16:30 PREMIUM-A
2 9:30 10:00 PREMIUM-A
prepared by Visakh V,Assistant
Professor,LBSITW
44. Here the candidate keys are
S1: {COURT,START TIME}
S2:{COURT,END TIME}
S3:{RATE TYPE,START TIME}
S4:{RATE TYPE, END TIME}
Here no non prime attributes , all are prime attribute
belongs to some candidate key.
So the table is 2NF and 3NF.but not in BCNF.prepared by Visakh V,Assistant
Professor,LBSITW
45. Here no non prime attributes , all are prime attribute
belongs to some candidate key.
So the table is 2NF and 3NF,but not in BCNF because of
rate type court.
prepared by Visakh V,Assistant
Professor,LBSITW
46. Today's Bookings
Rate Type Start Time End Time
SAVER 09:30 10:30
SAVER 11:00 12:00
STANDARD 14:00 15:30
PREMIUM-B 10:00 11:30
PREMIUM-B 11:30 13:30
PREMIUM-A 15:00 16:30
Rate Types
Rate Type Court Member Flag
SAVER 1 Yes
STANDARD 1 No
PREMIUM-A 2 Yes
PREMIUM-B 2 No
Now it is in BCNF
prepared by Visakh V,Assistant
Professor,LBSITW
47. Problems when using BCNF
Person Shop Type Nearest Shop
Teena Optician Eagle Eye
Meenu Hairdresser Snippets
Priya Bookshop Merlin Books
Sreedevi Bakery Sree bakers
Sreedevi Hairdresser Sweeney
Sreedevi Optician Eagle Eye
Dependency:
A, B C
C B
Not BCNFprepared by Visakh V,Assistant
Professor,LBSITW
48. Shop Near Person
Person Shop
Teena Eagle Eye
Meenu Snippets
Priya Merlin Books
Sreedevi Sree Bakers
Sreedevi Sweeney
Sreedevi Eagle Eye
Shop
Shop Shop Type
Eagle Eye Optician
Snippets Hairdresser
Merlin Books Bookshop
Sree Bakers Bakery
Sweeney Hairdresser
prepared by Visakh V,Assistant
Professor,LBSITW
49. Problem : It allow us to record data such as,a
person’s multiple shops with same type ,It
violates the dependency
{person,shoptype}{shop}
So BCNF is not always possible
prepared by Visakh V,Assistant
Professor,LBSITW
50. (Lets do some problems)
prepared by Visakh V,Assistant
Professor,LBSITW
52. MULTIVALUED DEPENDENCY
: A consequence of first normal form, Which disallows an attribute
have a set of values
: A multivalued dependency is a special case of a join dependency,
Course Book Lecturer
AHA Silberschatz John D
AHA Nederpelt William M
AHA Silberschatz William M
AHA Nederpelt John D
AHA Silberschatz Christian G
AHA Nederpelt Christian G
OSO Silberschatz John D
OSO Silberschatz William M
{course} {book}
and equivalently
{course} {lecturer}.
prepared by Visakh V,Assistant
Professor,LBSITW
53. Definition for 4th Normal Form
A relation schema R is in 4NF with respect to a set
of dependencies F (that include functional
dependencies and multivalued dependencies ),if for
every non trivial multivalued dependency X Y
in F closure,X is a super key of R.
A trivial multivalued dependency X Y is one
where either Y is a subset of X, or X and Y together
form the whole set of attributes of the relation.
prepared by Visakh V,Assistant
Professor,LBSITW
58. •In dependency theory, a join dependency is a
constraint on the set of legal relations over a
database scheme.
• A table T is subject to a join dependency if T can
always be recreated by joining multiple tables
each having a subset of the attributes of T.
• If one of the tables in the join has all the
attributes of the table T, the join dependency is
called trivial
prepared by Visakh V,Assistant
Professor,LBSITW
59. •If JOIN dependency is present carry out a
multiway decomposition in to 5th Normal
form
•Such dependency is very peculiar semantic
constraint, that is very difficult to detect I
practice. So 5NF very rarely done in practice.
prepared by Visakh V,Assistant
Professor,LBSITW
60. NON ADDITIVE (LOSELESS) JOIN DEPENDENCY
•Which ensures that no spurious tuples are generated
when a NATURAL JOIN operation is applied to the
relations in the decomposition
• lossless refers to loss information ,not to loss of
tuples.
prepared by Visakh V,Assistant
Professor,LBSITW
61. Example of lossy decomposition
A B C
1 1 1
1 1 2
1 2 1
A B C
1 1 1
1 1 2
1 2 1
1 2 2
A B
1 1
1 2
A C
1 1
1 2
Original table Decomposition
Reconstruction
prepared by Visakh V,Assistant
Professor,LBSITW