Francisco Tapia
fhtapia at gmail.com
Mon Mar 16 10:46:03 CDT 2009
Asger, I do see your point, I guess I'm playing more devil's advocate here since I DO user Nulls in my designs. In the business world, generally where the business is so large that they need to keep track of everyone in a database to know who works for who and what their titles are, I typically see a position created, and then it filled by the boss' son/nephew/etc, etc. etc. -Francisco http://sqlthis.blogspot.com | Tsql and More... On Mon, Mar 16, 2009 at 8:32 AM, Asger Blond <ab-mi at post3.tele.dk> wrote: > OK, I see. > Regarding the example: Ever heard of nepotism? The HR manager is asked to > register the boss' son as a new employee not deciding for the moment which > department should have the honour. > And of course: Normally a FK constraint should not allow NULLs. But the > fact > that you have to explicitly prevent this using a NOT NULL constraint makes > room for exceptions. > > Asger > -----Oprindelig meddelelse----- > Fra: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] På vegne af Francisco > Tapia > Sendt: 16. marts 2009 15:59 > Til: Discussion concerning MS SQL Server > Emne: Re: [dba-SQLServer] NULLs > > I was simply giving an example of how such a join might look. Also, I > thought it would be odd for a company to hire an employee w/o already > having > a position to fill, generally I've never seen this to be true, but possibly > does happen, just haven't ran into it myself. > -- > -Francisco > http://sqlthis.blogspot.com | Tsql and More... > > > On Mon, Mar 16, 2009 at 7:55 AM, Asger Blond <ab-mi at post3.tele.dk> wrote: > > > > Logically the join between the employee and the dept can > > > be a many to many which would allow you to have an unassigned employee > > > > Don't know if I get your point here. Are you implying that an unassigned > > employee can't exist in a one to many relationship with referential > > integrity? If so you are not right: a FK constraint doesn't forbid NULLs > in > > the FK column. > > > > Asger > > > >