943,731 Members | Top Members by Rank

Ad:
Jun 16th, 2009
0

Is there an advantage to this type of one-to-one relationship?

Expand Post »
Hi,

I just would like to ask if there is a benefit regarding this type of relationship between tables. Say I have a table named Student. I usually relate a table (one-to-one) to extend it. What I mean is so as to not put too much columns in Student table (and for organization), I typically relate a one-to-one relationship like this:

[Student.General] ---> [Student.Contact]
|
|--------------> [Student.Parent]
|
|--------------> [Etc.]

I distribute some other fields to other tables. I know this will be slower to query, but is there a performance impact for tables with lots of fields. And I also tend to do this so I can read data easier. What are some guidelines for no. of fields in a table? Thanks!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gnobber is offline Offline
14 posts
since Jun 2009
Jun 16th, 2009
0

Re: Is there an advantage to this type of one-to-one relationship?

I would say that the number of fields in a table has very little impact on database performance. I don't think you will notice a difference between the query speed of a table with just a few fields and a table with many fields. However, there is a limit on how many fields a table can have. For example, in MS Access, I don't think you can have more than 255 fields in a table. Other database managements systems, such as mySQL, support more fields.

Here is a link to a discussion about this topic:
http://www.codingforums.com/archive/...p/t-48570.html
Reputation Points: 27
Solved Threads: 29
Posting Whiz
timothybard is offline Offline
317 posts
since Mar 2007
Jun 19th, 2009
0

Re: Is there an advantage to this type of one-to-one relationship?

Well I understand that for a normalized DB this would not be much help. Look at this:

One-to-one relations

Normalization will never generate two tables with a one-to-one relationship between them. There is no theoretical reason to separate a single entity like this with some fields in a single record of one table and others in a single record of another table but you might want to split a table into two for practical reasons in order to:

* reduce the number of fields in a table and meet some limit in the programming language.
* store large and rarely-used fields in a separate table so that you do not waste time transferring and processing them during routine operations.
* separate sensitive information from commonly-used fields so that the tables can be stored and backed-up separately.

Since I'm no expert take my comments as such.
Reputation Points: 10
Solved Threads: 4
Junior Poster in Training
xpartmgr is offline Offline
51 posts
since Jun 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Database Design Forum Timeline: object-oriented database schema
Next Thread in Database Design Forum Timeline: Normalization Question





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC