3

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.

Community
  • 1
  • 1
elniño
  • 121
  • 1
  • 7
  • 2
    I think this question is not realy answer-able. There are many posts on SO that highlight the differences and when to use what. For example http://stackoverflow.com/search?q=use+cases+nosql holds many good answers (try sorting by "votes") – DrColossos Jan 26 '11 at 08:57

0 Answers0