-
Notifications
You must be signed in to change notification settings - Fork 1
SQL Structure
Samer Albahra edited this page Feb 7, 2014
·
1 revision
CREATE TABLE IF NOT EXISTS `fb_comments` (
`comment_id` bigint(18) NOT NULL,
`post_id` bigint(18) NOT NULL,
`user_id` int(12) NOT NULL,
`comment_body` longtext NOT NULL,
`comment_time` int(11) NOT NULL,
`likes` smallint(6) NOT NULL,
UNIQUE KEY `comment_id` (`comment_id`),
KEY `user_id` (`user_id`),
FULLTEXT KEY `comment_body` (`comment_body`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `fb_posts` (
`post_id` bigint(18) NOT NULL,
`user_id` int(12) NOT NULL,
`post_body` longtext NOT NULL,
`post_time` int(11) NOT NULL,
`num_comments` smallint(6) NOT NULL,
`likes` smallint(6) NOT NULL,
UNIQUE KEY `post_id` (`post_id`),
KEY `user_id` (`user_id`),
FULLTEXT KEY `post_body` (`post_body`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `fb_users` (
`user_id` int(12) NOT NULL COMMENT 'User ID',
`user_name` varchar(100) NOT NULL COMMENT 'User Full Name',
UNIQUE KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;