lossless join decomposition
Normalization is used in a relation to remove inconsistencies,redundancy etc.In a relational model ,a relation is not normalized it is normalized using normalization techniques,we use decomposition as one of normalization technique.
Lossless join decomposition is used for decomposition of a relation in normalization.
Consider a relation R in relational model,lossless join decomposes this relation R into R1 and R2 relations if
R1 ⋈ R2 = R |
( ⋈ is the symbol of natural join)
that is natural join of R1 and R2 equals to the original relation R.
If a relation R decomposed into R1 and R2 using lossless join ,the following conditions hold.
R=(A,B,C) the relation is decomposed in to R1=(A,B) and R2=(B,C)
here, attribute(R1) attribute(R2 ) = (A,B) ( B,C) = (A,B,C)=R
attribute(R1) ∩ attribute(R2 ) = (A,B) ∩ ( B,C) =(B)
attribute(R1) ∩ attribute(R2 )=(B)= key of relation R2
The all conditions hold ,then the decomposition of relation R is lossless join decomposition.
Example
consider a relation in student database with attributes student_id,subject_name and subject_teacher. Each teacher teaches only one subject and for each subject have one or more students.
student_id | subject _name | subject_teacher |
---|---|---|
1500001 | Computer Science | Daisy Vargheese |
1500002 | English | Deepika M |
1500003 | Mathematics | Febin John |
1500004 | Hindi | Franklin K |
1500005 | History | Jorge K Jose |
1500006 | Computer Science | Daisy Vargheese |
In this relation the subject_teacher attribute depends the subject_name attribute not the student_id .So here to remove this problem we decompose the relation into two.
R1(student_id(PK),subject_name)
R2(subject_name(PK),subject_teacher)
so the relations R1 and R2 are follows,
student_id | subject_name |
---|---|
1500001 | Computer Science |
1500002 | English |
1500003 | Mathematics |
1500004 | Hindi |
1500005 | History |
1500006 | Computer Science |
subject _name | subject_teacher |
---|---|
Computer Science | Daisy Vargheese |
English | Deepika M |
Mathematics | Febin John |
Hindi | Franklin K |
History | Jorge K Jose |
The natural join of the R1 and R2 ,we get the relation R .So the decomposition is lossless join.
= R(student_id,subject_name,subject_teacher)
what do you mean by lossless-join decomposition, give an example of lossless join decomposition of: R=(A,B,C)...
*note no copy and from website course: database Question One What do you mean by Lossless-Join Decomposition, give an example of Lossless-Join decomposition of R = (A, B, C) in R1= (A, B) and R2 = (B, C) by drawing tables? k Learning Outcome(s): LO 3 explain the concepts and processes involved in database development. Question Two Write the USE of multivalued dependencies in two ways 2 Marks Question Three Learning Outcome(s): LO 6 create a database application to store...
can you answer part e of the question Q.31 Answer the following questions (a) Explain difference between lossy decomposition and lossless decomposition (b) If you write a SQL statement to inner join the following two tables based on Plocation value as inner join condition, is the result table lossy or lossless? (Explain why?) EMP LOCS P.K EMP PROJ1 Hours Pname Plocation Р.К. (c) Given a relation schema R ={SSN, Ename, Pnumber, Pname, Plocation, Hours) R is decomposed to R1, R2,...
Suppose that you decompose a schema R (A, B, C, D, E) into two schemas as below: R1 (A, B, C) R2 (C, D, E) Show that this decomposition is not a lossless join decomposition. Hint: Take a suitable Relation, r, for the Schema R and show that r is a lossy join decomposition.
Let R(A,B,C,D,E) be a relation with FDs F = {AB-CD, A-E, C-D, DE} The decomposition of R into R1(A, B, C), R2(B, C, D) and R3(C, D, E) is (2 Points) Select one: Lossy and Dependency Preserving. Lossless and Not Dependency Preserving. Lossy and Not Dependency Preserving. Lossless and Dependency Preserving.
R= ABCDEG decomposition: {AB, BC, ABDE, EG } F = {AB → C, AC → B, AD → E, B → D, BC → A, E → G} Is this lossless or not? Please Draw a table for this, the answer set online told me this is lossy, but when I do the table test, I find it is lossless.
Let R(A,B,C,D,E) be a relation with FDs F = {AB-CD, A-E, C-D, D-E} The decomposition of Rinto R1(A, B, C), R2(B, C, D) and R3(C, D, E) is 2 Points) Select one: Lossless and Dependency Preserving. Lossy and Not Dependency Preserving. Lossless and Not Dependency Preserving. Lossy and Dependency Preserving.
Let R(A,B,C,D,E) be a relation with FDs F = {AB-CD, A-E, C-D, D-E} The decomposition of Rinto R1(A, B, C), R2(B, C, D) and R3(C, D, E) is 2 Points) Select one: Lossless and Dependency Preserving. Lossy and Not Dependency Preserving. Lossless and Not Dependency Preserving. Lossy and Dependency Preserving.
Database question: Assume we have an instance of R(A, B, C) as given in the following table: Let R1 be a relation which is a PROJECTION of R on A and B (i.e, containing only columns A and B in R). R2 be a relation which is PROJECTION of R on A and C (i.e, containing only columns A and C in R), and R3 be a relation which is a PROJECTION of R on B (i.e, containing only column...
Consider the natural join of the relation R(A,B) and S(A,C) on attribute A. Neither relations have any indexes built on them. Assume that R and S have 80,000 and 20,000 blocks, respectively. The cost of a join is the number of its block I/Os accesses. If the algorithms need to sort the relations, they must use two-pass multi-way merge sort. QUESTION: Assume that there are 10 blocks available in the main memory. What is the fastest join algorithm for computing...
Consider the natural join of the relation R(A,B) and S(A,C) on attribute A. Neither relations have any indexes built on them. Assume that R and S have 80,000 and 20,000 blocks, respectively. The cost of a join is the number of its block I/Os accesses. If the algorithms need to sort the relations, they must use two-pass multi-way merge sort. Assume that there are 110,000 blocks available in the main memory. We like to have the output sorted based on...