Doctrine: ODM vs. ORM [closed]
I consider using ODM/ORM/mixing ODM and ORM entities in my new Doctrine 2.0 project. When should 开发者_运维问答I use ORM (MySQL InnoDB) and when ODM (MongoDB)? Should I mix it in one project?
Pseudo structure of my app (Google Reader like):
- user { id, login, password, email }
- channel { id, url }
- entry { id, channelId, title, body, date }
- entryValue { entryId, userId, value }
- userFriend { user1Id, user2Id }
Most popular functions:
- getValuesOfNewsByUsers(newsId, [userIdArray])
- getEntriesByUserWithMinValue(userId, minValue)
- areFriends(user1, user2)
- getEntryValues(userId, [entryIdArray])
I should be prepared for billions of rows in entry and entryValue tables.
精彩评论