版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、CS_Dept.Sichaun Univ.DB System2022/5/101/137Book :數(shù)據(jù)庫概念Ver.5 by A. Silberschatz Chapter 7: Relational Database Design (A)Prof. : 唐常杰cjT Http:/ Univ.DB System2022/5/102/137Boss 喜歡一覽表,有的一覽表50-100個(gè)字段,大量 空格和重復(fù)。不適合RDB, 冗余、異常職工號職務(wù)/職稱職務(wù)/職稱工資001教授400002教授400.NULL講師200100助教100101助教100102助教100103助教100冗余,潛在的不一
2、致空值CS_Dept.Sichaun Univ.DB System2022/5/103/137職務(wù)職稱職務(wù)/職稱工資教授20.000副教授15,000講師9000助教6000院士100,000分解成為兩個(gè)小表 ,好得多。 感性經(jīng)驗(yàn):多用關(guān)系,少用字段職工號職務(wù) /職稱001教授.100助教101助教這個(gè)關(guān)系中,行數(shù) 不多。職務(wù)職稱類別不是太多)暫時(shí)沒有院士,也能加入其工資數(shù)量CS_Dept.Sichaun Univ.DB System2022/5/104/137多用關(guān)系,少用字段 還要滿足 “無損”條件職務(wù)/職稱職務(wù)/職稱工資教授20.000副教授15,000講師9000助教6000院士100
3、,000無損連接分解 :兩個(gè)小表連接 可以得到原來的表,沒有增加元組,無信息損失如增加了原來沒有的元組,增加了不確定性,損失了信息) 職工號職務(wù)/職稱001教授.100助教101助教CS_Dept.Sichaun Univ.DB System2022/5/105/137Boss喜歡一覽表,但一覽表不適合RDB,lRepetition of Information.lInability to represent certain information.Design Goals:設(shè)計(jì)目的lAvoid redundant data避免異常lEnsure that relationships amon
4、g attributes are represented 表現(xiàn)字段之間的聯(lián)系lFacilitate the checking of updates for violation of database integrity constraints. l檢查更新時(shí) 的數(shù)據(jù)相容性l人們對一覽表熟視無睹,很少思考其中的學(xué)問冗余,異常CS_Dept.Sichaun Univ.DB System2022/5/106/137領(lǐng)導(dǎo)可能喜歡一覽表,但一覽表不適合RDB, 冗余、異常lRepetition of Information.lInability to represent certain informat
5、ion.Design Goals:設(shè)計(jì)目的lAvoid redundant data避免異常lEnsure that relationships among attributes are represented 表現(xiàn)字段之間的聯(lián)系lFacilitate the checking of updates for violation of database integrity constraints. l檢查更新時(shí) 的數(shù)據(jù)相容性人們對一覽表熟視無睹,很少思考其中的學(xué)問CS_Dept.Sichaun Univ.DB System2022/5/107/137Domain is atomic if its
6、 elements are considered to be indivisible units Examples of non-atomic domains:非原子屬性的例子Set of names, composite attributes 復(fù)合字段Identification numbers like CS101 that can be broken up into parts 應(yīng)該分解的字段如CS101A relational schema R is in first normal form if the domains of all attributes of R are atomi
7、c1NF 要求要求所有字段是原子, 不允許大字段套小字段CS_Dept.Sichaun Univ.DB System2022/5/108/137Non-atomic values complicate storage and encourage redundant (repeated) storage of datalE.g. Set of accounts stored with each customer, and set of owners stored with each accountlWe assume all relations are in first normal form
8、(revisit this in Chapter 9 on Object Relational Databases)l,非原子字段非原子字段 導(dǎo)致冗余導(dǎo)致冗余本書本書9章以前章以前 只討論只討論1NFCS_Dept.Sichaun Univ.DB System2022/5/109/137Atomicity is actually a property of how the elements of the domain are used. 1NFE.g. Strings would normally be considered indivisible 串 不可分解 如 院系課號 CS0012 o
9、r EE1127 不需分解,就作為一個(gè)字段如實(shí)際需要分解為 CS 0012,那就不要暗地用程序去分解,(維護(hù)困難)而正大光明地 作為 兩個(gè)字段: 院系, 課號CS_Dept.Sichaun Univ.DB System2022/5/1010/137Features of Good Relational DesignAtomic Domains and First Normal FormDecomposition Using Functional DependenciesFunctional Dependency TheoryAlgorithms for Functional Dependenc
10、iesDecomposition Using Multivalued Dependencies More Normal FormDatabase-Design ProcessModeling Temporal DataCS_Dept.Sichaun Univ.DB System2022/5/1011/137functional dependencies :l If a relation r is legal under a set F of functional dependencies, we say that r satisfies F.lspecify constraints on th
11、e set of legal relationsCS_Dept.Sichaun Univ.DB System2022/5/1012/137Constraints on the set of legal relations.Require that the value for a certain set of attributes determines uniquely the value for another set of attributes.A functional dependency is a generalization of the notion of a key. 函數(shù)依賴 是
12、 關(guān)鍵字概念的 細(xì)化和推廣身份證號 姓名, 學(xué)號課號 課程成績把上直觀感覺形式化,能自己寫一個(gè)形式化的定義嗎?想的正確, 說得明白,寫得清除,基本功 一組屬性的值 決定 另外 一組屬性的值, 對一個(gè)合理關(guān)系的 約束CS_Dept.Sichaun Univ.DB System2022/5/1013/137Constraints on the set of legal relations.Require that the value for a certain set of attributes determines uniquely the value for another set of at
13、tributes functional dependency is a generalization of the notion of a key. 身份證號 姓名, 學(xué)號課號 課程成績函數(shù)依賴 實(shí)例把上直觀感覺形式化,能自己寫一個(gè)形式化的定義嗎?想得正確,想得正確, 說得明白,寫得清楚,基本功說得明白,寫得清楚,基本功CS_Dept.Sichaun Univ.DB System2022/5/1014/137Let R be a relation schema , and attributes R and R1 A functional dependency is an expression
14、in the form .2 Let r be a relation over R. r is said to be satisfied FD if for any tuples t1 and t2 in r , = t2 t1 = t2 Example: Consider r(A,B) with the following instance of r. A BOn this instance, A B does NOT hold, but B A does hold. 理解, A為所在班級, B為學(xué)號 學(xué)號不同,班級不同是正常的上述定義比書上的正規(guī)CS_Dept.Sichaun Univ.D
15、B System2022/5/1015/137Let R be a relation schema , and attributes R and R1 Functional dependency is an expression in the form .2 Let r be a relation over R. r is said to be satisfied FD iffor any tuples t1 and t2 in r , t1 = t2 t1 = t2 Example: Consider r(A,B) with the following instance of r. On t
16、his instance, A B does NOT hold, but B A does hold. A B141 537B A hold但這里看不出來 學(xué)號 班級數(shù)據(jù)量少了,數(shù)據(jù)量少了,眼見未必為實(shí)眼見未必為實(shí)CS_Dept.Sichaun Univ.DB System2022/5/1016/137Let R be a relation schema , and attributes R and R1 Functional dependency is an expression in the form .2 Let r be a relation over R. r is said to
17、be satisfied FD iffor any tuples t1 and t2 in r , t1 = t2 t1 = t2 Example: Consider r(A,B) with the following instance of r. On this instance, A B does NOT hold, but B A does hold. A B141 537B A hold但這里看不出來 學(xué)號 班級數(shù)據(jù)量少了,數(shù)據(jù)量少了,眼見也未必為實(shí)眼見也未必為實(shí)CS_Dept.Sichaun Univ.DB System2022/5/1017/137K is a superkey f
18、or relation schema R if and only if K R再小K is a candidate key for R if and only if lK R, andlfor no K, R 例 Loan-info-schema = (customer-name, loan-number, branch-name, amount).We expect this set of functional dependencies to hold:loan-number amount / 貸款號貸款數(shù)量 成立 loan-number branch-name / 貸款號支行名 成立 bu
19、t would not expect the following to hold: 下列 不成立loan-number customer-name /貸款號顧客號超關(guān)鍵字,包含 子集合 作關(guān)鍵字候選關(guān)鍵字: 有資格 且小得不能在小CS_Dept.Sichaun Univ.DB System2022/5/1018/137例 Loan-info-schema = (customer-name, loan-number, branch-name, amount).We expect this set of functional dependencies to hold:loan-number amo
20、unt / 貸款號貸款數(shù)量 成立loan-number branch-name / 貸款號支行名 成立but would not expect the following to hold: 下列 不成立loan-number customer-name /貸款號顧客號CS_Dept.Sichaun Univ.DB System2022/5/1019/137設(shè) R是模式, F 是 若干個(gè) fd 組成的集合, r 滿足 F中每個(gè) FD r 滿足F F在R上成立.三個(gè)說法等價(jià)三個(gè)說法等價(jià):FD 是 語義約束,反映了客觀事物應(yīng)該遵循的規(guī)則 檢查 關(guān)系 是否符合 函數(shù)依賴CS_Dept.Sichaun
21、Univ.DB System2022/5/1020/137A functional dependency is trivial if it is satisfied by all instances of a relation, XX , XY X,。E.g. customer-name, loan-number customer-name customer-name customer-namelIn general, is trivial if 平凡FD, 大實(shí)話誰都知道的道理 稱 平凡:CS_Dept.Sichaun Univ.DB System2022/5/1021/137Lossy-j
22、oin decompositions result in information loss.Example: Decomposition of R = (A, B)R2 = (A)R2 = (B) 此例無公共字段AB121AB12rA(r)B(r)A (r) B (r)AB12122 X 2 =4行比原來多了一記錄“該記錄 不合格”這一信息 被 損失了分解再連接, CS_Dept.Sichaun Univ.DB System2022/5/1022/137(1) is trivial (i.e., ) (2)(2) is a superkey for R直觀解釋 :發(fā)出箭頭的必是關(guān)鍵字, 逆否命
23、題:非關(guān)鍵字不許發(fā)出箭頭 。 只許州官放火,不許百姓點(diǎn)燈不妨在本課程內(nèi) 稱為 州官法則州官法則定義 A relation schema R is in BCNF with respect to a set F of functional dependencies if for all functional dependencies in F+ of the form , where R and R, at least one of the following holds:(模式R稱為滿足BCNF,如果 形如 的FD至少滿足下列條件之一):/箭頭發(fā)向內(nèi)部,平凡CS_Dept.Sichaun Un
24、iv.DB System2022/5/1023/137(1) is trivial (i.e., ) /箭頭發(fā)向內(nèi)部,平凡(2) is a superkey for R直觀解釋 :發(fā)出(非平凡的)箭頭的必是超關(guān)鍵字, 逆否命題:非關(guān)鍵字不許發(fā)出箭頭 。 定義 A relation schema R is in BCNF with respect to a set F of functional dependencies if for all functional dependencies in F+ of the form , where R and R, at least one of th
25、e following holds:(模式R稱為滿足BCNF,如果 形如 的FD至少滿足下列條件之一):只許州官放火,不許百姓 點(diǎn)燈(發(fā)出前頭)不妨在本課程內(nèi) 夸張地 稱為 州官法則州官法則 (好記),(好記),CS_Dept.Sichaun Univ.DB System2022/5/1024/137 把Cp178 的方法做了一些改寫,更清楚一些對FD集合F T=empty; /初始化 分解結(jié)果 / 對R迭代分解 repeat if fd=( ) in F /掃描,枚舉一個(gè) fd 分解結(jié)果T= T (U ) ,( R - ( - ) ) /小關(guān)系變多 F=F-fd ; / 沒有處理的fd 變少
26、 ,F(xiàn)變小 R= ( R - ( - ) / 大關(guān)系R變小Until F=empty. Output TCS_Dept.Sichaun Univ.DB System2022/5/1025/137decompose R (with F) into R1, R2,., Rn we wantLossless-join decomposition: 無損No redundancy: 無冗 , BCNF 或3NF.Dependency preservation: 保依 (賴)l比喻:中文語法+ = (各省市地區(qū)方言語法并)+ lLet Fi be the set of dependencies F+ t
27、hat include only attributes in Ri. Preferably the decomposition should be dependency preserving, that is, (F1 F2 Fn)+ = F+Otherwise, checking updates for violation of functional dependencies may require computing joins, which is expensive.CS_Dept.Sichaun Univ.DB System2022/5/1026/137R = (A, B, C) F
28、= A B, B C) 分解1: R1 = (A, B), R2 = (B, C)lLossless-join decomposition: 無損l 因?yàn)?R1 R2 = B and B BClDependency preserving 保依下面是另一種分法 :R1 = (A, B), R2 = (A, C)lLossless-join decomposition: 無損l R1 R2 = A and A ABlNot dependency preserving 不保依l(cannot check B C without computing R1 R2)沒有 領(lǐng)土 職工號,職務(wù), 職務(wù)工資CS
29、_Dept.Sichaun Univ.DB System2022/5/1027/137R = (A, B, C)F = A B,B C Key = A R is not in BCNF ( B非關(guān)鍵字,發(fā)出了箭頭 )Decomposition R1 = (A, B), R2 = (B, C) R1 and R2 in BCNFlLossless-join decomposition 無損lDependency preserving 保依一個(gè)助記方法,簡短,上口 的短語CS_Dept.Sichaun Univ.DB System2022/5/1028/137BCNF 對于工程實(shí)踐上 太嚴(yán)格了,具
30、體地lBCNF is not dependency preserving, and 不一定保依lefficient checking for FD violation on updates is important 檢查FD的效率Solution: 放松一點(diǎn) , weaker normal form, called 3NF.lAllows some redundancy (with resultant problems; we will see examples later) 允許一小點(diǎn)冗余l(xiāng)But FDs can be checked on individual relations with
31、out computing a join. 檢查FD不需連接lThere is always a lossless-join, dependency-preserving decomposition into 3NF. 能做到 無損保依CS_Dept.Sichaun Univ.DB System2022/5/1029/137A relation schema R is in third normal form (3NF) if for all: in F+ 如發(fā)出箭頭 at least one of the following holds: 下列三者之一成立l is trivial (i.e.
32、, ) 1 平凡箭頭l is a superkey for R 2 是超關(guān)鍵字lEach attribute A in is contained in a candidate key for R.l 3箭頭發(fā)到候選關(guān)鍵字中l(wèi) (NOTE: each attribute may be in a different candidate key)l下頁解釋第3條BCNF的條件增加一個(gè) ”或“,條件,放松了條件CS_Dept.Sichaun Univ.DB System2022/5/1030/137解釋第3條: Each attribute A in is contained in a candida
33、te key for R. l (NOTE: each attribute may be in a different candidate key) 例: 已知 候選關(guān)鍵字 A1B1, A2B2, A3B3, =CD, = A1A2A3 D in F+ , - =A1A2A3 則 符合 3NF規(guī)定 即允許: , 非關(guān)鍵字, 但是州官家里的燈組成箭頭只能 發(fā)到候選關(guān)鍵字中由幾個(gè)州官家里的燈組由幾個(gè)州官家里的燈組成成比喻 3NF 寬松一點(diǎn)點(diǎn),允許百姓把燈點(diǎn)到寬松一點(diǎn)點(diǎn),允許百姓把燈點(diǎn)到州官家里去州官家里去CS_Dept.Sichaun Univ.DB System2022/5/1031/137Ex
34、ample R = (J, K, L), F = JK L, L K把 發(fā)出箭 比喻為 點(diǎn)燈lTwo candidate keys: JK and JLlR is in 3NF 已經(jīng)是3NFlJK L JK is a superkey 州官點(diǎn)的燈lL K K is contained in a candidate key 點(diǎn)到州官家里的燈nBCNF decomposition has (JL) and (LK) n BCNF把J和K分開了 ,所以不保持依賴 JK L3NF 一點(diǎn)冗余 因?yàn)?有一點(diǎn)部分依賴Equivalent to example in book: 書上另一例等價(jià)l Banker
35、-schema = (branch-name, customer-name, banker-name)lbanker-name branch namelbranch name customer-name banker-nameCS_Dept.Sichaun Univ.DB System2022/5/1032/137Example R = (J, K, L), F = JK L, L KlTwo candidate keys: JK and JLlR is in 3NF 已經(jīng)是3NFlJK L JK is a superkey 州官點(diǎn)的燈lL K K is contained in a cand
36、idate key 點(diǎn)到州官家里的燈nBCNF decomposition has (JL) and (LK) BCNF把J和K分開了所以不保持依賴 JK LnBCNF把J和K分開了 ,所以不保持依賴 JK LEquivalent to example in book: 書上另一例等價(jià)l Banker-schema = (branch-name, customer-name, banker-name)lbanker-name branch namelbranch name customer-name banker-nameCS_Dept.Sichaun Univ.DB System2022/5
37、/1033/137decompose R (with F) into R1, R2,., Rn we wantLossless-join decomposition: 無損No redundancy: 無冗 , BCNF 或3NF.Dependency preservation: 保依 (賴).CS_Dept.Sichaun Univ.DB System2022/5/1034/137If A B and B C (成立)then A C (成立)能被F推出的一切fd的集合稱為 closure of F. 記為 F+.We can find all of F+ by applying Armst
38、rongs Axioms:lif , then (reflexivity) 反反lif , then (augmentation) 增廣增廣lif , and , then (transitivity) 傳傳l派生規(guī)則:派生規(guī)則:These rules are lsound 可靠,推出來的都正確lcomplete 完備 (正確的都能推出來)l書上略去證明,本科時(shí)學(xué)習(xí)過。 如有時(shí)間可以演示證明CS_Dept.Sichaun Univ.DB System2022/5/1035/137并并 If holds and holds, then holds (union) I分分 holds, then
39、holds and holds (decomposition) 分解分解偽偽 If holds and holds, then holds (pseudotransitivity) 偽傳遞偽傳遞上述規(guī)則可由AA 推出,也可用FD的定義證明現(xiàn)在有:反、加、傳、偽、并、反、加、傳、偽、并、 分分CS_Dept.Sichaun Univ.DB System2022/5/1036/137滾雪球 F+ = F /初始化repeatfor each functional dependency f in F+ apply reflexivity and augmentation rules on f add
40、 the resulting functional dependencies to F+for each pair of functional dependencies f1and f2 in F+ if f1 and f2 can be combined using transitivity then add the resulting functional dependency to F+until F+ does not change any further還有其他算法1 用反射和增廣 滾雪球2 用傳遞 滾雪球直到 不能 再增加CS_Dept.Sichaun Univ.DB System
41、2022/5/1037/137We can further simplify manual computation of F+ by using the following additional rules. lIf holds and holds, then holds (union) 并并lIf holds, then holds and holds (decomposition) 分解分解lIf holds and holds, then holds (pseudotransitivity) 偽傳遞偽傳遞lThe above rules can be inferred from Arms
42、trongs axioms. 上述規(guī)則可由AA 推出,也可用FD的定義證明l現(xiàn)在有:反、加、傳、偽、并、反、加、傳、偽、并、 分分用下則簡化操作CS_Dept.Sichaun Univ.DB System2022/5/1038/137還需要另外一個(gè)新的概念Closure of Attribute Sets 屬性閉包 (與F+概念不同).CS_Dept.Sichaun Univ.DB System2022/5/1039/137 屬性集 屬性閉包(在F下)Given a set of attributes , define the closure of under F (denoted by +)
43、 as the set of attributes that are functionally determined by under F: is in F+ +Algorithm to compute +, the closure of under F 算法 滾雪球result := ; /從 開始 while (changes to result ) dofor each in F dobeginif result then result := result end比喻 :滾雪球,親戚 是閉包, 找 親戚的親戚 (也是親戚)a由 通過F 可以搞定的那些的集合稱為 的閉包CS_Dept.Si
44、chaun Univ.DB System2022/5/1040/137R = (A, B, C, G, H, I)F = A B, A C, CG H,CG I,B H求(AG)+ 步驟:l1.result = AG 開始l2.result = ABCG /(A C and A B) 把A的親戚加進(jìn)來l3.result = ABCGH /(CG H and CG AGBC) 加 Hl4.result = ABCGHI/(CG I and CG AGBCH) 加 I用途 ;判斷 Is AG a candidate key? lIs AG a super key? 檢查 Does AG R? lI
45、s any subset of AG a superkey? 檢查下列子集的閉包Does A+ R?Does G+ R?CS_Dept.Sichaun Univ.DB System2022/5/1041/137There are several uses of the attribute closure algorithm:Testing for superkey: 1 測試超關(guān)鍵字l is超關(guān)鍵字 iff R in +Testing functional dependencies 2 測試FDl測試 holds (or, in other words, is in F+), just che
46、ck if +. lIs a simple and cheap test, and very useful 此法效率高 3 Computing closure of FlFor each R, we find the closure +, land for each S +, 則輸出 FD S.CS_Dept.Sichaun Univ.DB System2022/5/1042/137There are several uses of the attribute closure algorithm:Testing for superkey: 1 測試超關(guān)鍵字l is超關(guān)鍵字 iff R in +
47、Testing functional dependencies 2 測試FDl測試 holds (or, in other words, is in F+), just check if +. lIs a simple and cheap test, and very useful 此法效率高 3 Computing closure of FlFor each R, we find the closure +, land for each S +, 則輸出 FD S.屬性閉包S 是能被確定的屬性CS_Dept.Sichaun Univ.DB System2022/5/1043/137思路:FD
48、 的集合不是很精煉,有些是能被其他推出的(冗余)想找出其精英或核心lEg: A C is redundant in: A B, B C, A ClParts of a functional dependency may be redundantE.g. on RHS: A B, B C, A CD can be simplified to A B, B C, A D E.g. on LHS: A B, B C, AC D can be simplified to A B, B C, A D Intuitively, a canonical cover of F is a “minimal” s
49、et of functional dependencies equivalent to F, with no redundant dependencies or having redundant parts of dependencies 刪除冗余后,成為最精煉F 成為最小覆蓋CS_Dept.Sichaun Univ.DB System2022/5/1044/137思路:FD 的集合不是很精煉,有些是能被其他推出的(冗余)想找出其精英或核心lEg: A C is redundant in: A B, B C, A ClParts of a functional dependency may b
50、e redundantE.g. on RHS: A B, B C, A CD can be simplified to A B, B C, A D E.g. on LHS: A B, B C, AC D can be simplified to A B, B C, A D Intuitively, a canonical cover of F is a “minimal” set of functional dependencies equivalent to F, with no redundant dependencies or having redundant parts of depe
51、ndencies 刪除冗余后,成為最精煉F 成為最小覆蓋可刪除CS_Dept.Sichaun Univ.DB System2022/5/1045/137思路:FD 的集合不是很精煉,有些是能被其他推出的(冗余)想找出其精英或核心lEg: A C is redundant in: A B, B C, A ClParts of a functional dependency may be redundantE.g. on RHS: A B, B C, A CD can be simplified to A B, B C, A D E.g. on LHS: A B, B C, AC D can be
52、 simplified to A B, B C, A D Intuitively, a canonical cover of F is a “minimal” set of functional dependencies equivalent to F, with no redundant dependencies or having redundant parts of dependencies可刪除刪除冗余后,成為最精煉F 成為 最?。ㄕ齽t)覆蓋CS_Dept.Sichaun Univ.DB System2022/5/1046/137F FD 集合 , in F.lAttribute A
53、is extraneous in if A and F logically implies (F ) ( A) .lAttribute A is extraneous in if A and the set of functional dependencies (F ) ( A) logically implies F.Example: Given F = A C, AB C lB is extraneous in AB C because A C logically implies AB C.Example: Given F = A C, AB CDlC is extraneous in A
54、B CD since A C can be inferred even after deleting CA在箭尾中是多余的沒有它,靠F中其他的也能推出其余規(guī)律A在箭頭中是多余的沒有它,靠其他的也能推出F多余的B多余的CCS_Dept.Sichaun Univ.DB System2022/5/1047/137F FD 集合 , in F.lAttribute A is extraneous in if A and F logically implies (F ) ( A) .lAttribute A is extraneous in if A and the set of functional
55、dependencies (F ) ( A) logically implies F.Example: Given F = A C, AB C lB is extraneous in AB C because A C logically implies AB C.Example: Given F = A C, AB CDlC is extraneous in AB CD since A C can be inferred even after deleting CA在箭尾中是多余的沒有它,靠F中其他的也能推出其余規(guī)律A在箭頭中是多余的沒有它,靠其他的也能推出F多余的B多余的CCS_Dept.S
56、ichaun Univ.DB System2022/5/1048/137Consider a set F of functional dependencies and the functional dependency in F.l 測試箭尾 A是否多余l(xiāng)To test if attribute A is extraneous in lcompute (-A)+ using the dependencies in F 如 (-A)+包含 ; 則 A 是多余的lTo test if attribute A is extraneous in 測箭頭 A是否多余compute + using onl
57、y the dependencies in F = (F ) ( A), 推理工具中扣除A 如 + 包含 A; 則 A is extraneousCS_Dept.Sichaun Univ.DB System2022/5/1049/137Consider a set F of functional dependencies and the functional dependency in F.l 測試箭尾 A是否多余l(xiāng)To test if attribute A is extraneous in lcompute (-A)+ using the dependencies in F 如 (-A)+
58、包含 ; 則 A 是多余的lTo test if attribute A is extraneous in 測箭頭 A是否多余compute + using only the dependencies in F = (F ) ( A), 如 + 包含 A; 則 A is extraneous從推理工具中扣除ACS_Dept.Sichaun Univ.DB System2022/5/1050/137A canonical cover for F is a set of dependencies Fc such that 1 F 和 Fc 互相蘊(yùn)含(推導(dǎo))lF logically implies
59、all dependencies in Fc, and lFc logically implies all dependencies in F, and2 Fc 中無多余,很精煉,F(xiàn)D表達(dá)式左邊是惟一的lNo functional dependency in Fc contains an extraneous attribute, andlEach left side of functional dependency in Fc is unique.CS_Dept.Sichaun Univ.DB System2022/5/1051/137A canonical cover for F is a
60、 set of dependencies Fc such that 1 F 和 Fc 互相蘊(yùn)含(推導(dǎo))lF logically implies all dependencies in Fc, and lFc logically implies all dependencies in F, and2 Fc 中無多余,很精煉,F(xiàn)D表達(dá)式左邊是惟一的lNo functional dependency in Fc contains an extraneous attribute, andlEach left side of functional dependency in Fc is unique.C
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 承德應(yīng)用技術(shù)職業(yè)學(xué)院《機(jī)械設(shè)計(jì)基礎(chǔ)2》2023-2024學(xué)年第一學(xué)期期末試卷
- 承德醫(yī)學(xué)院《跨文化商務(wù)溝通》2023-2024學(xué)年第一學(xué)期期末試卷
- 承德護(hù)理職業(yè)學(xué)院《當(dāng)代社會問題研究》2023-2024學(xué)年第一學(xué)期期末試卷
- 2024年跨境電子產(chǎn)品銷售協(xié)議中英文件版B版
- 2024年版股權(quán)轉(zhuǎn)讓中介服務(wù)條款
- 2025版?zhèn)}單質(zhì)押授信業(yè)務(wù)-倉儲庫存融資合作協(xié)議3篇
- 2024正規(guī)旅游企業(yè)員工合同范本與旅游服務(wù)質(zhì)量承諾3篇
- 二零二五年二手家具買賣與環(huán)保質(zhì)量合同3篇
- 2025版集裝箱裝卸與物流配送機(jī)器人研發(fā)合同2篇
- 2025年度環(huán)境監(jiān)測數(shù)據(jù)共享與交換協(xié)議書模板
- 完整液壓系統(tǒng)課件
- 2024-2030年中國通信工程行業(yè)發(fā)展分析及發(fā)展前景與趨勢預(yù)測研究報(bào)告
- 2024四川省專業(yè)技術(shù)人員繼續(xù)教育考試題及答案
- 2024年安全員A證試題庫(附答案)
- 全球傳播導(dǎo)論 課件 第六章 全球傳播與公共外交
- 2022-2023學(xué)年廣東省廣州市天河區(qū)六年級(上)期末數(shù)學(xué)試卷(含答案)
- 北京市《配電室安全管理規(guī)范》(DB11T 527-2021)地方標(biāo)準(zhǔn)
- 國家開放大學(xué)2024春《1472藥劑學(xué)(本)》期末考試真題及答案-開放本科
- 妊娠合并泌尿系結(jié)石診斷治療中國專家共識解讀課件
- 2024中考語文《儒林外史》歷年真題專練(學(xué)生版+解析版)
- 海洋氣象大數(shù)據(jù)挖掘與應(yīng)用
評論
0/150
提交評論