Hi there,
I am having a design question I would like to get some feedback on. Since the core of the application using Hibernate together with Hibernate Annotations I thought I post the question here first. Maybe there is neat little Hibernate feature I could use?
Here is the problem. I have a Company entity with the usual properties like name, organization number, etc. There are also quite a few associations like for example to addresses, contacts, financial information, etc. I think the exact structure is not so important. The data comes from a back end system which exports into a XML file which we in turn parse in order to populate our db with entities.
So far quite simple, right? Now it gets a little more complicated. The application is also supposed to handle incremental updates (new companies and or changes to existing ones). The backend system send xml files again. The problem is not so much to insert or update the existing companies, but rather that a user can decide to montior/watch a company for changes. If a change occurs he should be notified that eg the address of company X has changed. I don't have to keep the full history of changes. It would be sufficient to keep the 'change' information until everyone who monitors this particular company has seen the change.
By the way - we are talking about 240 000 companies, not counting all the associated entities. It feels like a quite common use case. Maybe someone has solved a similar problem before and wants to share his knowledge.
Any thoughts or brain storming ideas welcome :)
--Hardy
|