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 matlab中mjs用不了
  • ¥15 Ios抖音直播的时候如何添加自定义图片在直播间!
  • ¥60 riscv-pulpino总线上挂载axi从机
  • ¥15 ssh登录页面的问题
  • ¥50 关于在matlab上对曲柄摇杆机构上一点的运动学仿真
  • ¥15 jetson nano
  • ¥15 :app:debugCompileClasspath'.
  • ¥15 windows c++内嵌qt出现数据转换问题。
  • ¥15 stm32 串口通讯过程中的问题
  • ¥20 公众号如何实现点击超链接后自动发送文字