Database triggers / referential integrity and in-memory caching

You see that database triggers / referential integrity rules are used in such a way that they change the actual data in the database (changing the row w in table x causes the row y to change in table z)?

If so, how does this relate to the growing popularity of caching in memory (memcache and friends)? In the end, these actions take place inside the database, but the caching system must be aware of them in order to reflect the correct state (or at least cancel a possible state change). I find it hard to believe that callbacks are implemented for such cases.

Does anyone have real experience working with such a setting / experience in the real world, taking into account such a setting and rejecting it (in which direction did you go if caching, how do you apply integrity?)

+5
source share
1 answer

Simple answer:

  • Referential Integrity Must Have
  • Caching is a qualification that must have
  • Triggers nice to have

Longer answer

1993 (Dec RDB , , ), , " . , .

"", , .

, , . , (, "" ) (, "" ). "" , , , , :

   Question
   (TagId)         1 | Database triggers / referential integrity and in-memory caching
      |  
    -----
    | | |
  QuestionTag
 (QuestionId)       1 | 1  ... 1 | 2  ... 1 | 3 ...
    (TagId)
    | | |
    -----
      |
     Tag            1 | database ... 2 | referential-integrity ... 3 | triggers ...
   (TagId)

. , .

SO , ( ), , , SO. , - ?

. ? , ? , , , , , ? , , , , .

, , - "", , , "". "", , ? "" , , "" "". - - ?

20 , . , ( , ), , .

, , .

+5

All Articles