Note that there are some explanatory texts on larger screens.

plurals
  1. POShip management database structure discussion (should denormalize?)
    primarykey
    data
    text
    <p>My software went in production some days ago and now I want to argue a bit about the database structure.</p> <p>The software collects data about ships, currently 174 details for each ship, each detail can be a text value, a long text value, a number (of a specified length, with or without a specified number of decimals), a date, a date with time, a boolean field, a menu with many values, a list of data and more.</p> <p>I solved the problem with the following tables</p> <pre> Ship: - ID - smallint, Autoincrement identity - IMO - int, A number that does not change for the life of the ship ShipDetailType: - ID - smallint, Autoincrement identity - Description - nvarchar(200), The description of the value the field contains - Position - smallint, The position of the field in the data input form - ShipDetailGroup_ID - smallint, A key to the group the field belongs to in the data input form - Type - varchar(4), The type of the field as mentioned above ShipDetailGroup - ID - smallint, Autoincrement identity (snip...) ShipMenuPresetValue - ID - smallint, Autoincrement identity - ShipDetailType_ID - smallint, A key to the detail the values belongs to - Value - nvarchar(100), The values preset in the menu type detail ShipTextDetail - ID - smallint, Autoincrement identity - Ship_ID - smallint, A Key to the ship the detail belongs to - ShipDetailType_ID - smallint, a Key to the detail type of the value - Text - nvarchar(500), the field containing the detail's value - ModifiedDate - smalldatetime - User_ID - smallint, A key to the user table ShipTextDetailHistory (snip...) This table is the same as the ShipTextDetail and contains every change to the details. Other tables for the list detail type, each with the specified fields required for the list, ... </pre> <p>I just read this article: <a href="http://thedailywtf.com/Articles/The_Inner-Platform_Effect.aspx" rel="nofollow noreferrer">http://thedailywtf.com/Articles/The_Inner-Platform_Effect.aspx</a> and <a href="http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:10678084117056" rel="nofollow noreferrer">http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:10678084117056</a></p> <p>The articles says that this is not the right way to handle the problem. </p> <p>My customer has a management gui for the details and groups as he changes the details descriptions and adds more details.</p> <p>The data input form is dynamically built by reading the structure from the DetailGroups and DetailTypes, each detail type generates a specified input control.</p> <p>The comments suggests that another way of solving this matter is dynamically creating and removing columns from the table.</p> <p>What do you think?</p> <p>Diagram Screenshot: <a href="http://img24.imageshack.us/my.php?image=66604496uk3.png" rel="nofollow noreferrer">http://img24.imageshack.us/my.php?image=66604496uk3.png</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload