Newbie question on database design

From: George Sgouros <sgouros_at_yahoo.com>
Date: Fri, 25 Oct 2002 12:45:41 +0300
Message-ID: <apb3mq$4pf$1_at_usenet.otenet.gr>



Hello everybody

In a recent normalization tutorial I've read
(http://www.phpbuilder.com/columns/barry20000731.php3?page=1)
The author normalizes the following zero form database:

Fields: name, company, company_address, url1, url2

As you can see the database stores some user information (like name of company)
and a couple of visited urls

The 3NF normalized database contains the following tables:
(I've changed the names a bit to look more readable)

Table: Users
Fields: UserID, Name, Related_Company_ID

Table: Companies
Fields: CompanyID, Name, Address

Table: URLs
Fields: URLID, URL

Table: URL_Relations
Fields: RelationID, Related_URL_ID, Related_User_ID

My question is, why not using a talbe to hold ALL of the above relations I was thinking of something like this:

Table: Users
Fields: UserID, Name

Table: Companies
Fields: CompanyID, Name, Address

Table: URLs
Fields: URLID, URL

Table: ALL_Relations
Fields: RelationID, Related_URL_ID, Related_User_ID, Related_Company_ID

Is this against good database design practice?

I would appreciate any comments

George Received on Fri Oct 25 2002 - 11:45:41 CEST

Original text of this message