List:General Discussion« Previous MessageNext Message »
From:Jeff Shapiro Date:May 26 2006 3:30pm
Subject:Re: Fun with Dates and Incentives.
View as plain text  
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.

jeff
Thread
Fun with Dates and Incentives.Brian Menke24 May
  • Re: Fun with Dates and Incentives.Jason Dimberg24 May
  • Re: Fun with Dates and Incentives.Peter Brawley24 May
    • RE: Fun with Dates and Incentives.Brian Menke24 May
      • Re: Fun with Dates and Incentives.Peter Brawley25 May
        • RE: Fun with Dates and Incentives.Brian Menke25 May
          • Re: Fun with Dates and Incentives.sheeri kritzer25 May
            • RE: Fun with Dates and Incentives.Brian Menke25 May
              • Re: Fun with Dates and Incentives.Peter Brawley25 May
              • Re: Fun with Dates and Incentives.sheeri kritzer26 May
      • Re: Fun with Dates and Incentives.Jeff Shapiro26 May
      • Re: Fun with Dates and Incentives.Jeff Shapiro26 May
  • Re: Fun with Dates and Incentives.Peter Brawley25 May
RE: Fun with Dates and Incentives.George Law24 May