Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
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
Updated 18-Sep-12 6:36am
v2
Comments
[no name] 18-Sep-12 13:17pm    
It is not a question. You should discuss it in a suitable forum.
Christ_88 18-Sep-12 13:29pm    
Could you guide me a good forum about this subject.
fjdiewornncalwe 18-Sep-12 14:14pm    
Try the database forum here at CP. http://www.codeproject.com/Forums/1725/Database.aspx
Sergey Alexandrovich Kryukov 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
fjdiewornncalwe 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.

1 solution

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
 
Share this answer
 
v2
Comments
Christ_88 18-Sep-12 14:29pm    
Thank you for the answer.
Sergey Alexandrovich Kryukov 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 18-Sep-12 17:50pm    
Excellent answer :-D
Sergey Alexandrovich Kryukov 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900