0

I am new to database design and trying to create an anonymous mobile message board. I have two tables in my database and would like some one to look at them and give me some feed back so that I can ensure that i have an efficient design and that it will be more future proof when I start to change up the database design when adding features in the future. Here are my tables.

CREATE TABLE sessions (
    session_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    session_ip CHAR(15) NOT NULL DEFAULT '000.000.000.000',
    session_date DATETIME NOT NULL DEFAULT '1000-01-01 00:00:00',
    session_posts TINYINT NOT NULL DEFAULT 0,
    session_views TINYINT NOT NULL DEFAULT 0,
);

CREATE TABLE post (
    post_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    session_id INT NOT NULL,
    user_name CHAR(50) NOT NULL DEFAULT 'Anonymous',
    post_body VARCHAR(255) NOT NULL,
    post_date DATETIME NOT NULL DEFAULT '1000-01-01 00:00:00',
    post_lat DOUBLE(3,6) NOT NULL DEFAULT 000.000000,
    post_lng DOUBLE(3,6) NOT NULL DEFAULT 000.000000
);
2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by jbisono
0

The only thing i can see is, I know the fact that it is an anonymous mobile message board, but if in the future you expect to open the software to Non anonymous only, I would say make another table for the users and just include anonymous and put a foreign key in your post table. in that way if for any reason you would like to record some other info about the user you wont have redundancy.

I hope my feedback help you a little bit, regards.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.