Professional Web Applications Themes

Structure of MySQL tables for message board - MySQL

I have a message board that currently uses flat text files, and I'm wanting to convert it to MySQL. The program that accesses the database will be Perl, if it matters. I've written the program that will move all of the data over, but I have one seemingly minor stumbling block. My intention was to have one table for each topic, and the rows of the table would represent each post. The fields, in order, would be: timestamp, username, email, post What I DON'T have, though, is a way to timestamp the table itself. So, how do I sort the ...

  1. #1

    Default Structure of MySQL tables for message board

    I have a message board that currently uses flat text files, and I'm
    wanting to convert it to MySQL. The program that accesses the database
    will be Perl, if it matters. I've written the program that will move
    all of the data over, but I have one seemingly minor stumbling block.

    My intention was to have one table for each topic, and the rows of the
    table would represent each post. The fields, in order, would be:

    timestamp, username, email, post

    What I DON'T have, though, is a way to timestamp the table itself. So,
    how do I sort the tables / threads by the most recent post?

    Keep in mind, there are currently about 17,000 threads, and growing at
    a current rate of about 10,000/year. So, loading every table into an
    array and sorting by the timestamp field would be very slow and
    inefficient.

    My original idea was to use a separate flat-text database to hold all
    of the subject names and last timestamps, and then just use MySQL to
    hold the threads and cross-reference them. This is how the program is
    currently running, but I'm sure that there must be a better way.

    TIA,

    Jason

    Jason Guest

  2. #2

    Default Re: Structure of MySQL tables for message board

    On 27 Jul, 08:24, Jason <com> wrote: 

    "One table for each topic"? Is that how it's normally done?

    strawberry Guest

  3. #3

    Default Re: Structure of MySQL tables for message board

    Message-ID: <googlegroups.com> from
    Jason contained the following:
     

    Two tables, one for messages, the other for threads should work, unless
    I'm missing something.

    --
    Regards,

    Geoff Berrow
    Geoff Guest

Similar Threads

  1. Coldfusion Message Board help...please
    By Patty in forum Coldfusion Database Access
    Replies: 0
    Last Post: June 19th, 06:34 PM
  2. Creating a message board with PHP/MySQL
    By henryvuong in forum Adobe Dreamweaver & Contribute
    Replies: 1
    Last Post: May 14th, 06:31 PM
  3. Message Board Systems...?
    By Kevin in forum ASP.NET General
    Replies: 2
    Last Post: August 22nd, 09:25 PM
  4. Replies: 1
    Last Post: July 18th, 08:34 AM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139