4

I found this paper written by Hugh Darwen for avoiding nulls in my database: Link, It describes how to implement databases in the 6th normal form so you can avoid nulls. The logic is described in the language tutorial D. I understand how to convert all this logic into SQL Server. But at the end of the he shows how well this can be implemented in current database management systems, and then I see this part I need to implement:

  • Recomposition query: can be done but likely to perform horribly. Might be preferable to store PERS_INFO as a single table under the covers, so that the tables resulting from decomposition can be implemented as mappings to that. But current technology doesn’t give clean separation of physical storage from logical design. Perhaps something for the next generation of software engineers to grapple with?

It suggest storing PERS_INFO as a single table under the covers, but what does that really mean? How would I implement that in SQL Server?

migrated from stackoverflow.com Dec 9 '11 at 13:14

This question came from our site for professional and enthusiast programmers.

6

Might be preferable to store PERS_INFO as a single table under the covers, so that the tables resulting from decomposition can be implemented as mappings to that. But current technology doesn’t give clean separation of physical storage from logical design.

He's talking about the dbms storing it as a single table, not you storing it as a single table.

The relational model itself says nothing about physical storage. It only requires that "the database be perceived by the user as tables. . . . At the physical level, in fact, the system is free to store the data any way it likes . . ." (An Introduction to Database Systems, 7th ed., CJ Date, p 61)

So Darwen is saying that if the database designer declares a set of 6NF tables, along with their

  • candidate keys,
  • distributed keys,
  • foreign keys,
  • foreign distributed keys,
  • and so on,

then the dbms is free to

  • implement that set of 6NF tables as a single table in a SQL tablespace,
  • hide that single-table implementation from the user, and
  • expose to the users a set of updatable views that are indistinguishable from the 6NF tables the database designer declared.

Having said all that, you might be able to work around the lack of dbms support by creating a single table on top of the covers (so to speak), and create a set of updatable views that are indistinguishable from your 6NF design. Revoke permissions on the single table, and require all users to use only the updatable views. What you can't do is have the dbms take care of all those details based solely on a series of logically correct, 6NF CREATE TABLE statements.

4

Download Dr. Hugh Darwen's free PDF book, An Introduction to Relational Database Theory. Specifically, chapter 7 and the WIFE_OF_HENRY_VIII example. In summary, 6NF is always achievable but may not always be desirable in practice if it makes constraints harder to write.

It is also briefly mentioned in Database, Types, and the Relational Model.

To answer your question, it sounds like the suggestion is to create views, possibly with INSTEAD OF triggers, based on a base table then remove privileges from the base table so that users target the views only but that such implementation details are beyond the scope of his paper.

See also The Third Manifesto homepage.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.