On Sun, 31 Jan 2016 10:45:59 -0700 "Keith Medcalf" <kmedcalf at dessus.com> wrote:
> create table PhoneDirectory > ( > surname_id integer not null references Surnames, > given_id integer not null references GivenNames, > address_id integer not null references Addresses, > PhoneNumber text collate nocase primary key > ); > create index PD_Surnameid on PhoneDirectory (surname_id); > create index PD_Givenid on PhoneDirectory (given_id); > create index PD_addressid on PhoneDirectory (address_id); > > create view v_PhoneDirectory > as > select Surname, Givenname, Street_No, Suffix, Streetname, PhoneNumber > from PhoneDirectory > natural join Addresses > natural join Streets > natural join GivenNames > natural join Surnames; Now I understand why `NATURAL JOIN` is qualified so, and why it has an implicit `USING` clause. That's to help with this. > This database would be in BCNF normal form. (Although the streetno and > suffix ought to be moved out to a separate table(s) if you need 4th or 5th > normal). The model gets very much more complicated if you also have to > handle municipal names, city names, etc. The normalized forms highest of level, are to be weighted, anyway. -- Yannick Duch?ne