functional-dependencies

Lossless Join and Decomposition From Functional Dependencies

倾然丶 夕夏残阳落幕 提交于 2019-12-31 10:49:27
问题 Suppose the relation R( K, L, M, N, P) , and the functional dependencies that hold on R are: - L -> P - MP -> K - KM -> P - LM -> N Suppose we decompose it into 3 relations as follows: - R1(K, L, M) - R2(L, M, N) - R3(K, M, P) How can we tell whether this decomposition is lossless? I used this example R1 ∩ R2 = {L, M}, R2 ∩ R3 = {M}, R1 ∩ R3 = {K,M} we use functional dependencies, and this is not lossless in my opinion, but a little bit confused. 回答1: It helps if we demystify the concept of

Are Determinants and Candidate Keys same or different things?

霸气de小男生 提交于 2019-12-28 13:53:38
问题 Here I found this: Definition: A determinant in a database table is any attribute that you can use to determine the values assigned to other attribute(s) in the same row. Examples: Consider a table with the attributes employee_id, first_name, last_name and date_of_birth. In this case, the field employee_id determines the remaining three fields. The name fields do not determine the employee_id because the firm may have more than one employee with the same first and/or last name. Similarly, the

Are Determinants and Candidate Keys same or different things?

和自甴很熟 提交于 2019-12-28 13:53:27
问题 Here I found this: Definition: A determinant in a database table is any attribute that you can use to determine the values assigned to other attribute(s) in the same row. Examples: Consider a table with the attributes employee_id, first_name, last_name and date_of_birth. In this case, the field employee_id determines the remaining three fields. The name fields do not determine the employee_id because the firm may have more than one employee with the same first and/or last name. Similarly, the

Normalization on relational schema with no functional dependencies

梦想与她 提交于 2019-12-25 18:54:44
问题 R = ( A, B, C, D ) - No functional dependencies are valid in the relational schema R For the above relational, what is the highest normal form? I have a question where i am supposed to identify the highest normal form and decompose it into BCNF if it is not in BCNF. 回答1: If no valid FDs holds (a part from the trivial dependencies), then the only candidate key is ABCD, and the relation is both in 3NF and BCNF. 来源: https://stackoverflow.com/questions/59008573/normalization-on-relational-schema

How do you determine functional dependencies and a primary key?

拜拜、爱过 提交于 2019-12-24 15:18:46
问题 In my Oracle Database Programming course, the first part of our final lab assessment requires that we: Identify the Primary Key of the table as it is currently shown Find all functional dependencies of the table which we are given to work with. Draw the dependency diagram for the table(s) The table is in 1NF to begin with. From the research I have done, it seems like I need to essentially combine every possible FD, which would not only consume a very large amount of time, but seems bizarre

boyce codd and finding candidate keys

狂风中的少年 提交于 2019-12-24 14:06:59
问题 needing desperate help with understanding boyce codd and finding the candidate keys. i found a link here http://djitz.com/neu-mscs/how-to-find-candidate-keys/ which i have understood for most part but i get stuck e.g (A B C D E F) A B → C D E B C D → A B C E → A D B D → E right as far as i understand from the link i know you find the common sets from the left which is only B, and common sets from the right which are none now where do i go from here? i know all candidate sets will have B in

Learning database normalization, confused about 2NF

喜夏-厌秋 提交于 2019-12-22 16:29:14
问题 I was looking at this video on normalization on youtube and I have to say I am confused now, I there might be errors in the video even though it has 25 likes and only 1 dislike. Normalization Specifically regarding the 2NF section which can be found at the 5 minute mark. The author says the 'Assignment Description' column depends on the Assignment ID column...yet there are there are different Assignment Descriptions for the same Assignment ID. He then 'normalizes' this table into 2NF by

Decomposition that does not preserve functional dependency

荒凉一梦 提交于 2019-12-22 11:06:19
问题 When can a BCNF decomposition not preserve functional dependency... I am trying to figure this out for say R=(V,W,X,Y,Z) 回答1: The point of a BCNF decomposition is to eliminate functional dependencies that are not of the form key -> everything else So if a table has a FD, say A -> B, such that A is not a key, it means you're storing redundant data in your table. As a result, you create a new table with columns A and B, with A being the key, then you remove B from your original table. As a

Role of functional dependency in `Unfoldable` typeclass of Haskell Collection API

不羁岁月 提交于 2019-12-19 20:37:52
问题 Im trying to understand the design of Haskell's Data.Collection library, coming from a Scala-literate background. It uses Functional Dependencies (which have a Scala analog) but the way they're used doesn't make sense to me. In the Unfoldable class, reproduced below, the element type i is shown as determined by the collection type c . class Unfoldable c i | c -> i Class of collection with unobservable elements. It is the dual of the Foldable class. Please explain the role that the dependency

Role of functional dependency in `Unfoldable` typeclass of Haskell Collection API

好久不见. 提交于 2019-12-19 20:36:02
问题 Im trying to understand the design of Haskell's Data.Collection library, coming from a Scala-literate background. It uses Functional Dependencies (which have a Scala analog) but the way they're used doesn't make sense to me. In the Unfoldable class, reproduced below, the element type i is shown as determined by the collection type c . class Unfoldable c i | c -> i Class of collection with unobservable elements. It is the dual of the Foldable class. Please explain the role that the dependency