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
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?
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.