Saturday, 15 February 2014

A topic to experienced database architects -


I have to face the following problem.

I (say) information. All humans can be classified into one of three categories: Adult female, adult male, child It is clear that parameters like "height" and "weight" are applicable for all categories. The parameter "Number of children" applies only to adults, whereas the parameter "number of concepts" applies only to women. Apart from that, each parameter can be classified as compulsory or alternate (depending on the category, for example, "Number of former partners" is optional for the parameter).

When I say "height" and "weight", I check whether the information in these two areas is self-compatible or not. I.e., I mark as a mistake whose record height = 6'4 '' and weight = 10 pounds (obviously, it is physically impossible). I have many similar validation rules.

When I insert a record about a human, I need to reflect the following features of the information:

  1. This special The maximum possible information for the category of humans (including all optional parameters).
  2. The minimum information required for the category (i.e., the mandatory field only)
  3. What is actually included for this particular person (i.e., whatever this is for me It is also possible to incorporate it, it does not matter if it is less than the minimum required amount of information). There is a non-minor issue here that one area "XXX" can be zero value because I have never included anything in it or because I deliberately inserted zero values. Same argument with fields with a default value Therefore it should be reflected somewhere that I have processed this particular area.
  4. How much of the information entered is verified (i.e., if I load some 5 fields, then I can only check the self-continuity by ignoring 2 fields).

    So my question is how to organize it technically. At present, all these essential features are either strictly no integrated logic or have been completely broken into independent blocks. I need to create an integrated approach.

    In this regard, there are some naïve thoughts in my head. For example, for every class of human beings, I can create and store a list of possible areas ( I call it a "template"). A can mark those areas which are mandatory

    When I insert a record about human beings, then I copy the template and mark which fields from this templates actually Has been processed. In the next step, I can mark this copy of the template which will be verified at present.

    The module of verification has been specially corrected in the following way: For each verification process, I prepare a list of the fields being used in this particular verification process. Then I only call verification procedures that have fields that are marked "to verify" in the copy of template for particular human being actually marked (see previous route).

    As you see, this is the most direct way to solve this problem. But my guess is that there are a lot of standardized approaches which I do not know about. I really doubt that I am the first in the world to solve this kind of problem. I do not like my solution because it is really painful to write the code to correctly reflect this copied template, all the "updates" are being recorded with the record.

    So, I ask you to share your opinion, will you solve this problem?

    I think there are two questions:

    • I How do I store multicolored data in a database?
    • How do I approve complex business rules?

      You should know them separately - trying to solve both together is probably very difficult.

      There are some approaches to polymorphic data in RDBMSes - for example, using the word ORM. Here are three solutions - table per class hierarchy, table per subclass and per concrete square table - "pure" relational solutions. You can also use the design, or you can use a document approach (data storage in structured formats such as XML or JSON) - these are not "pure" relational options, but their location.

      Complicated business rules are often verified - these are very good bits of technology, but you have to make sure that your problem actually fits in with their solution - to invest in a rule engine Decision-making changes your project in a rule engine project, not a "human" project. Alternatively, its mainstream solutions include business logic about entities in the business logic level of the application. It seems that you are getting it out

No comments:

Post a Comment