Jump to content

Recommended Posts

modeldata4cp.jpg\" border=\"0\" alt=\"IP

 

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.

Link to comment
https://forums.phpfreaks.com/topic/3077-database-design/
Share on other sites

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?

Link to comment
https://forums.phpfreaks.com/topic/3077-database-design/#findComment-10341
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.