# Re: WWW/Internet 2009: 2nd CFP until 21 September x

Date: Mon, 17 Aug 2009 22:12:17 -0300
Message-ID: <4a89fff5\$0\$23774\$9a566e8b_at_news.aliant.net>

paul c wrote:
```> Walter Mitty wrote:
>
```

>> "paul c" <toledobythesea_at_oohay.ac> wrote in message
>> news:RQcim.41657\$PH1.8769_at_edtnps82...
>>
>>> paul c wrote:
>>>
>>>> Walter Mitty wrote:
>>>>
>>>>> "rpost" <rpost_at_pcwin518.campus.tue.nl> wrote in message
>>>>> news:h69p4s\$2no2\$1_at_mud.stack.nl...
>>>>>
>>>>>> This describes tables with NULLs as shorthands
>>>>>> for sets of tables without any NULLs at all,
>>>>>> so it introduces in way that fits perfectly
>>>>>> into the relational model.
>>>>>>
>>>>> You got what I was trying to express. Exactly. Thanks.
>>>>>
>>>>>
>>>> Are you saying that the table
>>>>
>>>> T1:
>>>> K C
>>>> 1 null
>>>> 2 3
>>>>
>>>> is shorthand for the two tables
>>>>
>>>> T2:
>>>> K C
>>>> (empty)
>>>>
>>>> and
>>>>
>>>> T3:
>>>> K C
>>>> 2 3
>>>>
>>>> ?
>>>>
>>>> If so, how does T1 = T2 JOIN T3?
>>>
>>>
>>> Or do you mean that the table
>>>
>>> T1:
>>> K C
>>> 1 null
>>> 2 3
>>>
>>> is shorthand for the two tables
>>>
>>> T2:
>>> K
>>> 1
>>>
>>> and
>>>
>>> T3:
>>> K C
>>> 2 3
>>>
>>> ?
>>>
>>> If that's what you mean, I still need to ask how T1 = T2 JOIN T3?
>>
>>
>> no, that's not what I'm talking about.
>>
>> Let's take tihs table (not a very good example, but it'll do):
>>
>> create table Employee
>> (Employee_Id integer pk,
>> Firsst_Name char 25 not null,
>> Last_Name char 25 not null,
>> Middle_Initial char 1)
>>
>> I've dropped out all the other columns.that would be in a real case.
>>
>> Noe let's say that the rules are that you can't put an employee into
>> the table unless you know the First Name and Last Name, and you get
>> assigned to the employee an Employee_Id that's never been used
>> before. But you can put in an employee who either doesn't have a
>> middle initial, or where you don't know what it is.
>>
>> No I'm saying that this is equivalent to
>>
>> create table Employee
>> (Employee_Id integer primary key,
>> Firsst_Name char 25 not null,
>> Last_Name char 25 not null)
>>
>>
>> create table Employee_Middle_Initial
>> (Employee_Id integer primary key foreign key references
>> Employee(Employee_Id),
>> Middle_Initial char 1 not null)

<nonsense snipped>

>> Now, if you had these two tables, how would you enter an employee
>> with no middle initial? Easy. Make the entry in the Employee table
>> as per usual, and leave out the row for the Employee_Middle_Inital
>> table entriely. There's no nulls allowed in the two table solution,
>> but there's no law that says you can't leave an entire row out.
>>
>> Now if you were to do an outer join on the two tables given in the two
>> table solution, what you'd get is the one table solution where in
>> every case where there's no row ion the middle_initial table, you end
>> up with a NULL in the Middle_Initial column

And by doing so, Walter would turn an actual assertion that the person has no middle initial into something that nominally says it is unknown whether the person has a middle initial.

Logical differences are big differences.

Personally, I would include a non-NULL middle initial for everyone where the middle initial, of course, can be an empty string.

The 1-table solution without any NULLs at all would work just fine. Received on Mon Aug 17 2009 - 20:12:17 CDT

Original text of this message