Deliver Awesome UI with the most complete toolboxes for .NET, Web and Mobile development
Automate UI, load and performance testing for web, desktop and mobile
A complete cloud platform for an app or your entire digital business
Detect and predict anomalies by automating machine learning to achieve higher asset uptime and maximized yield
Automate decision processes with a no-code business rules engine
Optimize data integration with high-performance connectivity
Connect to any cloud or on-premises data source using a standard interface
Build engaging multi-channel web and digital experiences with intuitive web content management
Personalize and optimize the customer experience across digital touchpoints
Build, protect and deploy apps across any platform and mobile device
Rapidly develop, manage and deploy business apps, delivered as SaaS in the cloud
Given an arbitrary number of collections of cars:
The way the data is organized can have a significant impact on how you model the rules.
Two solutions are presented based on different data models.
Part I uses an N:N association data model and that leads to a very simple rule model.
Part II uses a “flat” record oriented data model and converts the flat data into structured data (using 1:N associations).
Part I makes use of the reverse association (from car types to the groups(s) they belong to).
When collections of related objects are modeled this way, complex logic can be expressed quite succinctly.
Technically when we refer to “car” in the example above it’s not a specific car we’re referring to but rather the class of cars that share that make and model.
But what if the data is not structured but instead comes in as “flat” records that simply contain a field indicating which group the make and model belong to? Each record now might represent a specific vehicle (especially if we add the VIN to the record). This is actually how the data is described in the original challenge statement. In this data structure the same make and model may be repeated in different records (for the same vehicle or a different vehicle) so we’ll need a slightly different approach. This is covered in Part II.