diskhub Posted December 20, 2005 Share Posted December 20, 2005 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. Quote Link to comment https://forums.phpfreaks.com/topic/3077-database-design/ Share on other sites More sharing options...
fenway Posted December 23, 2005 Share Posted December 23, 2005 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? Quote Link to comment https://forums.phpfreaks.com/topic/3077-database-design/#findComment-10341 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.