Do database tables need to have IDs?

Posted by Arturas M on Programmers See other posts from Programmers or by Arturas M
Published on 2012-11-06T20:12:44Z Indexed on 2012/11/06 23:18 UTC
Read the original article Hit count: 298

Filed under:

Is an ID field is always needed in database tables?

In my case I have a user with firstName, lastName and email fields. email is unique and not null, so it could be used as an ID, right? So in that case, could/should I try to remove the ID?

Also I want to have another table which extends this one. Let's say its called patient and it has it's own field additionalData and I would like to link the relationship through the email of user I mentioned. So the relationship should be 1 to 1, right? and I wouldn't need the IDs? Somehow MySQL Workbench wants me to use the IDs.

What do you guys think. Any suggestions on this topic?

© Programmers or respective owner

Related posts about database