Databases and File Storage Discuss database applications like mySQL and Postgres or other methods of storing data on the server.

Reply
 
Thread Tools

  #1  
Old 12-31-2011, 01:18 PM
Panupat's Avatar
Panupat Panupat is offline
Tazmanian
 
Real Name: Panupat
Join Date: Feb 2010
Admin Experience: Intermediate
Location: Thailand
Age: 34
Posts: 1,539
Panupat has much to be proud ofPanupat has much to be proud ofPanupat has much to be proud ofPanupat has much to be proud ofPanupat has much to be proud ofPanupat has much to be proud ofPanupat has much to be proud ofPanupat has much to be proud of
Default Need some advice designing my database
This database is mainly for recording "items". Here's my condition

I create a project.

In each projects are many episodes.
In each episodes are many shots.
In each shots are many items.

Episode can only be under 1 project.
Same as shots which will be under 1 episode
and items which will only be under 1 shot.

Users can choose filters to list the items. Like this

Choose project --> load list of available episodes
choose episode --> load list of available shots

The user can choose only project alone to show all items under it, or choose episode too, or choose shot too.

In this case, which table design would be more appropriate? Top or bottom?
Attached Images
File Type: png data-table.png (40.5 KB, 17 views)
Reply With Quote
  #2  
Old 04-26-2012, 08:39 PM
xMog xMog is offline
TAZ Rookie
 
Real Name: ???
Join Date: Apr 2012
Posts: 3
xMog is on a distinguished road
Default
The top one.

The second one is not logical (if you compare it to the "real life" model) and you have duplicate keys. To manage duplicate keys, you'll have to add more code if you want to write an admin panel to enter your data, for example.

And the first one is more suitable for future evolution and is easier to understand.
Reply With Quote
Reply

  Admin Zone Forums > The Development Zone > Databases and File Storage





Currently Active Users Viewing this Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Advice on database and space Star08 Databases and File Storage 3 01-20-2010 09:17 AM
Advice on IP/Server/Database prettypolly Servers and Hosting 3 09-18-2008 09:53 PM
Automatic Database Backup/Cron Job Advice? josephezell Databases and File Storage 6 07-04-2007 03:47 AM
Website designing, forum skin designing & site maintenance for a reasonable price. compdee Community Cooperative 0 12-16-2006 04:19 PM
Advice for pruning database infidelMatt vBulletin 2 01-07-2006 06:11 PM


 

All times are GMT -4. The time now is 08:30 PM.


Powered by: vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Page generated in 0.05101109 seconds with 16 queries
The Admin Zone copyright 2003-2014 All Rights Reserved. Content published on The Admin Zone requires permission for reprint.