Is the decomposition reversible for relational databases

121 views Asked by At

This question is from design theory of relational databases.

We know that the accepted way to eliminate anomalies(redundancy, update and delete anomalies) is to decompose relations. The goal of decomposition is to replace a relation by several that do not exhibit anomalies. And there are conditions like BCNF, 3NF and algorithms for decomposition of database into that forms.

So can we generally say that the decomposition process is always reversible(i.e. to be able to restore the initial state of db) ? If yes, how to prove it theoretically?

1

There are 1 answers

1
philipxy On BEST ANSWER

A "decomposition" of a schema is a collection of schemas that each have subset of its attributes. Typically a schema is accompanied by constraints. A "lossless" decomposition is one where if the values in the components are the projections of the original on their attributes then the components join back to the original. (A join of components of a lossy decomposition actually has a proper superset of the rows of the original.) A decomposition is lossless if and only if a certain join dependency holds.

So normalization is about nonloss decompositions.

Frequently though we are sloppy and just talk about a "decomposition" when in the context we all know it's nonloss.

Sometimes we find that a design is wrong in that instead of or in addition to an original we want to use a lossy decomposition, because it records more database states. (We might notice it while normalizing, but it's not a normalized version of the original.)

Any college/university textbook will make these definitions and properties clear and probably outline proofs. For a proof see the Alice book, Foundations of Databases by Abiteboul, Hull & Vianu.