SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru hisham777's Avatar
    Join Date
    Dec 2005
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question help in design a DB

    her is what am trying to create
    a simple online product cateloge
    this is my first try to create an online application
    any way
    the product cateloge consite of a page of categorys a page
    of products brief description about the product as well as its pic
    finally the product deteils
    the tables are
    product category
    category id (PK)
    category name
    date add -auto i guess its timestamp-

    product description
    Product id (PK)
    category id
    product name
    product description
    Image name
    Image path(ascript will read the path and import the image then display it)
    date add -same as above-

    product deteils

    product id (PK)
    product name
    hight
    wight
    etc


    ok my knolewage of database design its very limited to the basics
    am planning to use Mysql with PHP

    any help in inhancing the design or there any errors in the cerrent
    design
    please help on that


    and another Q
    what is the Quiry that i can use it to add record in all the three table in one time (it sound stoped i guess) there are such quiry
    and whats the best way to create this tables

    thank you all for help.

    sorry i think i have posted this in the wrong section
    would you remove it to MySQL section please
    Last edited by hisham777; Jan 21, 2006 at 13:39.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,341
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    your table design is fine

    i would probably combine the product description and product details table

    there is no query that inserts into multiple tables, you have to insert data into one table at a time

    best way to create the tables is through a front end application like MySQL Query Browser or phpmyadmin or SQLyog or similar
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Guru hisham777's Avatar
    Join Date
    Dec 2005
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you for reply
    the query Q was necessary for me to know how to design the admin interface
    and based on the answer you provided (thanks for that)
    i will make 2 sections in the admin panel.
    category (section)
    Update
    delete
    Add

    product details (section)
    Update
    delete
    Add

    comments are appreciated

  4. #4
    SitePoint Guru hisham777's Avatar
    Join Date
    Dec 2005
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    q what about FK
    i dont realy understand it more than its used to make relation
    betwean tables

    will it benfit me if i use it in this application?

  5. #5
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,341
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    benefit? only if you use it correctly
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  6. #6
    SitePoint Guru hisham777's Avatar
    Join Date
    Dec 2005
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    then i shall avoid it at the moment

    thanks Rudy .


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
  •