duanchigeng4313 2014-07-01 09:59
浏览 61
已采纳

mysql数据库存储了存储数据,大量少量或少量大数据的最佳实践

I have two tables that hold information, one of properties and one of investors and I want to store investors that are interested in certain properties.

I am making a third linking table to store this information, but I'm not sure which is best practice, should I store one investor ID and many property ID's in one row (or one property ID to investor ID's) or should I do individual ones?

My problem is if I do individual ones the number of rows could easily go into the tens of thousands in a couple of months, but having many in one column will be a hefty number too.

Which is best practice? Small quantity of large data, or large quantities of small data?

(Also worth mentioning that I need to keep the data for reports so deleting them is out of the question.)

  • 写回答

2条回答 默认 最新

  • dongshadu4498 2014-07-01 10:03
    关注

    The "Best Practice" is going to be to normalize your data, which in this case sounds like having large quantities of small data. Assuming you make both records the primary key, this look up should be relatively fast even for tens of thousands of rows.

    Also in general you wont' have issues with data in SQL until you hit millions and for small properly indexed tables like this I don't forsee an issue.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算