If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Senior Member
    Join Date
    Oct 2007
    Member #
    two questions:
    can mysql table name be a number?
    is it better to have less bigger tables (around may be 50 or so) or more smaller tables (hundreds of them) in one database. please compare in terms of performance, backup or anything else you think important.
    the issue is, i am writing a poll and trying to decide if there should be an answer table for each poll, or there should be less answer table containing more than one polls answers.
    if table for each poll is better, i will create automatically by the poll's id number, so the table name will be a number.


  3. #2
    Senior Member
    Join Date
    Jun 2005
    Atlanta, GA
    Member #
    1 times
    Lots of small tables makes sense when it makes sense :-P In short, your application should very rarely require you to create tables at runtime. The database schema of an application tends to stay fairly static while the only changes you make to your application are data-related. Once you start adding features or what have you, expanding your schema may make sense.

    So in your case, the way to go is one table for the poll data. But note that there are different ways to achieve this. For example, you may have a `polls' table that contains a list of poll ids associated with poll names/descriptions/other metadata. Then you could have a `questions' table that contains a list of questions associated to a `poll_id' that references them back to the poll they belong to. You can then have a `question_answers' table that contains a list of answers to a given question that reference back to the `question_id' to indicate which question they are a reply to. This keeps your data well-separated while still eliminating the need to create new tables at runtime.

Remove Ads

Posting Permissions

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

Search tags for this page

mysql naming tables with numbers

Click on a term to search for related topics.
All times are GMT -6. The time now is 01:59 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: