SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy I need your database layout reccmendations (for the best efficienty etc..)

    I am keeping this as short as I can. I am building a site where the user saves "notes"

    Notes are purely text and the user should be able to make multiple notes under different name.

    I have no idea how I am going to arrange this into a table 0_0

    Like should my table columns be like this

    Username | Password | IDno. | Notes |


    And stuff all of the user's notes into a single column..? I am confus >.<
    Or should I just separate the IDno. column and Notes into

    btw I really need IDno. column as the site isn't going to represent users by their username, just their ID no.

    Thanks in advance.

  2. #2
    SitePoint Guru
    Join Date
    Jun 2006
    Posts
    638
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    Users
    - user_id: pk
    - email
    - pass
    
    Notes
    - note_id: pk
    - user_id: fk (what user posted the note)
    - title
    - message
    You might want to read up on relational databases, and on normalization.


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
  •