On Wednesday 24 May 2006 15:18, Brian Menke scribble on about:
> Peter, thanks for the detailed info. I will figure out how to get rid of
> the UNIQUE key. Somehow that got added. Thanks for the catch. As far as INT
> for student id goes, I'm using email because it will be unique, and offers
> an easy way to track a user through the app I'm building (user name,
> password, session id's etc.) but I do get what you are saying. Thanks for
Umm just a question here: What happens if the person changes his or her email
address? That is if you are allowing them to change it. If you are using it
as the table relationship key, it may break your relationships if it changes
in the parent table.. You'll have to ensure that your parent and child table
keys stay in sync. This could be a headache waiting to happen.
Normally, I place an autoincrement column in the parent table and use it as
the relationship key for all child tables. This way I know that the value
will never change and it's not part of data important to the end user or the
application. This is basically what Peter suggested.