grumpyoldtechs
01-01-2007, 02:38 PM
is there a way of creating a table which directly references to another table for a field?
e.g
items:
itemid (pkey)
other fields
customers:
customerid (pkey)
other fields
orders:
orderid (pkey)
customerid (fkey)
itemid (fkey)
fkey = foreign key
pkey = primary key - obvious but saves a post if someone doesn't get it
basically at creation level can you create relationships/how/is it easy enough?
or do you have to just join at select/update/insert/delete level?
e.g
items:
itemid (pkey)
other fields
customers:
customerid (pkey)
other fields
orders:
orderid (pkey)
customerid (fkey)
itemid (fkey)
fkey = foreign key
pkey = primary key - obvious but saves a post if someone doesn't get it
basically at creation level can you create relationships/how/is it easy enough?
or do you have to just join at select/update/insert/delete level?