1. #1
    Dreadlord xytech's Avatar
    10+ Year Old Account
    Join Date
    Sep 2011
    Location
    Stormscale
    Posts
    887

    Making a database

    As a school project I have to create a web page, and one of the criteria is I have a database with 2 tables included. I'm mostly finished with the webpage, and just started learning databases. My problem is I'm making a guestbook database, and can't figure out how to get 2 tables involved. The common and obvious solution is just to put it all in a single table.

    I'd love if someone a tad more experienced could give a suggestion to what I can put in each table when using a multi-table guestbook database.

  2. #2
    Quick things that come to my mind

    table 1:
    primary key user id number, user name, user IP, user browser info, time last comment, time first comment, password

    table 2:
    primary key user id number, comment, time

    And then display comments ordered by time. Basic quest book for comments isn't really good example for multi table project, but it's possible when you complicate things on purpose
    Never going to log into this garbage forum again as long as calling obvious troll obvious troll is the easiest way to get banned.
    Trolling should be.

  3. #3
    What are you using to interact with the database? JDBC?

  4. #4
    Vesseblah's idea is good - a "public view" a "private view" of a user is a good place to start. Has the benefit of reusing information, which is always fun.

  5. #5
    Dreadlord xytech's Avatar
    10+ Year Old Account
    Join Date
    Sep 2011
    Location
    Stormscale
    Posts
    887
    Thanks for the suggestions, should come in handy ^^

    It's just a locally hosted site and I'm using MySQL, XAMPP and dreamweaver. I didn't consider including them in the op as I was mainly just looking for a nice way to split it into 2 tables. Additional information would however be appreciated as well =)

Posting Permissions

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