database table Design Essays (sub-Library sub-table)

Source: Internet
Author: User
Tags one table

I am currently working in an entrepreneurial internet company, since it is an internet company, it will be designed to either application systems or databases distributed. The following is a brief introduction to some of the database aspects of the design.

database table design, according to their own business needs can be split into multiple libraries. There are order libraries, product libraries, account libraries, underlying payment libraries, and so on, which is the legendary vertical sub-Library. So what are the solutions to database architecture and database optimization:

1. Vertical sub-table. Vertical sub-table is "a table split into more than one table", such as the order form inside, there are different types of orders, with ordinary orders and a yuan to seize the PO, a dollar to win the treasure order will be winning lottery code, and so on, these are a single-treasure order unique, you can take out a table. The design of the library table has been basically touched by people.

2. Vertical sub-Library. Vertical Sub-Library has been mentioned above, is based on their own business needs, business modules, a business module to build a corresponding database, not all business modules common one database. In high concurrency scenario, the vertical sub-Library can break through the bottleneck of Io, connection number and single machine hardware resource, which is an important means to optimize the database architecture in large-scale distributed system.

3. Horizontal sub-table. Horizontal sub-table sense is not very significant, that is, in a database to duplicate a table multiple times, the data can be based on the primary key, IP and other hash and take the mold after splitting into multiple tables, which to a certain extent, improve the query efficiency, but from the library level, there will still be bottlenecks.

4. Horizontal sub-Library. Simple level of the significance of the sub-Library, a version of the design level sub-Library, will be combined with the sub-table, see 5.

5. Horizontal sub-Library sub-table. Horizontal sub-Library is the same database deployment of multiple units, at the same time, the idea of a horizontal table plus, is the same table after the record to take a different database. In the scenario of high concurrency and massive data, the sub-database table can effectively alleviate the performance bottleneck and pressure of single machine and library, and break through the bottleneck of Io, connection number and hardware resource.

There are a variety of other ways of Sub-library sub-table combinations, according to their own business processing can choose the appropriate. We are only using vertical sub-Library and read-write separation to improve the efficiency of database access at present.

PS: See the database sub-list of articles, and then their own combined with the current project is also recorded. may not be high, but at least for children who want to improve the performance of the database to indicate a direction.

database table Design Essays (sub-Library sub-table)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.