php retrieve image problem

如果想好似facebook 咁,每個user有自己upload的image, 每張image 又有attribute, 例如tag,permission,comment. 咁d images 應該
1). 當binary咁save係mysql, 連埋其他attribute 放係一個table
定係
2). 就咁放一個folder 入面

db 記住條link 就得

TOP

1) 放便睇囉,想加TAG都易D
2) 唔明你講乜

TOP

回覆 3# chingchiu169


    其實我想問用方案一或是方案二比較好

TOP

I do not suggest any binary in SQL server.

TOP

回覆 1# twaiho2003

It depends on your requirements.
1. allow to delete the image?
2. allow to undo the deletion?
3. need to backup the database periodically?
4. image size
....

U can get more ideas from looking the chapter 12(ghost file) of "SQL Antipattern".

TOP

facebook圖係 file base link, 因為要CDN,
facebook Front end database係 NoSQL, 用KeyValuePair

TOP

相關文章