{"id":188,"date":"2018-05-04T13:59:42","date_gmt":"2018-05-04T12:59:42","guid":{"rendered":"http:\/\/generic.wordpress.soton.ac.uk\/kanton\/?p=188"},"modified":"2018-05-04T14:02:05","modified_gmt":"2018-05-04T13:02:05","slug":"database-design","status":"publish","type":"post","link":"https:\/\/generic.wordpress.soton.ac.uk\/kanton\/2018\/05\/04\/database-design\/","title":{"rendered":"Database design"},"content":{"rendered":"<p>\uff081\uff09User simple registration information table.<\/p>\n<p>Tb_customer<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"176\">Fields<\/td>\n<td width=\"128\">Type<\/td>\n<td width=\"123\">Key<\/td>\n<td width=\"126\"><\/td>\n<\/tr>\n<tr>\n<td width=\"176\">Customer_id<\/td>\n<td width=\"128\">int<\/td>\n<td width=\"123\">PK<\/td>\n<td width=\"126\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"176\">Customer_password<\/td>\n<td width=\"128\">varchar<\/td>\n<td width=\"123\">&#8211;<\/td>\n<td width=\"126\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"176\">Customer_email<\/td>\n<td width=\"128\">varchar<\/td>\n<td width=\"123\">&#8211;<\/td>\n<td width=\"126\">NOT NULL<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>\uff082\uff09Group information table<\/p>\n<p>Tb_group<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"138\">Fields<\/td>\n<td width=\"138\">Type<\/td>\n<td width=\"138\">Key<\/td>\n<td width=\"138\"><\/td>\n<\/tr>\n<tr>\n<td width=\"138\">Group_id<\/td>\n<td width=\"138\">int<\/td>\n<td width=\"138\">PK<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">Group_name<\/td>\n<td width=\"138\">varchar<\/td>\n<td width=\"138\">&#8211;<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">Group_org<\/td>\n<td width=\"138\">int<\/td>\n<td width=\"138\">FK<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">Group_Date<\/td>\n<td width=\"138\">Date<\/td>\n<td width=\"138\">&#8211;<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">Group_type<\/td>\n<td width=\"138\">varchar<\/td>\n<td width=\"138\">&#8211;<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>(3) Friend information table<\/p>\n<p>Tb_friend<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"138\">Fields<\/td>\n<td width=\"138\">Type<\/td>\n<td width=\"138\">Key<\/td>\n<td width=\"138\"><\/td>\n<\/tr>\n<tr>\n<td width=\"138\">Friend_id<\/td>\n<td width=\"138\">int<\/td>\n<td width=\"138\">PK<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">Friend_user<\/td>\n<td width=\"138\">int<\/td>\n<td width=\"138\">FK<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">Friend_Item<\/td>\n<td width=\"138\">int<\/td>\n<td width=\"138\">FK<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">Friend_name<\/td>\n<td width=\"138\">varchar<\/td>\n<td width=\"138\">&#8211;<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>(4) Race information table<\/p>\n<p>Tb_item<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"138\">Fields<\/td>\n<td width=\"138\">Type<\/td>\n<td width=\"138\">Key<\/td>\n<td width=\"138\"><\/td>\n<\/tr>\n<tr>\n<td width=\"138\">Item_id<\/td>\n<td width=\"138\">int<\/td>\n<td width=\"138\">PK<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">Item_group<\/td>\n<td width=\"138\">int<\/td>\n<td width=\"138\">FK<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">Item_startime<\/td>\n<td width=\"138\">Date<\/td>\n<td width=\"138\">&#8211;<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">Item_endtime<\/td>\n<td width=\"138\">Date<\/td>\n<td width=\"138\">&#8211;<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">Item_startprice<\/td>\n<td width=\"138\">varchar<\/td>\n<td width=\"138\">&#8211;<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">Item_endprice<\/td>\n<td width=\"138\">varchar<\/td>\n<td width=\"138\">&#8211;<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">Item_state<\/td>\n<td width=\"138\">int<\/td>\n<td width=\"138\">&#8211;<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">Item_number<\/td>\n<td width=\"138\">int<\/td>\n<td width=\"138\">&#8211;<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>(5) User details table<\/p>\n<p>Tb_user<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"138\">Fields<\/td>\n<td width=\"138\">Type<\/td>\n<td width=\"138\">Key<\/td>\n<td width=\"138\"><\/td>\n<\/tr>\n<tr>\n<td width=\"138\">User_id<\/td>\n<td width=\"138\">int<\/td>\n<td width=\"138\">PK<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">User_name<\/td>\n<td width=\"138\">varchar<\/td>\n<td width=\"138\">&#8211;<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">User_email<\/td>\n<td width=\"138\">varchar<\/td>\n<td width=\"138\">&#8211;<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">User_tel<\/td>\n<td width=\"138\">int<\/td>\n<td width=\"138\">&#8211;<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">User_signature<\/td>\n<td width=\"138\">varchar<\/td>\n<td width=\"138\">&#8211;<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">User_gender<\/td>\n<td width=\"138\">varchar<\/td>\n<td width=\"138\">&#8211;<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">User_item<\/td>\n<td width=\"138\">int<\/td>\n<td width=\"138\">FK<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">User_friend<\/td>\n<td width=\"138\">int<\/td>\n<td width=\"138\">FK<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">User_group<\/td>\n<td width=\"138\">int<\/td>\n<td width=\"138\">FK<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">User_customer<\/td>\n<td width=\"138\">int<\/td>\n<td width=\"138\">FK<\/td>\n<td width=\"138\">NOT NULL<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>\uff081\uff09User simple registration information table. Tb_customer Fields Type Key Customer_id int PK NOT NULL Customer_password varchar &#8211; NOT NULL Customer_email varchar &#8211; NOT NULL &nbsp; \uff082\uff09Group information table Tb_group Fields Type Key Group_id int PK NOT NULL Group_name varchar &#8211; NOT NULL Group_org int FK NOT NULL Group_Date Date &#8211; NOT NULL Group_type varchar &#8211; &hellip; <a href=\"https:\/\/generic.wordpress.soton.ac.uk\/kanton\/2018\/05\/04\/database-design\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Database design<\/span><\/a><\/p>\n","protected":false},"author":3005,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5],"tags":[21],"class_list":["post-188","post","type-post","status-publish","format-standard","hentry","category-technology-and-design","tag-database"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9O41e-32","_links":{"self":[{"href":"https:\/\/generic.wordpress.soton.ac.uk\/kanton\/wp-json\/wp\/v2\/posts\/188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/generic.wordpress.soton.ac.uk\/kanton\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/generic.wordpress.soton.ac.uk\/kanton\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/generic.wordpress.soton.ac.uk\/kanton\/wp-json\/wp\/v2\/users\/3005"}],"replies":[{"embeddable":true,"href":"https:\/\/generic.wordpress.soton.ac.uk\/kanton\/wp-json\/wp\/v2\/comments?post=188"}],"version-history":[{"count":1,"href":"https:\/\/generic.wordpress.soton.ac.uk\/kanton\/wp-json\/wp\/v2\/posts\/188\/revisions"}],"predecessor-version":[{"id":189,"href":"https:\/\/generic.wordpress.soton.ac.uk\/kanton\/wp-json\/wp\/v2\/posts\/188\/revisions\/189"}],"wp:attachment":[{"href":"https:\/\/generic.wordpress.soton.ac.uk\/kanton\/wp-json\/wp\/v2\/media?parent=188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/generic.wordpress.soton.ac.uk\/kanton\/wp-json\/wp\/v2\/categories?post=188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/generic.wordpress.soton.ac.uk\/kanton\/wp-json\/wp\/v2\/tags?post=188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}