1. Lucifer666

    OP Lucifer666 all the world needs is me

    Apr 22, 2011
    United Kingdom
    Excuse the non-descriptive title; I couldn't think of a way to sum up the question into a few words.

    Suppose I have a relational database schema (as in, I have a database thought out into tables for the entities and relationships that can easily be implemented in SQL)

    Let's say I have a numeric attribute in Entity Type A. I want to enforce a rule along the lines of "Every time an entity X of Entity Type A is added to relationship A (with another entity), one of the attributes of that entity X increments by 1."

    Would/can this be done in SQL, or would this have to be implemented in whatever application software is accessing the database?

Draft saved Draft deleted

Hide similar threads Similar threads with keywords - databases, Question,