Database

Generic data modelling of products in the Entity Framework (EF)

Everything is composed of something until you hit the fundamental elements of your domain. In a restaurant environment these would be what a chef would call ingredients, ie. stuff that comes from a food processing plant or a farm. However at the food processing plant these are the output rather than the input. I’ve tried to draw this below, it’s not complicated once you understand that it is a model of how things are.

So model this, using a table ProductBase

Ingredients, recipes, menus, etc. are all the same.

Parameter Enumeration Tables.

Usually when designing a database there are a few fields in various tables that define things such as type, category, group. Normally these would be sufficiently important to justify their own entity within the database – so for example you’d have a category table.

Database creation, migration and how it works with source control (SVN) and projects.

Database version control has been something that used to cause me problems, a lot of problems, because it wasn't within the normal controlled sources. This had to change - and it isn't something that is easy to do as it requires discipline because the databases don't really integrate with any source control system. (Correct me if I'm wrong - I'll be very pleased).

Syndicate content