Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ER question

Re: ER question

From: n/a <j_racicot_at_hotmail.com>
Date: Thu, 06 May 2004 20:15:18 -0400
Message-ID: <YxAmc.61716$ZJ5.1754357@news20.bellglobal.com>


Now you've piqued my curiosity. Is the dept_head column mandatory?

Joel

Brian Peasland wrote:
> bcjm wrote:
>

>>Say you have two tables, emp and dept.  emp has dept_id foreign key
>>which references dept table.  What if I need to tract who is the
>>department head?  Do you add the emp_id to the dept table or do you
>>create a indicator flag field in the emp table?  Which way is better
>>and why. Hope my question is clear.
>>
>>Thanks

>
>
> The entity DEPT has a department head as one of its attributes. So the
> department head should be a column in the DEPT table. Since that
> department head is also an employee, you will most likely want a FK
> relationship between the dept head column in DEPT and the EMP_ID column
> of the EMP table.
>
> HTH,
> Brian
>
>
>
Received on Thu May 06 2004 - 19:15:18 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US