Question

what do you mean by lossless-join decomposition, give an example of lossless join decomposition of: R=(A,B,C)...

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 table?

this question its for fundimental database subject I need defferent answer to avoid high percentage of plegrisem
0 0
Add a comment Improve this question Transcribed image text
Answer #1

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.

  1. Union of attributes in R1 and R2 is equal to the attributes in relation R.
  2. Intersection of attributes in R1 and R2 is not null.
  3. The intersection of R1 and R2 must be the key for atleast one relation R1 or R2

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.

  • R(student_id,subject name,subject_teacher)

  

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,

  • R1(student_id(PK),subject_name)
student_id subject_name
1500001 Computer Science
1500002 English
1500003 Mathematics
1500004 Hindi
1500005 History
1500006 Computer Science
  • R2(subject_name(PK),subject_teacher)
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.

  • R1(student_id,subject_name)    R2(subject_name,subject_teacher)

= R(student_id,subject_name,subject_teacher)

  • R1(student_id,subject_name)  ∩   R2(subject_name,subject_teacher) = R(student_name)​​​​​​​

​​​​​​​

  • R(student_name) is the key for relation  R2

​​​​​​​

  • R1(student_id(PK),subject_name) ⋈  R2(subject_name(PK),subject_teacher)
Add a comment
Know the answer?
Add Answer to:
what do you mean by lossless-join decomposition, give an example of lossless join decomposition of: R=(A,B,C)...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT