• taryn (unregistered) in reply to byrmol
    Anonymous:

    What is the difference between "business logic", "business rules" and "data integrity"?

    I'll give you a hint... Nothing...



    Er actually...
    "business rules" may say something like "before we can fetch a bunch of title certificates based on your property details, you need to have filled in the title reference field".

    "data integrity" says something like "that's an integer field, you can't write "I love bob" there".
  • (cs) in reply to taryn
    Anonymous:
    Anonymous:

    What is the difference between "business logic", "business rules" and "data integrity"?

    I'll give you a hint... Nothing...


    "business rules" may say something like "before we can fetch a bunch of title certificates based on your property details, you need to have filled in the title reference field".


    But isn't that requirement enforcing data integrity?

    sincerely,
    Richard Nixon
  • (cs) in reply to Richard Nixon
    Richard Nixon:
    Anonymous:
    Anonymous:

    What is the difference between "business logic", "business rules" and "data integrity"?

    I'll give you a hint... Nothing...


    "business rules" may say something like "before we can fetch a bunch of title certificates based on your property details, you need to have filled in the title reference field".


    But isn't that requirement enforcing data integrity?

    sincerely,
    Richard Nixon


    In my understanding, data integrity is a bit lower level, like "the customer number in an order must exist in the customer table" while a business rule might say "A customer with a credit limit of X may not have more unpaid orders delivered to him than a total amount of X".
    Data integrity is something a decent database can enforce by its standard features, while business rules would at least require triggers and/or stored procedures.
  • (cs) in reply to ammoQ
    ammoQ:


    In my understanding, data integrity is a bit lower level, like "the customer number in an order must exist in the customer table" while a business rule might say "A customer with a credit limit of X may not have more unpaid orders delivered to him than a total amount of X".
    Data integrity is something a decent database can enforce by its standard features, while business rules would at least require triggers and/or stored procedures.


    Think of it this way: if your business rules are followed, you will have data integrity.  How you physcially implement those business rules is irrelevant, whether you use a simple non-null constraint, foreign keys, triggers, or whatever else.

    In your example, "the customer number in an order must exist in the customer table" satisfies the following business rule:  "All orders must be assigned a valid customer number."  They are the same; the first is just the specifics of how you are phsyically implementing that rule.


  • (cs) in reply to Jeff S
    Jeff S:


    Think of it this way: if your business rules are followed, you will have data integrity.  How you physcially implement those business rules is irrelevant, whether you use a simple non-null constraint, foreign keys, triggers, or whatever else.

    In your example, "the customer number in an order must exist in the customer table" satisfies the following business rule:  "All orders must be assigned a valid customer number."  They are the same; the first is just the specifics of how you are phsyically implementing that rule.



    True, but business rules also enforce constraints that do not pertain to data integrity. For example, "Beer may not be sold to customers without age verification" might be a business rule, but it's not relevant for data integrity.
  • (cs) in reply to ammoQ
    ammoQ:
    Jeff S:


    Think of it this way: if your business rules are followed, you will have data integrity.  How you physcially implement those business rules is irrelevant, whether you use a simple non-null constraint, foreign keys, triggers, or whatever else.

    In your example, "the customer number in an order must exist in the customer table" satisfies the following business rule:  "All orders must be assigned a valid customer number."  They are the same; the first is just the specifics of how you are phsyically implementing that rule.



    True, but business rules also enforce constraints that do not pertain to data integrity. For example, "Beer may not be sold to customers without age verification" might be a business rule, but it's not relevant for data integrity.


    lol ... Come on .... obviously we are talking about business rules as they pertain to your database application ... Did you take my meaning to be "*All* business rules somehow must be implemened in your RDBMS" ????  Of course not!  It's also a "business rule" that I cannot wear sneakers to work, I suppose.  Can't think of a good trigger to enforce that! :)
  • (cs) in reply to Jeff S
    Jeff S:


    lol ... Come on .... obviously we are talking about business rules as they pertain to your database application ... Did you take my meaning to be "*All* business rules somehow must be implemened in your RDBMS" ????  Of course not!  It's also a "business rule" that I cannot wear sneakers to work, I suppose.  Can't think of a good trigger to enforce that! :)


    I'm not saying that all businelss rules should be implemented in the database, though it's possible (*); I was just looking for an example for the difference between data integrity rule and business rule. Most people would implement the business rules in the middle layer.

    (*) If you get tired of your vb.net vs. c# discussion with GoatCheez, we might start a "put a lot of logic into the database" discussion. I promise it won't be more mindless. This thread is already highjacked, how much worse might it get? ;-)
  • (cs) in reply to ammoQ
    ammoQ:
    Jeff S:


    lol ... Come on .... obviously we are talking about business rules as they pertain to your database application ... Did you take my meaning to be "*All* business rules somehow must be implemened in your RDBMS" ????  Of course not!  It's also a "business rule" that I cannot wear sneakers to work, I suppose.  Can't think of a good trigger to enforce that! :)


    I'm not saying that all businelss rules should be implemented in the database, though it's possible (*); I was just looking for an example for the difference between data integrity rule and business rule. Most people would implement the business rules in the middle layer.

    (*) If you get tired of your vb.net vs. c# discussion with GoatCheez, we might start a "put a lot of logic into the database" discussion. I promise it won't be more mindless. This thread is already highjacked, how much worse might it get? ;-)


    he he ..  that was frustrating ...  I think  i am hijacked out for this week .. maybe next week! :)
  • Asdf (unregistered)

    LOLOLOLOL
    ROFL!!!
    how about having to enter DOB in binary?

Leave a comment on “Form Invalidation”

Log In or post as a guest

Replying to comment #:

« Return to Article