This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Assuming you are storing data in a relational database then the concept of normalisation must come in to play here ...
if storing all person data in one table will mean there will be redundant data then this should be avoided.
classic example is Employees and Departments;
an Employee may work in only one Department but a Department may employ many Employees
so we make one table for Employees and one table for Departments - otherwise for employees working in the same department we will end up storing the department name many times (redundant data).
more difficult to maintain data integrity in this case - when the dept name changes need to find all occurences of the dept name - dept name may end up coded slightly differently for different emps (IT, I.T, it, ...).
Depends on your data - if data in the tables is related in a one-to-one relationship then could store in one table.
Hope this helps.
Joined: Feb 13, 2007
Thanks a lot for the reply. But all the tables have one to one relationship. So is that fine if I put them all together in one table?
I am sorry about not mentioning it before, I am using relational detabase(oracle 10g)
Joined: Mar 30, 2008
Hi there, perhaps you could describe the data in the tables, i.e. what entities the tables represent, and the attributes in each table.
we have an Employee table presumably with Name, Date of Birth ... but what are the other tables?