Thanks

Not sure how I'm reading this,   but shouldn't the URL be linked to SubCategory 
?


  ----- 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
  ______________________________________________
  Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité


  Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




  > 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
  >
  >
  >
  >
  >
  > ----- Original Message -----
  > From: "John Meyer" <john.l.me...@gmail.com>
  > To: "BobSharp" <bobsh...@ntlworld.com>
  > Cc: <mysql@lists.mysql.com>
  > Sent: Monday, August 31, 2009 4:56 PM
  > Subject: Re: Database design - help
  >
  >
  > > BobSharp wrote:
  > >> As a complete newbie in MySQL, I need a database
  > >> to store URLs related to Tenpin Bowling.
  > >>
  > >> There are several Categories ... Equipment Manufacturers,
  > >> Organistations, (UK) ProShops, (UK) Bowling Centres, Personal
  > >> Websites, Misc., Coaching & Instructional websites, etc.
  > >>
  > >> There will be some sub-categories.
  > >> eg: Organistions will have ... Zones of WTBC, National Organisations
  > >> within
  > >> the Zones, UK organisations, Disabled Bowling organisations, ...
  > >> eg: Personal Website might have ... Bowler's, Pro Bowler's, Leagues,
  > >> etc.
  > >>
  > >> Can anyone suggest how I should set out tables for this database ?
  > >
  > >
  > > Here's one suggestion
  > >
  > > Table:
  > >
  > > URLs:
  > > URL_ID
  > > URL_TEXT
  > >
  > > CATEGORY
  > > CATEGORY_ID
  > > CATEGORY_TEXT
  > >
  > > SUBCAT
  > > SUBCAT_ID
  > > CATEGORY_ID
  > > SUBCAT_TEXT
  > >
  > > URL_CATEGORY
  > > URL_ID
  > > CATEGORY_ID
  > > SUBCATEGORY_ID
  > > PK: (URL_ID, CATEGORY_ID)
  >
  >
  > 
--------------------------------------------------------------------------------
  >
  >
  >
  > No virus found in this incoming message.
  > Checked by AVG - www.avg.com
  > Version: 8.5.409 / Virus Database: 270.13.72/2337 - Release Date: 08/31/09
  > 05:50:00
  >
  >
  > --
  > 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
  >


------------------------------------------------------------------------------
  Windows Live: Keep your friends up to date with what you do online. Find out 
more.


------------------------------------------------------------------------------



  No virus found in this incoming message.
  Checked by AVG - www.avg.com
  Version: 8.5.409 / Virus Database: 270.13.76/2344 - Release Date: 09/03/09 
18:05:00


--
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