"Jimi Hullegård" <ask_for_real_email@nothotmail.com> wrote in message
news:YBa6f.994$zn6.676@nntpserver.swip.net...
> [OK, first of all, I know this is not a MySQL specific question, but I
> couldn't find any newsgroup about SQL in general.]
>
> Today I had an exam test for a course about data storage and processing,
> with 20 true/false statements.
>
> One of the statements was (translated from swedish):
> "A compound key is a primary key based on at least two foreign keys."
>
> I answered "False", but in the the published key answers they say "True".
>
>
>
> What do you say about this? Do I really need two foreign keys to create a
> compound key?
Your teacher is wrong. A compound primary key is made up of more than one
column, but those columns do NOT have to be foreign keys. They may be, but
they do not have to be. I have been designing and building databases for
over 20 years, so it is safe to assume that I know what I'm talking about.
--
Tony Marston
http://www.tonymarston.net
> I have searched on google for the SQL standard definition of a compound
> key, but I can't find any usefull information.
>
>
>
> I have already emailed the teacher (no reply yet), but I though maybe you
> can give me some arguments I could tell him _if_ he would claim that the
> statement is correct.
>
>
>
> Regards
>
> /Jimi
>
>