In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you the "MySQL sub-library sub-table example analysis", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn the "MySQL sub-library sub-table example analysis" this article.
I. objectives
This article will achieve the following objectives:
Number of sub-tables: 256 sub-libraries: 4
Taking user ID (user_id) as database slicing Key
Finally, test order creation, update, delete, order number query, according to user_id query list operation.
Architecture diagram:
The table structure is as follows:
CREATE TABLE `order_ XXX` (`order_ id` bigint (20) unsigned NOT NULL, `user_ id` int (11) DEFAULT'0' COMMENT 'order id', `status` int (11) DEFAULT' 0' COMMENT 'order status', `booking_ date` datetime DEFAULT NULL, `create_ time` datetime DEFAULT NULL, `update_ time` datetime DEFAULT NULL, PRIMARY KEY (`order_ id`), KEY `idx_user_ id` (`user_ id`), KEY `idx_ bdate` (`booking_ date`), KEY `idx_ ctime` (`create_ time`) KEY `idx_ utime` (`update_ time`) ENGINE=InnoDB DEFAULT CHARSET=utf8
Note: 000
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.