Results 1 to 2 of 2

Thread: Database Layout

  1. #1
    Join Date
    Jan 2011
    Posts
    1

    Unanswered: 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.

  2. #2
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    Create tables:

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

    tags.tagID will be a primary key
    create an index on tagLinks.tagID
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •