问题描述:

I create image upload and watch galery feature and I store each user image like this:

When user upload new image I update images column and It became like user_id_img1,user_id_img2,user_id_img3.For Fast SQL purpose is it good idea?Or shoud I insert new rows for each image from user?

网友答案:

This is the very basic stuff of database design, like multiplication table in arithmetic.

A column in database should always contain single value.

For the purpose of storing multiple data you have rows in your database. Therefore, always add another row for the each image.

相关阅读:
Top