I am planning and exploring my transition from MySQL to MongoDB right now, and I just had an interesting thought ... I have a bunch of hierarchical objects that I need to store in the database. My current method is to put together a collection of embedded documents. They never need to be looked for. Is it possible to just serialize PHP objects, insert them into the database and then not initialize them back to PHP objects when I want to use them? An alternative is to use Doctrine as my ORM.
My programming intuition tells me that this is poor design and limits, but I feel that serialization and non-esterization will be very fast and eliminate the need for ORM.
What is your opinion? Good design or bad design?
source share