当前位置:网站首页>Closure and minimum dependency in database
Closure and minimum dependency in database
2022-06-11 07:52:00 【zljun8210】
Known relational patterns R(U,F), among U={ A,B,C,D,E},F It's a collection of relationships {AB—>C,B—>D,C—>E,EC—>B,AC—>B}
seek AB The closure of .
- First step , set up X0=AB, stay F Find such a relationship in , On the left is AB Subset , That is, on the left A,B,AB, From the title AB—>C,B—>D
- The second step , take X0 Properties derived from a subset of , Here is C,D And X0 And get up and get X1=ABCD, because X1 It's not equal to X0( until Xi=Xj) Continue with the calculation
- Repeat the first step , But be careful at this time , What are you looking for X1 Subset , And it is a subset that has never been used , image A,B,AB There's no need to recalculate , What you should be looking for at this time is C—>E,AC—>B
- Repeat step 2 , obtain X2=ABCDE, At this time, though X2!=X1, however X2 It contains all the attribute sets , You can also stop and continue the operation , namely AB The closure of is ABCDE
summary : in other words , When we find a closure of an attribute set , Is to find all the attributes that can be derived directly or indirectly from this attribute , Then continue to merge .
Minimum functional dependency set , First, the following conditions must be met :
- The right part of a functional dependency can only contain one attribute
- It does not contain many and dependencies , That is, the set formed after removing a certain functional dependency B And the original set A It is equivalent. , Be frank ,B You can exit the removed functional dependencies
- Without partial dependency , image F{AB—>C,A—>C} Is not a minimal set of functional dependencies
Known relational patterns R(U,F), among U={A,B,C},F It's a collection of relationships {A—>BC,B—>C,AB—>C,A—>B}
Find the minimum functional dependency set of the pattern .
answer :F={B—>C,A—>B},A—>BC The right part of a function dependency cannot contain only one attribute ,B—>C,AB—>C There is a partial dependency ,
It can also be regarded as redundant dependency , because B—>C,AB—>C Is absolutely true , There is no difference between yes and No
--------------------- This article is from legendaryhaha Of CSDN Blog , Full text address please click :https://blog.csdn.net/legendaryhaha/article/details/80642812?utm_source=copy
边栏推荐
- Black Qunhui dsm7.0.1 physical machine installation tutorial
- 2021-10-24
- Alchemy experience (model training of deep learning) the necessity of timely adjusting training parameters for some situations (the adjustment of learning rate LR is the primary) summarizes some metho
- El expressions and JSTL
- C language - Growth Diary -01- count primes and sum
- Session and session management technology
- The solution of "no startup device" after running Bochs
- 自定义ViewGroup的知识点总结-持续更新
- Summary of evaluation index knowledge points in target detection: summary of IOU cross overlap unit and map/ap/tp/fp/np
- Uoj 554 [unr 4] challenges Hamilton [find Hamilton path (adjustment method)]
猜你喜欢
随机推荐
[atcoder1983] BBQ hard (combination number + clever model transformation)
二本畢業,銀行外包測試工作 4 個月有餘。聊聊一些真實感受 ...
Rabin Miller prime test
Xshell7 and xftp7 to continue using this program, you must apply the latest updates or use a new version
How to output the percent sign "%" in printf function in C language
[noip2016 d1t3] changing classrooms (expectation dp+floyd) (trap of extreme thinking!)
Data visualization and Matplotlib
远程办公经验 | 社区征文
Label the mask image not obtained through labelme
Import on CSDN MD file
Lesson 1 about Xiaobai's C language
【HDU6357】Hills And Valleys(DP)
C language Yanghui triangle code
forEach 中 return 和 for 中 break
JSP development model
签到体系设计:签到功能该怎么画
C language three chess games
[atcoder2306] rearranging (topology)
Batch splice string
Simple use of string









