nathanstevenson
IS-IT--Management
Hi all,
I was following a thread recently discussing the merits of normalisation at:
I think there is a specifc case in which it could be useful to include redundant data. It specifically relates to queries.
Say for example you have 15 tables all normalised down to one linked thread. Now the problem is that you want field c from table 9 and field a from table 1. Now to run a query which will compare the two, you have to include all the intermediate tables inorder to query these two fields.
Let's take it even further still. Let's say that for tables 1->8 there is a "top-down" type relationship structure, all the way to table 9. BUT tables 1-5 all have direct relationships with table 9 too. And you would want to compare them directly with table 9 without taking the other tables into account.
E.G. Which timesheets belong to which assignments, when it goes assignment, manager, contractor, job type, job details and then timesheet. It's much quicker if you simply include assignment ID in the timesheet table. And so too for the keys of tables 1-5.
Surely it allows for faster DB queries, and simpler coding?
What say the jury?
-Nathan Stevenson
Data Analyst
I was following a thread recently discussing the merits of normalisation at:
I think there is a specifc case in which it could be useful to include redundant data. It specifically relates to queries.
Say for example you have 15 tables all normalised down to one linked thread. Now the problem is that you want field c from table 9 and field a from table 1. Now to run a query which will compare the two, you have to include all the intermediate tables inorder to query these two fields.
Let's take it even further still. Let's say that for tables 1->8 there is a "top-down" type relationship structure, all the way to table 9. BUT tables 1-5 all have direct relationships with table 9 too. And you would want to compare them directly with table 9 without taking the other tables into account.
E.G. Which timesheets belong to which assignments, when it goes assignment, manager, contractor, job type, job details and then timesheet. It's much quicker if you simply include assignment ID in the timesheet table. And so too for the keys of tables 1-5.
Surely it allows for faster DB queries, and simpler coding?
What say the jury?
-Nathan Stevenson
Data Analyst