网站如何改字体,wordpress获取文章类别目录,网站做外链什么意思,自己做的网站怎么备案当设计用户的购物车模型表时: 1:购物车是订单的一种状态 订单的状态#xff1a; 【待购买】#xff1a;也就是购物车—超市中放置到购物篮 【待支付】#xff1a;已经从购物车中确认–去到收银台中结算#xff0c;但未给钱 【已支付】#xff1a;已经支付过的订单----已经…当设计用户的购物车模型表时: 1:购物车是订单的一种状态 订单的状态 【待购买】也就是购物车—超市中放置到购物篮 【待支付】已经从购物车中确认–去到收银台中结算但未给钱 【已支付】已经支付过的订单----已经把钱给了收银台出来小票了
MySQL本身没有对单表最大记录数进行限制数值取决于操作系统对单个文件的限制本身。 阿里巴巴《Java开发手册》提出单表行数超过 500 万行或者单表容量超过 2GB才推荐进行分库分表。 那么一张表里面存放的数据太多了那么该怎么设计
In particular, I would like to create a private data table for each user, which belongs to only one user. Perhaps this table is a user’s notebook data table, which records the user’s notes for 10 years. There will be 30 pieces of data updated every day, maybe 1000 more, so 10 years, with 3.6 million pieces of data, then if there are 100,000 users, then it is 36 billion pieces of data, and if you also use the form of separating a table into multiple tables in the database, it will be an outrageously slow operation that makes the machine inefficient
Therefore, it is better to have one data table for one user
MySQL数据库可以存储多达2^64-1个数据表但实际上一个数据库实例通常不会包含这么多表。数据表的数量受限于服务器的硬件资源尤其是内存和存储设备。
1根据用户的id值来进行分批存储 id值1-10万的存放在1个硬盘中 那么我只需要按照id的值去找到数据表
2当分布式时那么就按照用户的id去找不同的服务器中进行查找 3优点—有一点吧
I use the [django] framework to develop,
1: I used the [User] model that comes with django and didnt change anything in this model
2: When creating a new user, you should create a data table with [laoliu_id] and use [laoliu] as part of the starting name of the data table.
3: [idlaoliu_] The data table will record all the notes of a user, there may be 1000000 pieces of data,
4: [idlaoliu_] The data table should have multiple fields, as follows:idmodels.AutoField(primary_keyTrue,uniqueTrue,auto_createdTrue,verbose_nameID)
goods models.ForeignKey(Goods, on_deletemodels.DO_NOTHING, verbose_namegoods_id)
goods_num models.IntegerField(goods_num)
create_time models.DateTimeField(auto_now_addTrue, verbose_namecreate_time)
state models.IntegerField(default0, verbose_namestate)
remark1 models.TextField(verbose_nameremark1)
remark2 models.TextField(verbose_nameremark2)4: [Django] What method does this use?
5: What is the code logic?
6: When you want to use a [laoliu_id] data table, how to call it.
When I get [user] through [request], which is [request.user]
How do I open the [laolui_id] datasheet belonging to this [user.id] in [Django].
For example, open the note sheet in [laoliu_1] to get all the data in it
For example, open the note sheet in [laoliu_2] to get all the data in it
Im going to make changes to the [goods][goods_num] field of [id1] in the [laoliu_2] notesheet, what should I do?