Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am trying to understand what applications is mongodb good for? I am working on a system in PHP to use both mongodb and sql to have less overhead on database that does the job not as efficient. For now, I am only interested in two aspects.

Loading around 50 objects and create a graph out of it. Each object will have 4-5 EAVs (Entity-Attribute-Value) and some attributes will be a formula based on other attributes. Something like (name, type, value) = (answerSum, formula, "%number1+%number2") where number1 and number2 are different eavs of the same object.

I am thinking of using SQL for the data points and NoSQL for the EAV part. Something like this:

objects (MySQL)
id, creator_id, category_id, name, date_created, pointX, pointY

objects_eav (MongoDB)
{'obj_id', 'name', 'type', 'formula'}

And some PHP snippet:

$models = Object::findAll('category_id=?',1);
foreach($model as $models) {
   $eav = ObjectEAV::find('obj_id=?',$model->id);
   $eav->printAllFields();
}

Do you think its a good idea?

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.