I have these models(tables): USER
, PHOTO
, BOOK
, QUESTION
etc.
And now I wanna add the favorite
or like
feature to the site, that is user can like some photos or books or questions, and of course a photo can be liked by many users.
So I wanna ask you how to implement this kind of thing.
a page to show the books, photos, quesitons etc which are liked by the current login user; how many people like the book.
这里我的想法很简单。
<><><>>>>
表格:books_users
书籍_iduser_id
表格:photos_users
照片_iduser_id
表格:questions_users
问题_iduser_id
<>B>。
表格:users_ similars
专栏类型为持有图书、照片信息。
A或B?
确实,我两人都在欧佩组织中试图在持有同样权利的物体之间建立继承关系。 但是,在数据对比方面,最好是把事情放在一个表(计划B)中,或保持其完整性(计划A)。 在非行的设计方面,我没有太多的经验,因此,请告诉我什么东西?