hi all,
so i have these tables:
Company
Job
Resume
user searches for a company, views that company. there is a list of
"viewed" companies for that user. Users can attach/delete a (private to
themselves) note about that company.
same for jobs and resumes.
What I want to know is, should i have a CompanyNote, JobNote,
ResumeNote table, or have one Note table?
with the first option, can have a foreign key to the corresponding
Company/Job/Resume table, with the second option cannot.
TIA
Neili suppose i should have one note table:
NOTE
noteid
text
a Company table:
COMPANY
companyid
a User table:
USER
userid
and a COMPANY_USER_NOTE table
COMPANY_USER_NOTE
companyid
userid
noteid
and a JOB_USER_NOTE table:
JOB_USER_NOTE
jobid
userid
noteid
then foreign keys not a problem|||(neilmcguigan@.gmail.com) writes:
> i suppose i should have one note table:
> NOTE
> noteid
> text
> a Company table:
> COMPANY
> companyid
> a User table:
> USER
> userid
> and a COMPANY_USER_NOTE table
> COMPANY_USER_NOTE
> companyid
> userid
> noteid
> and a JOB_USER_NOTE table:
> JOB_USER_NOTE
> jobid
> userid
> noteid
> then foreign keys not a problem
But now you can have multiple notes for the same user to the same item.
And the same note can be connected to both job and company.
But maybe that's a feature?
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||would the alternative would be...
table JobNotes:
UserID
JobID
NoteText
and table CompanyNotes:
UserID
CompanyID
NoteText
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns97BB794BC5320Yazorman@.127.0.0.1...
> (neilmcguigan@.gmail.com) writes:
> But now you can have multiple notes for the same user to the same item.
> And the same note can be connected to both job and company.
> But maybe that's a feature?
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx
No comments:
Post a Comment