katties 0 Newbie Poster

Hi it's probably a very basic question but I just wonder if it is ok to restrain foreign key to more than one column,
e.g. there is a hypothetical situation where a company collects fruits, let say apples , from farmers.
So, a database builts up, and there is a need to put in some other table a column saying where the apple delivery comes from, who is the producent - that's why I think about restraining foreign key not to one farmer id, but to 4 for example;
I reckon restraining foreign keys would save space..?
However, the question is, is it really practised and is the information retrievable later, i.e.the system doesn't malfunction.
Please treat the apples only as an example, the key point is the foreign key restrained to more than one referential columns.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.