Welcome to WebmasterWorld Guest from 107.21.163.40

Forum Moderators: open

Message Too Old, No Replies

database design

relationships between cells

     
3:48 pm on Sep 15, 2005 (gmt 0)

Full Member

10+ Year Member

joined:Aug 3, 2005
posts:269
votes: 0


hey all,

I am pretty new to database design for my sites and seeing as the database i use most is access i thought i would post my problem here.

Could anyone please fill me in on how to link one cell in one table to a cell in another?

I have created a table called 'headers' and within this there is a field called 'group', in my other table I have created called 'subcats' there is a field called 'header_group'. these two fields are both number fields.

Now i want to be able to make it so that every time a value in the 'group' field is changed all the entries that correspond in the 'header_group' field are also changed.

Hope i have explained it well enough

Thanks

4:32 pm on Sept 15, 2005 (gmt 0)

Full Member

10+ Year Member

joined:Aug 3, 2005
posts:269
votes: 0


I know its something to do with enforcing the referencial intergrety but thats about it.

Have tried a number of ways but still cant get it to work. (and i know it is really basic thing to do aswell)

Cheers

Ally

5:32 pm on Sept 15, 2005 (gmt 0)

Full Member

10+ Year Member

joined:Mar 8, 2004
posts:311
votes: 0


What you're looking for is known as "foreign keys".
I don't use Access, but a google seach for "access foreign keys" (without the quotes) threw up some stuff that looks relevant.
6:36 pm on Sept 15, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 13, 2002
posts:2162
votes: 0



You can do it on the diagrams page, drag a line from a column in one table to a column of the same type on another table and the systemn creates the foreign keys for you. In Accesss theres no way to write FK's in SQL - I dont think so anyway :)
10:33 am on Sept 16, 2005 (gmt 0)

Full Member

10+ Year Member

joined:Aug 3, 2005
posts:269
votes: 0


yeah thanks guys...

there was some good information there, got what i was looking for. I hate it when i know what i want to do but dont know what the technical term for it is.

doing this working within my database will save alot of time on the programming side of things.

Cheers Ally