The answer depends on how much data is going to be in each table.
A table itself takes up almost no space - it's the rows that make the database size grow.
What you need to do is estimate how large each table is going to get within the foreseeable future - erring on the side of keeping the tables together.
That said, nine tables with 43 fields (assuming reasonably sized rows) would need to have hundreds of thousands of rows each to approach 1GB. I have a multi-million-row SQLite file which is only 100MB.
How much more complicated is it if you have to manage multiple databases?
How much slower will it be to query multiple databases and aggregate the results?
How important is performance?
Putting everything in a single database will give you better performance (usually) and is easier to develop. You should do that until your data gets big enough that you outgrow the database.
发布评论
评论(2)
答案取决于每个表中有多少数据。
表本身几乎不占用空间 - 是行导致数据库大小增长。
您需要做的是估计在可预见的将来每个表将有多大 - 最好不要将表放在一起。
也就是说,具有 43 个字段的 9 个表(假设行大小合理)每个表需要数十万行才能接近 1GB。我有一个数百万行的 SQLite 文件,只有 100MB。
The answer depends on how much data is going to be in each table.
A table itself takes up almost no space - it's the rows that make the database size grow.
What you need to do is estimate how large each table is going to get within the foreseeable future - erring on the side of keeping the tables together.
That said, nine tables with 43 fields (assuming reasonably sized rows) would need to have hundreds of thousands of rows each to approach 1GB. I have a multi-million-row SQLite file which is only 100MB.
这取决于。
您期望有多少数据?
如果您必须管理多个数据库,那会变得多么复杂?
查询多个数据库并聚合结果会慢多少?
性能有多重要?
将所有内容放在一个数据库中会给您带来更好的性能(通常)并且更容易开发。您应该这样做,直到您的数据变得足够大以至于数据库无法容纳为止。
It depends.
How much data are you expecting?
How much more complicated is it if you have to manage multiple databases?
How much slower will it be to query multiple databases and aggregate the results?
How important is performance?
Putting everything in a single database will give you better performance (usually) and is easier to develop. You should do that until your data gets big enough that you outgrow the database.