1

在 Mysql 数据库中存储/检索数组的最佳方法是什么?序列化数据是最好的方法吗?

我正在寻找整洁、漂亮的方法来做到这一点。

4

1 回答 1

4

Serializing is actually a worst way ever.

It is like if you cut a door from your expensive car, and use it as a sleigh, only because being too lazy to get some gas. Mysql is an expensive car and it have to be used properly, and solution have to be not a quick and dirty one but out of reason and knowledge.

The solution depends on the nature of the data in this array and most likely will involve a separate table (as tables in mysql being pretty much arrays themselves)

于 2013-08-13T07:25:00.483 回答