Please forgive my total ignorance.

URL-Category  linking   ...   with  Foriegn Keys  or  Primary Keys ?

Have been trying to create the ER Diagram with  "MySQL Workbench",
and getting very frustrated.


cheers




  ----- Original Message -----
  From: Martin Gainty
  To: bobsh...@ntlworld.com ; mysql@lists.mysql.com
  Cc: john.l.me...@gmail.com
  Sent: Friday, September 04, 2009 6:09 PM
  Subject: RE: Database design - help


  > given the following table layouts

> URLs:> URL_ID (primary key for URL)> URL_TEXT>> URL_CATEGORY> URL_ID       
> (key which points to URL.URL_ID)> CATEGORY_ID  (key which points to 
> CATEGORY.CATEGORY_ID)> SUBCATEGORY_ID> PK: (URL_ID, CATEGORY_ID)> CATEGORY> 
> CATEGORY_ID (primary Key for Category)> CATEGORY_TEXT>> SUBCAT> SUBCAT_ID    
> (concatenated key for SubCat)> CATEGORY_ID  (concatenated key for Subcat)> 
> SUBCAT_TEXT>so the diagram would look something like like                     
>        URL_CATEGORY Table             (URL Table)   (CATEGORY TABLE)        
> URL_ID            1--------->1 URL.URL_ID 
> CATEGORY.CATEGORY_ID1<---1CATEGORY_ID                    URL_TEXT          1  
>                            ↓
                  1
  SUBCAT.CATEGORY_ID
  SUBCAT.SUBCAT_TEXT

  this is labour-intensive work that every DBA must perform to create a Database
  Martin Gainty
  ______________________________________________

  > From: bobsh...@ntlworld.com
  > To: mysql@lists.mysql.com
  > CC: john.l.me...@gmail.com
  > Subject: Re: Database design - help
  > Date: Fri, 4 Sep 2009 16:24:22 +0100
  >
  > Hi
  >
  > Thanks for all the responses. However I am still stuck for a MySQL db I
  > can create
  > and code in PHP. Attached is a brief example of data to be used.
  >
  > One problem I have is with providing a listing that includes ...
  > WTBC (Category without SubCats) and the 3 Zones (also, Cats without
  > SubCats ??? )
  > (This is for a complete WTBC listing, in practice it may list depending on
  > selected Zone)
  >
  >
  > The example Schema is interesting, but is there another way of storing all
  > links
  > in one table and join them to Category and SubCat tables ?
  > An example of the ER Diagram would also be helpful to me.
  >
  >
  > cheers
  >
  >
  >
  >

--
I am using the free version of SPAMfighter.
We are a community of 6 million users fighting spam.
SPAMfighter has removed 13901 of my spam emails to date.
Get the free SPAMfighter here: http://www.spamfighter.com/len

The Professional version does not have this message

Reply via email to