A ChallangeSimple HR Model + Rules

time to read 2 min | 271 words

It seems like no one is ready to take my Linq Challange, so I decided to expand it a bit and meet my own standards. I decided to implement the challange in Active Record, since it is much faster to work with than NHibernate. Note that this is just the object model and the mapping, nothing more.

Overall, this is 800 lines of code and 20 lines of configuration, and I think that it took about three to four hours to build this demo.

Here is the object diagram:


And the database model:


You can download the sample project here, I included a SQL Script to create the database in the file.

Just to note, this is not a toy sample, this is a complex model that is capable of expressing very annoying business requirements. I added a bit of recursive rules, just to make it a bit more realistic. The real project has a lot more stuff to make it easier to work with the model, but in essense, this is the way that I built the project.

Just to clarify, I am truly interested in seeing other solutions to this problem, preferably not ones in NHibernate / Active Record. Mainly because I think that this is complex enough to be a real world problem and not something that can be solved with demo code.

More posts in "A Challange" series:

  1. (24 Dec 2006) Simple HR Model + Rules
  2. (18 May 2006) Implement This...