Results 1 to 4 of 4

Thread: new to database

  1. #1
    Join Date
    Apr 2010
    Posts
    2

    Unanswered: new to database

    Hi All,

    Thank you for reading the post, I am creating a new test application with mysql database. application will have a simple registration process and will allow user to login as well.

    Is it a good idea to have two seperate tables one for registration and one for login?

    I am thinking of creating two tables, login & registration. application will write two insert statements one into login table and other to registration table. login table will handle only user try to login their queries and registration table wil handle only registration process.

    Do you guys think is it a best practice. Also was thinking if all information written to registration can written to another table which can be used for viewing profile.

    I dont know is it good practice to have too tables with similar type of data, only my reason of doing is not too to do too many queries to one table or??

    I hope you understand....I will wait for your reply.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    best practice would be a single table

    why do you feel that duplicating the data into two tables would be a good idea?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Apr 2010
    Posts
    2
    oh well i was thinking that alot of queries will not only going to one table which is the main reason i was thinking of one table. but if you have an application with 6000 users using it at the same time, won't it affect the database or make the database crash or anything like that

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by evil_master2120 View Post
    ... won't it affect the database or make the database crash or anything like that
    the database engine can take it

    10,000 accesses per second is possible

    however, you have to make sure you have the hardware to support whatever it is you're expecting to do

    don't automatically assume that you have to design the database to overcome a perceived performance problem

    do a search for the phrase "premature optimization"
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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