Lossless-join decomposition, Database Management System

Assignment Help:

Lossless-Join Decomposition

 

Let us show an intuitive decomposition of a relation. We require a better basis for deciding decompositions since intuition may not always be right. We show how a careless decomposition may lead to problems containing loss of information.

Consider the following relation

ENROL (stno, cno, date-enrolled, room-no, instructor)

Suppose we decompose the above relation into two relations enrol and enrol2 as follows:

ENROL1 (stno, cno, date-enrolled)

ENROL2 (date-enrolled, room-no, instructor)

There are troubles with this decomposition but we do not wish to focus on this aspect at the moment. Let a case of the relation ENROL be:

St no

cno

Date-enrolled

Room-no

Instructor

1123

MCS-011

20-06-2004

1

Navyug

1123

MCS-012

26-09-2004

2

Anurag Sharma

1259

MCS-011

26-09-2003

1

Preeti Anand

1134

MCS-015

30-10-2005

5

Preeti Anand

2223

MCS-016

05-02-2004

6

Shashi Bhushan

                                                              Figure:  A sample relation for decomposition

Then on decomposition the relations ENROL1 and ENROL2 would be:

St no

Cno

Date-enrolled

1123

MCS-011

20-06-2004

1123

MCS-012

26-09-2004

1259

MCS-011

26-09-2003

1134

MCS-015

30-10-2005

2223

MCS-016

05-02-2004

 

 

ENROL1

ENROL2

Date-enrolled

Room-no

Instructor

20-06-2004

1

Navyug

26-09-2004

2

Anurag Sharma

26-09-2003

1

Preeti Anand

30-10-2005

5

Preeti Anand

05-02-2004

6

Shashi Bhushan

All the information that was in the relation ENROL appears to be still existing in ENROL1 and ENROL2 but this is not so. Assume, we wanted to retrieve the student numbers of all students taking a course from Preeti Anand, we would require to join ENROL1 and ENROL2. For joining the only general attribute is Date-enrolled. Therefore, the resulting relation obtained will not be the similar as that of Figure. (Please do the verify and join the resulting relation).

The join will have a number of spurious tuples that were not in the unique relation. Because of these additional tuples, we have lost the correct information about which students take courses from Preeti Anand. (Yes, we have many tuples but less information because we are not capable to say with certainty who is taking courses from Preeti Anand). Such decompositions are known as lossy decompositions. Lossless or nonloss decomposition is that which surety that the join will result in exactly the similar relation as was decomposed. One might think that there may be other ways of recovering the unique relation from the decomposed relations but, sadly, no other operators can recover the unique relation if the join does not (why?).

We require to analyse why the decomposition is lossy. The general attribute in the above decompositions was Date-enrolled. The general attribute is the glue that provides us the ability to find the relationships among different relations by joining the relations simultaneously. If the general attribute have been the primary key of at least one of the two decomposed relations, the trouble of losing information would not have existed. The trouble arises because various enrolments may take place on the similar date.


Related Discussions:- Lossless-join decomposition

Functional dependencies and normalization for relational dat, Consider the ...

Consider the 1ollowin8 relation: CAR SALE (Car_id, Option_type, Option_listprice, Sale_date, Option_discountedprice) This relation refers to options installed in cars (e.g., crui

A set of possible data values is called, A set of possible data values is c...

A set of possible data values is called? A set of possible data values is called as domain.

The second normal form (2nf), The Second Normal Form (2NF) Definition: ...

The Second Normal Form (2NF) Definition: A relation is in 2NF if it is in 1NF and each non-key attribute is fully dependent on each candidate key of the relation. Some of th

Explain the disadvantages of file oriented approach, Explain the disadvanta...

Explain the disadvantages of file oriented approach? In the oriented approach Applications are designed in isolation. Design of application is optimized for one application. In

Inconsistent analysis-problems of concurrent transactions, Inconsistent Ana...

Inconsistent Analysis : The problem as given with transactions T1 and T2 where two transactions interleave to make incorrect result during an analysis by Audit is the instance of s

Explain the 10 reasons to use mysql, Question 1 Explain the 10 reasons to ...

Question 1 Explain the 10 reasons to use MySQL Question 2 Write the SQL statements to demonstrate the following using SELECT command Expression Evaluation ORDER BY

Draw the precedence graph, Draw the precedence graph of the following sched...

Draw the precedence graph of the following schedule and determine whether the schedule is serializable. (Note that all instructions, except lock and unlock, are omitted. We assume

Explain the paths in the association network, Explain the paths in the asso...

Explain the paths in the association network We can analyze use of paths in the association network as given below: Calculate each operation Find associations whic

Creation of indexes, Creation of Indexes Automatically: When a primar...

Creation of Indexes Automatically: When a primary key or Unique constraint is show in a table definition then a unique index is formed automatically. Manually: User can

Data manipulation language, Data Manipulation Language Data manipulatio...

Data Manipulation Language Data manipulation language (DML) describes a set of commands that are used to query and change data within existing schema objects. In this case comm

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd