Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
add one more column like person_id in your table and define it as a primary key of table.
Originally posted by Craig Jackson:
But the email address, in my opinion can be used as a candidate for a unique key
Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Originally posted by s choukse:
Having said that I would still not recommend the use of a Databse Sequence as an Unique Identifier. This is because a sequenece has no business significance and when modelling a database we should always model the actual business coz this will keep the schema "healthy" in the long run. I would recommend you should go for a composite primary key and using a database sequence should be the last resort.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
This is because a sequenece has no business significance and when modelling a database we should always model the actual business coz this will keep the schema "healthy" in the long run. I would recommend you should go for a composite primary key and using a database sequence should be the last resort
Consider Paul's rocket mass heater. |