[img src=\"http://img388.imageshack.us/img388/193/modeldata4cp.jpg\" border=\"0\" alt=\"IPB Image\" /]
Above is an image which has a design of my database for my 3d animation project.
I have given a serial no for an 3d model such as: M01-AB0001-0010
M01 represents modelling category, while animation and other categories could have A02 & O03 eg.
AB0001 represents Shot no. of the many scenes such as AB.
0010 represents this is the 10th of the many models for this scene.
Right here, i have 3 major sections.
Hence, i decided to have
1 table for Modelling, Animation and other main categories
1 table for the various Scenes No.
1 table is for the no of the Model.
Is this design practical? or should I just insert the whole of "M01-AB0001-0010" into just one table to make it easier to do a search query?
Take note that what i have proposed for the 3 tables above, does not anticipate for the "-" in the serial no. Is it very tough if i were to join the tables up and have to include a "-" into the query?
Please guide and help me.
1 reply to this topic
Posted 23 December 2005 - 10:11 PM
Your design is good -- one table for each "part", and in each table your store the "part_number" (e.g. model_number, scene_number, etc.). Trying to combine all of these into one would be a nightmare for searches, since it would require parsing. I don't know why you're concerned about the complete serial number -- that not stored anywhere! It's calculated on-the-fly from the combined records from all 3 tables -- you will never have to include the separator in any query, since it's not relevant. Does that make sense?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users