Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在 db 中存储一些关于item的信息。我有*item_id*、*item_name*,但我事先不知道有多少信息会有这个项目。其中一个可以有 *item_info1* 和 *item_info2* ,而另一个只有 *item_info1*。我如何才能实现列的这种动态?我只想将序列化信息存储在一个单元格中,但是为了获得单独的 *item_infoN* 我必须请求完整的单元格数据。这不是舒服的方式,我相信还有另一种方式可以解决这个问题。谢谢!
使用另一张桌子。
Items item_id item_name Item_Infos item_id item_info Foreign Key item_id references Items(item_id)
您可以为任何项目拥有任意数量的项目信息。
资源: