Tell me more ×
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It's 100% free, no registration required.

I have a system in existence which works on parent-child model.

  1. They share common attributes, as they belong to same class.
  2. A parent can enforces certain data on any user selected attribute, and the data is required to be propagated down the hierarchy for the same attribute in all children and their children.
  3. For a given attribute, if a child's parent dies (object gets destroyed) or child has not been enforced by parent, child can behave the same way, like in point #2, (on user request) for its children.

My system is pretty big (in database). For example:

  • Each object of the class has 150 atributes.
  • There are in total about 8 million attributes for objects created. Hence, the objects are close to 53,333.
  • There is a single parent for the objects. Its a big tree.

If I want to enforce data on the top most parent for a single attribute, it takes about 8 mins for it to complete.

Does anyone know a model which can perform faster than hierarchical model, but similar to behaviour?

share|improve this question
1  
If I understand you correctly, it is possible that every object will have a different value for some attribute. Then to enforce some value from the top, will definitely take 53333 assignments and they will take 8 mins. It could be that in reality this situation will very rarely occur or that you are allowed to do the assignments lazily. You should specify your needs in more detail. – Karolis JuodelÄ— Jan 13 at 13:52
8 minutes seems like a lot of time for this small an update. Have you checked whether your database design and query are good? (If not, ask on Stack Overflow.) – Raphael Jan 14 at 22:26

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.