If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Database Layout

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-14-11, 17:23
Sammy89 Sammy89 is offline
Registered User
 
Join Date: Jan 2011
Posts: 1
Database Layout

I'm submitting tag1,tag2,tag3,ect... into a column of a table that contains content for each page.

What I want to do is when someone clicks one a tag that tag queires the DB and pulls and creates a list of links for EVERY page that contains that tag.

My question is, how should I lay the table(s) out for best performance and scalability.
Reply With Quote
  #2 (permalink)  
Old 01-15-11, 12:35
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 623
Create tables:

tags (tagId, tagName)
tagLinks (tagId, LinkUrl)

tags.tagID will be a primary key
create an index on tagLinks.tagID
__________________
Ronan Cashell
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On