Home  >  Q&A  >  body text

I’m curious, and I’d like to ask someone to help me. How should I design the order data table for a large shopping volume website like Taobao?

Sorry, I have never done a large website, and I am still not very proficient in databases

If the shopping table has hundreds of billions of data, what should be the appropriate value for the primary key id?

But since Taobao has developed so far, how has so much Taobao order data been stored? Such a huge amount of data?

Please give me the answer

何惜一博何惜一博2001 days ago1461

reply all(2)I'll reply

  • 秋香姐家的小书童

    秋香姐家的小书童2019-03-31 11:37:47

    There are several ways

    1. For example, divide the order number into 10 libraries according to the last number 0-9. When querying the order, just write a small algorithm to match which database it is. One library and one database server

    If the amount of data is 10 million Then it becomes a database with one million pieces of information. In this way, the pressure on the database is almost gone

    2. If the amount of concurrency is particularly large, then divide each database into N tables. Example: Divide every 500,000 pieces of order number information into one table. Assuming 1 billion pieces of information, then one table only has 2,000 pieces of data.


    I don’t know if you understand the design of the database structure I’m talking about

    reply
    2
  • Cancelreply