If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Database design

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-19-04, 00:16
sisleysusie sisleysusie is offline
Registered User
 
Join Date: Jan 2004
Posts: 1
Smile Database design

Hi everyone,
This semester i am taking database design as one of my subject and i am using mysql. I am required to design a database for student registration which consists of individual and group registration which i will put in one database called registration. The atribute for both registration are almost the same, but there are some atribute that are different also. I was thinking of creating two tables, one for individual_registration and another one is for group_registration. Will i be having any problem if these two tables are created since most of the atributes in these two tables are almost the same? Will it cause data redundancy? Primary key for individual registration is id, and as for group registration it will be groupid. I am just wondering whether my database design is ok or not. I will need to do search script for it as well. So i must make sure that both tables is ok. Any advice from experts? Your help is greatly appreciated. Thank you
Reply With Quote
  #2 (permalink)  
Old 01-20-04, 14:32
zkenet zkenet is offline
Registered User
 
Join Date: Jan 2004
Location: Toronto
Posts: 33
Talking Re: Database design

Going one or two tables is a common issue, there are usually pros AND cons, and the right solution depends on the individual case.

What you have figure out is what criteria determines the right solution!

-Simplicity of data?
-Number & Simplicity of SQL calls?
-Number of records in a table?
-Possibility of the more data/columns being added in the future?
Will that future data be common or not?
- etc...

I would write down all the pages you will have, and for each page the SQL calls you will make, and figure out if they will be easier and faster using one or two table schema. For example, a search on two tables is more complex than just on one. But is this the ONLY page where you hit both types of records?

If using one table, just add a column called for example regType, 1 or 0. (1=group, 0=individual), and add that into your SQL statements. It is ok to have some blank columns, which only get used for their own regType.

Have fun!

Last edited by zkenet; 01-20-04 at 15:34.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On