SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Git-R-Done
    Join Date
    Nov 2001
    Posts
    1,194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need Some Help With Database Schema

    I am trying to set up a MySQL database that displays some products and was wondering what would be teh best way to go about setting up the database. I currently have two tables, one for customer information for only me to see then another for the customer to enter that will be displayed on the site. In the second table I assign the customer an ID number.

    I would like them to be able to log in and create as many pages and items and this info would be added to the database then dynamically generated in the frontend. Each page would display different product names, descriptions, and prices and will be grouped under a different section of of each page. Can somebody please look at the schema below and let me know if I set this up correctly or if it could be improved on?

    customer_private
    --id
    --name
    --email
    --login
    --password
    --date

    customer_public
    --id
    --customer_private_id
    --company
    --logo

    pages
    --id
    --customer_public_id
    --name

    heading
    --id
    --pages_id
    --name

    items
    --id
    --customer_public_id
    --pages_id
    --heading_id
    --name
    --description
    --subdescription
    --price
    Last edited by JohnSaunders; May 11, 2004 at 06:18.
    John Saunders

  2. #2
    Git-R-Done
    Join Date
    Nov 2001
    Posts
    1,194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can anybody help a guy out???
    John Saunders

  3. #3
    SitePoint Member
    Join Date
    May 2004
    Location
    TX
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Schema Solution

    I would just combine the customer_public and customer_private tables into one table. You will only have one customerID then, and it will be much easier to manage. For the public view only SELECT the fields you want to be public and you should be fine.


Bookmarks

Posting Permissions

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