Databases: Merging and Verifying Into The Same Table
database
6:52 am on Jun 1, 2009 (gmt 0)
If i hav a table named occupant (FirstName, LastName, Age, Contact, Marital status, Nationality) & visitor table (FirstName, LastName, Age, Contact).
is it advisable for me to merge them into the same table? If yes, How do i verify whether they are visitors or occupants?
LifeinAsia
3:48 pm on Jun 1, 2009 (gmt 0)
Welcome to Webmaster World!
is it advisable for me to merge them into the same table?
It depends on how you're going to use the data.
If yes, How do i verify whether they are visitors or occupants?
It all depends on how you are distinguishing between occupant and visitor. If you mean, "How do I distinguish them in the database?" then you can add another field to differentiate them.
database
2:44 am on Jun 2, 2009 (gmt 0)
1 more question. if i add another field into the table to differentiate them, should that field be my primary key or other fields?
LifeinAsia
4:18 pm on Jun 2, 2009 (gmt 0)
It can't be a primary key, since by definition primary key values are unique.