I have a name table with (id,first_name,middle_name,last_name,sex)
and an email table with (id_fk,email_add)
Infact I will be having similar tables of the second kind, like a phone table (id_fk,phone_no), where id_fk is the foreign key referring to the id in the name table.
Is it required or rather is there a good reason to have a primary key in the second and third tables? Or other similar tables? Or would you suggest a different schema?
PS: The tables are for a contact storing app
You are almost always better off using a primary key. Even if you think it’s not needed now as your database grows and gets more complicated you will quickly run into issues without one.
Personally I’d also recommend using a data agnostic column for your primary key something such as a guid/uuid/serial. By using a field that does not contain usable data you will never be in a situation where you have to update the primary key which can be another messy operation once your database grows.