Re: Do I make a lot of small Tables or a few big Tables?

From: Oli Filth (oli_filth_at_eatspam.coldmail.com)
Date: 12/21/04

  • Next message: Smitro: "PHP to Doc"
    Date: Tue, 21 Dec 2004 01:08:17 GMT
    
    

    It depends entirely on what data you want to store! For instance, if you
    have data on your users and data on your articles, then it would make
    sense to have them in separate tables (in fact, I can't see how you
    could combine them into one).

    Likewise, if the data associated with each user is, for instance, ID,
    name, location, e-mail address, then it would be pointless to store
    these data in separate tables; one big table would be appropriate.

    Without an example of the type of information you want to store, it's
    difficult to give any more advice than that, I'm afraid.

    Oli

    mark1822@hotmail.com wrote:
    > Hello,
    >
    > I am working on designing a Web site using PHP and MySQL and I am
    > currently figuring out how to best build my MySQL database.
    >
    > My Web site is going to use a MySQL database extensively throughout the
    > Web site. It is a content management system type Web site with lots of
    > users and written articles and other things. With my database I'm
    > trying to figure out if I should create big tables that have a lot of
    > rows in them or if I should create a lot of tables that are very
    > specific to its data and use a lot of table joins in my select
    > statements. I'm mostly concerned about performance.
    >
    > I'm thinking that if I make a lot of tables, then select statements I
    > do will be really fast because my tables won't contain very many rows.
    > But I don't know if this is true or not or if it matters for
    > performance reasons or not.
    >
    > In my Web site I have a lot of different kinds of data that could put
    > in many different tables. But, without data redundancy and without
    > using extra storage space, I can still make a few big tables, and make
    > that work. I just don't know which way is best for performance --
    > speed, I want speed. Anybody know what I should do or know a book I
    > should read or a Web site to go to?
    >
    > Much appreciated,
    >
    > Nick
    >


  • Next message: Smitro: "PHP to Doc"

    Relevant Pages

    • Re: perl script to scrape the job sites
      ... Given the job id and web site name it should scrape the information ... and store in a mySQL database. ...
      (perl.beginners)
    • Re: perl script to scrape the job sites
      ... Given the job id and web site name it should scrape the information and ... store in a mySQL database. ...
      (perl.beginners)
    • Re: Useless Web sites and general corporate incompetence
      ... I decided to put up with the few beat-up panels I had intended to replace. ... Menard's Web site does not have an on-line catalog: ... what Armstrong told me, HD and Lowe's did *not* sell this product. ... inventories for local store and their only catalogs. ...
      (alt.home.repair)
    • Re: Storing JPEG images in D3 database
      ... web site. ... Mark Brown wrote: ... If you decide that for some reason you MUST store the jpg item inside pick, ... and then in your product master records just store a filename ...
      (comp.databases.pick)
    • SecurityFocus Article Announcement
      ... The following articles are now available at SecurityFocus: ... Auditing Web Site Authentication ...
      (Security-Basics)