Hi
(not sure if im posting in right place so apologies if its not)
I have multiple entities, for example
Customer
Suppler
Sales Invoice
Purchase Invoice
Currency
etc etc
I would like to be able to add a "Notes" record to ANY type of record
The Notes table would like this
NoteID - Int (PK)
NoteFK - Int
NoteFKType - Varchar(3)
NoteText - varchar(100)
NoteDate - Datetime
Where NoteFK is the PK of a customer or supplier etc and NoteFKType says what type of record the note is against
Now i realise that I cannot add a FK which references multiple tables without NoteFK needing to be present in all tables.
So how would you design the above ?
The note FK needs to be in any of the above tables
(not sure if im posting in right place so apologies if its not)
I have multiple entities, for example
Customer
Suppler
Sales Invoice
Purchase Invoice
Currency
etc etc
I would like to be able to add a "Notes" record to ANY type of record
The Notes table would like this
NoteID - Int (PK)
NoteFK - Int
NoteFKType - Varchar(3)
NoteText - varchar(100)
NoteDate - Datetime
Where NoteFK is the PK of a customer or supplier etc and NoteFKType says what type of record the note is against
Now i realise that I cannot add a FK which references multiple tables without NoteFK needing to be present in all tables.
So how would you design the above ?
The note FK needs to be in any of the above tables