开发者

On a Youtube-like website, would it make sense to use individual sqlite files to store video comments? (One sqlite file per video.)

"On a Youtube-like website, would it make sense to use individual sqlite files to store vi开发者_运维知识库deo comments? (One sqlite file per video.)"

I'm curious to hear what anyone thinks.


The reopening of so many files and file handles at the OS level may cause a performance hit. I would let the database do what databases do best and just have a FK to the video ID for each comment.


As you've stated in the comments that you already have a MySQL database for videos, there's little sense in using SQLite for commenting. A comments table with a video_id column is going to be a lot more flexible.

SQLite also doesn't hold up too well in a situation where you might have concurrent writes, which commenting is.


It would make it impossible (or very difficult) to efficiently search all comments.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜