RSS Forums RSS
Please support our Database Design advertiser: Programming Forums
Views: 1296 | Replies: 9
Reply
Join Date: Jul 2007
Posts: 5
Reputation: drtanz is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
drtanz drtanz is offline Offline
Newbie Poster

need feedback on db design

  #1  
Jul 23rd, 2007
Hi I have made a tentative db design for my system and would like some feedback on whether you think it is well constructed, it can be found here:

www.jpgalea.com/design.jpg

Thanks
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,468
Reputation: debasisdas is on a distinguished road 
Rep Power: 4
Solved Threads: 88
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Nearly a Posting Virtuoso

Re: need feedback on db design

  #2  
Jul 24th, 2007
thats OK ,but u have mentiond only PK ,what about foreign keys .
you have not mentioned how are you maintaining ralations.
Share your Knowledge.
Reply With Quote  
Join Date: Jul 2007
Posts: 5
Reputation: drtanz is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
drtanz drtanz is offline Offline
Newbie Poster

Re: need feedback on db design

  #3  
Jul 24th, 2007
Originally Posted by debasisdas View Post
thats OK ,but u have mentiond only PK ,what about foreign keys .
you have not mentioned how are you maintaining ralations.


in MODULES, FK is review_id

in MODULES_ROLES_USERS, FK are module_id, user_id and role_id

in MODULES_TASKS_USERS, FK are task_id, module_id and user_id

in ROLES_TASKS, FK are role_id, task_id

makes sense?
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,468
Reputation: debasisdas is on a distinguished road 
Rep Power: 4
Solved Threads: 88
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Nearly a Posting Virtuoso

Re: need feedback on db design

  #4  
Jul 24th, 2007
it seems to be a good design following norms, but all depends on what is the logic you are going to implement on that. How youare going to use that is more important , on which i have no idea. It might happen you have to make some minor changes later on.
Share your Knowledge.
Reply With Quote  
Join Date: Jul 2007
Posts: 5
Reputation: drtanz is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
drtanz drtanz is offline Offline
Newbie Poster

Re: need feedback on db design

  #5  
Jul 24th, 2007
Originally Posted by debasisdas View Post
it seems to be a good design following norms, but all depends on what is the logic you are going to implement on that. How youare going to use that is more important , on which i have no idea. It might happen you have to make some minor changes later on.


I have uploaded a document with the description of the system. Someone has also remarked to me that I should split the modules_roles_users table into three: modules_roles, modules_users and roles_users but im not sure if this is better, what do you think?
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,468
Reputation: debasisdas is on a distinguished road 
Rep Power: 4
Solved Threads: 88
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Nearly a Posting Virtuoso

Re: need feedback on db design

  #6  
Jul 24th, 2007
As per rules of normalization ,that sounds good but in most of the cases we have to de-normalize the database to avaoid un-necessary complexcity. You can go with the structure and always there is room for improvement. Different people have different openion on the same scenario, and this is my personal view only.
Share your Knowledge.
Reply With Quote  
Join Date: Jul 2007
Posts: 5
Reputation: drtanz is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
drtanz drtanz is offline Offline
Newbie Poster

Re: need feedback on db design

  #7  
Jul 24th, 2007
Originally Posted by debasisdas View Post
As per rules of normalization ,that sounds good but in most of the cases we have to de-normalize the database to avaoid un-necessary complexcity. You can go with the structure and always there is room for improvement. Different people have different openion on the same scenario, and this is my personal view only.


So you think i should be able to work with it even without splitting those tables?
Reply With Quote  
Join Date: Jul 2007
Posts: 5
Reputation: drtanz is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
drtanz drtanz is offline Offline
Newbie Poster

Re: need feedback on db design

  #8  
Jul 24th, 2007
also i am unsure about using a separate id field for the primary key in the join tables rather than using the two foreign keys together as a primary key. what is ur opinion on this? thanks
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,468
Reputation: debasisdas is on a distinguished road 
Rep Power: 4
Solved Threads: 88
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Nearly a Posting Virtuoso

Re: need feedback on db design

  #9  
Jul 26th, 2007
no need to split the tables further, it might look efective to you initially but later on will create more problems than it will solve and will be difficult to manage as the tables grows.
Share your Knowledge.
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,468
Reputation: debasisdas is on a distinguished road 
Rep Power: 4
Solved Threads: 88
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Nearly a Posting Virtuoso

Re: need feedback on db design

  #10  
Jul 26th, 2007
also i am unsure about using a separate id field for the primary key in the join tables rather than using the two foreign keys together as a primary key. what is ur opinion on this? thanks

Even though u can use composit keys ,it is always recommended to use Primay key and again composit key based on foreignkey is not that recommended for any purpose. That should be used as the last option.
Share your Knowledge.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

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

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 5:52 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC