Greetings,
in a table I have fiields A, B and C. All fields except duplicates. A value In B may only appear once in combination with a value in A, A accepts duplicates in combination with B. A C-value may also appear only once in combination with A but C accepts duplicates in combination with B. It'd be great to have a primary key on A and B at the same time and then a primary key on the first key and C. Is there a db systen that offers such functionality? Is there another (more logic and may be conventional) way to solve this?
Thanx for any suggestion,
L21ars
/--- german ---/
Liebe Datenbanker,
ich habe einen Knoten im Kopf und bitte Euch deshalb um Hilfe:
Gibt es DB Systeme, in denen man einen Primäschlüssel über einen Primarschlüssel und ein weiteres Feld legen kann? Das Problem ist folgendes:
In einer Tabelle gibt es drei Felder (A, B, C), in denen Duplikate auftauchen (müssen). In Kombination miteinander darf ein Wert in B nur einmal in Kombination mit einem Wert in A auftauchen, wobei A beliebig oft da sein kann. Ein Wert in C darf wiederum nur einmal mit einem Wert in A, aber beliebig oft mit einem Wert in B erscheinen. Schön wäre also, wenn man einen Primärschlüssel über (Primärchlüssel A😎 und (C) legen könnte. Geht das? Hab' ich zuwenig Ahnung? Wie sieht das erst aus, wenn so eine Situation für mehr als drei Felder eintritt?
Dankbar für jeden Hinweis,
L21ars