Live data from Hacker News

5NF and Database Design

kb.databasedesignbook.com

81–86 of 86 posts

Re: 5NF and Database Design

#81
post #63

Earlier quoted context omitted.

> Junction tables are how you represent M:N relationships. Yeah, the problem is that when you get to 4NF+, you're often looking at creating a new table joining through a junction table for a single multi-valued data field that may be single values a plurality or majority of the time. So you need the base table, the junction table that has at least two columns, and the actual data table. So, you've added two tables, t…

Right. But faceting data is also part of what a good database designer does. That includes views over the data; materialisation, if it is justified; stored procedures and cursors. I've never had to do 18 joins to extract information in my career. I'm sure these cases do legitimately exist but they are of course rare, even in large enterprises. Most companies are more than capable of distinguishing OLTP from OLAP and…

> I've never had to do 18 joins to extract information in my career.

Really? You're not representing particularly complex entities with your data.

I work on a student information system. 18 joins isn't even weird. If I want a list of the active students, the building they're in, and their current grade level, that's a join of 8 tables right there. If I also want their class list, that's an additional 5 or 6. If you also want the primary teacher, add another 4. If you want secondary staff, that's another 5.

The whole system is only around 500 GB, but it's close to 2,000 tables. Part of the reason is tech debt archaic design from the vendor, but that's just as likely to reduce the number of tables as it is to increase them. The system uses a monolithic lookup table design, and some of the tables have over 300 columns. If they were to actually properly normalize the entire system to 3NF, I have no doubt that it would be in the hundreds of thousands of tables.

Re: 5NF and Database Design

#83
post #80

Earlier quoted context omitted.

> Also, personally I think that 6NF should be foundational, but that's a separate matter. I share your ideal, but there exists a slight problem: no RDBMS I'm aware of really facilitates 6NF or DKNF (or even Codd's full relational concept; or newfound essentials like relational-division, and so on...). There are also genuine ergonomic issues to contend with: pretty-much every RDBMS design and/or administration tool I'…

I broadly agree with you, so I want to pick your brain a bit: What would your ideal RDBMS / tooling look like, that facilitates 6nf effectively? Do you think it's more a limitation of the query/storage engine, or the query language (SQL), or the user interface? Do you think founding on Datalog (or similar), which kinda lends itself to "narrow" relations, instead of SQL which kinda lends itself to "wide" relations, wo…

Is there a good way to contact you - ideally something like IM or Teams/Slack/Zoom?

Re: 5NF and Database Design

#84
post #80

Earlier quoted context omitted.

I broadly agree with you, so I want to pick your brain a bit: What would your ideal RDBMS / tooling look like, that facilitates 6nf effectively? Do you think it's more a limitation of the query/storage engine, or the query language (SQL), or the user interface? Do you think founding on Datalog (or similar), which kinda lends itself to "narrow" relations, instead of SQL which kinda lends itself to "wide" relations, wo…

Is there a good way to contact you - ideally something like IM or Teams/Slack/Zoom?

sure! You can email me at notches_hoses_58@icloud.com (throwaway email), and we could go from there?

Re: 5NF and Database Design

#85
post #84

Earlier quoted context omitted.

Is there a good way to contact you - ideally something like IM or Teams/Slack/Zoom?

sure! You can email me at notches_hoses_58@icloud.com (throwaway email), and we could go from there?

Reply sent just now.

Re: 5NF and Database Design

#86
post #16

Earlier quoted context omitted.

> Someone, somewhere writing down a list and that list being blessed with the imprimatur of Academic Approval (TM) One problem is that normal forms are underspecified even by the academy. E.g., Millist W. Vincent "A corrected 5NF definition for relational database design" (1997) (!) shows that the traditional definition of 5NF was deficient. 5NF was introduced in 1979 (I was one year old then). 2NF and 3NF should bas…

"1979 (I was one year old then)." Well, we are roughly the same age then. Our is a cynical generation. "One problem is that normal forms are underspecified even by the academy." The cynic in me would say they were doing their job by the example I gave, which is just to provide easy test answers, after which there wasn't much reason to iterate on them. I imagine waiving around normalization forms was a good gig for co…

Correct database normalization seems like it would have been make or break in a time of incredibly slow storage.
Post reply on HN