Click here to Skip to main content
11,495,534 members (59,324 online)
Rate this: bad
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 7:35am
Edited 18-Sep-12 7:36am
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.
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.
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.
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.
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.

1 solution

Rate this: bad
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:[^].

You should also understand, that one of the most important principles here is the "Don't Repeat Yourself" principle:[^].

And then you will be able to look for the optimization:[^],[^].

Good luck,
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.
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.

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

  Print Answers RSS
0 Dnyaneshwar@Pune 692
1 CHill60 318
2 Sascha Lefèvre 265
3 Nakul Chaudhari 236
4 Sergey Alexandrovich Kryukov 230
0 Sergey Alexandrovich Kryukov 10,322
1 OriginalGriff 8,821
2 Sascha Lefèvre 3,889
3 Maciej Los 3,422
4 Richard Deeming 2,560

Advertise | Privacy | Mobile
Web02 | 2.8.150520.1 | Last Updated 18 Sep 2012
Copyright © CodeProject, 1999-2015
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