Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - WTF?  Foreign keys??
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

WTF? Foreign keys??

 Post Reply Post Reply
Author
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post Topic: WTF? Foreign keys??
    Posted: 08 December 2004 at 9:54pm
Had a coursework assesment a day or two ago.  It was about database design, and frustrating as it was designing a non-normalised database in pairs (we haven't learnt normalisation yet so my partner refused to accept my design) I stuck it out.

We had a few basic relationships stuck in there, and produced something pretty scaggy at the end.

Came to the assement, and the two assesors looked at our relationship.  They pointed to a one to many relationship between a primary key (item_number) holding books and and ordered book table with the item_number in it.  Nothing wrong with it really at all.  They pointed toit and go, "so why isn't it a foreign key?".  I thought it my head, "WTF it is a foreign key".  They then pointed at all the relations enquiring as to why they wern't pointed to foreign key.  I was bemused!  I challenged them and said they were and they just pointed again and said they wernt.

Have I missed something?  Is there some way of marking a foreign key in access?
Back to Top
huwnet View Drop Down
Senior Member
Senior Member


Joined: 30 May 2003
Location: England
Status: Offline
Points: 1375
Post Options Post Options   Thanks (0) Thanks(0)   Quote huwnet Quote  Post ReplyReply Direct Link To This Post Posted: 09 December 2004 at 11:57am
don't think so. Wink
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 09 December 2004 at 2:17pm
Usually you give the foreign key the same name as the primary key in the table you create the relationship with.

Have a look at the Access database for Web Wiz Forums in table view, it may give you some help.

Remember you should also have 'Enforce Referential Integrity' checked.
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post Posted: 09 December 2004 at 4:18pm
Both had the same names, and referential integrity was forced, I was stumped.
Back to Top
the boss View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 January 2003
Location: Saudi Arabia
Status: Offline
Points: 1727
Post Options Post Options   Thanks (0) Thanks(0)   Quote the boss Quote  Post ReplyReply Direct Link To This Post Posted: 09 December 2004 at 5:41pm

these are keys from the alien word and hence called forigen keys.. just toss them in ur pocket and walk away,...Wink


Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.