Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi everybody,
I have started to design a database and every time i rethink about it, i am finding that i can use a new table instead of a field, and enhance the program ability.
 
but at the end i find out that there are a lot of tables with a lot of relations,so it means a lot of queries to the database, but on the other hand it can make my software what i am looking for.
 
what is your idea? is it wrong to use a lot of relations in a database?
 
thank you for you answers.
Posted 18-Sep-12 6:35am
Edited 18-Sep-12 6:36am
v2
Comments
Christ_88 at 18-Sep-12 13:29pm
   
Could you guide me a good forum about this subject.
Marcus Kramer at 18-Sep-12 14:14pm
   
Try the database forum here at CP. http://www.codeproject.com/Forums/1725/Database.aspx
Sergey Alexandrovich Kryukov at 18-Sep-12 14:27pm
   
I don't think better forum will help more -- the problem is more fundamental, about the approach to the problem. Please see my other comments and my answer.
--SA
Marcus Kramer at 18-Sep-12 14:36pm
   
I agree, sort of. I suggested the forum because this isn't really a question about coding and such, but rather a theoretical discussion topic on relational design and such. If it becomes a discussion it is better suited to the forums rather than here. Cheers.
Sergey Alexandrovich Kryukov at 18-Sep-12 16:09pm
   
Well, then the forum you mentioned would be good to look at.
Thank you.
--SA
Christ_88 at 18-Sep-12 14:40pm
   
thank you
Sergey Alexandrovich Kryukov at 18-Sep-12 14:26pm
   
This is not about the forum; rather, it's because your approach may be based on some misconception and because your approach to posing the problems is generally counter-productive -- please see my other comment and my answer.
--SA
Sergey Alexandrovich Kryukov at 18-Sep-12 14:16pm
   
This is a question actually, but the approach to posing a problem is pretty much counter-productive.
--SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Please see my comment to the question. Your question might be based on some your misconception or maybe the conception you do not explain.
 
The relationships should not really be quantified by the total number of them or something like that. And "a lot of relations" does not have to mean "a lot of queries", it you do it right. The structure of relations should be defined by the structure of actual knowledge you want to represent with a database. Perhaps you need to start approaching it all by learning about such thing as database normalization:
http://en.wikipedia.org/wiki/Database_normalization[^].
 
You should also understand, that one of the most important principles here is the "Don't Repeat Yourself" principle:
http://en.wikipedia.org/wiki/Don%27t_repeat_yourself[^].
 
And then you will be able to look for the optimization:
http://en.wikipedia.org/wiki/Database_tuning[^],
http://en.wikipedia.org/wiki/Query_optimization[^].
 
Good luck,
—SA
  Permalink  
v2
Comments
Christ_88 at 18-Sep-12 14:29pm
   
Thank you for the answer.
Sergey Alexandrovich Kryukov at 18-Sep-12 14:30pm
   
You are very welcome. Hope learning the concepts can help you a lot.
Good luck, call again.
--SA
Espen Harlinn at 18-Sep-12 17:50pm
   
Excellent answer :-D
Sergey Alexandrovich Kryukov at 18-Sep-12 18:09pm
   
Thank you very much, Espen.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 288
1 Maciej Los 260
2 Manfred R. Bihy 190
3 _Amy 180
4 CHill60 180
0 OriginalGriff 7,445
1 Sergey Alexandrovich Kryukov 6,177
2 Maciej Los 3,774
3 Peter Leow 3,478
4 CHill60 2,702


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 18 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100