当前位置: 动力学知识库 > 问答 > 编程问答 >

php - More information on one column vs Little information on more column

问题描述:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: