dongyan3018 2016-07-03 07:18
浏览 16
已采纳

关于一列的更多信息与关于更多列的少量信息

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?

  • 写回答

1条回答 默认 最新

  • douxishai8552 2016-07-03 07:38
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 yolov8边框坐标
  • ¥15 matlab中使用gurobi时报错
  • ¥15 WPF 大屏看板表格背景图片设置
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真