MySQL: Many tables or many databases?

前端 未结 9 511
陌清茗
陌清茗 2020-11-30 20:40

For a project we having a bunch of data that always have the same structure and is not linked together. There are two approaches to save the data:

  • Creating a n
9条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-30 21:02

    Why not create a single table to keep track of your pools (with a PoolID and PoolName as you columns, and whatever else you want to track) and then on your 15-25 tables you would add a column on all of them which would be a foreign key back to you pool table so you know which pool that particular record belongs to.

    If you don't want to mix the data like that, I would suggest making multiple databases. Creating multiple tables all for the same functionality makes my spider sense tingle.

提交回复
热议问题