Doctrine: ODM vs. ORM

I am considering using ODM / ORM / mix ODM and ORM in my new Doctrine 2.0 project. When should I use ORM (MySQL InnoDB) and when is ODM (MongoDB)? Should I mix it in one project?

The pseudo structure of my application (e.g. Google Reader):

  • user {id, login, password, email}
  • channel {id, url}
  • entry {id, channelId, name, body, date}
  • entryValue {entryId, userId, value}
  • userFriend {user1Id, user2Id}

Most popular features:

  • getValuesOfNewsByUsers (newsId, [userIdArray])
  • getEntriesByUserWithMinValue (userId, minValue)
  • areFriends (user1, user2)
  • getEntryValues ​​(userId, [entryIdArray])

I have to be prepared for billions of rows in the entry and entryValue tables.

+3
source share

Source: https://habr.com/ru/post/1786758/


All Articles