Why don't DBMS's support ASSERTION

前端 未结 7 985
猫巷女王i
猫巷女王i 2020-12-01 09:33

So I recently learned about ASSERTION in my databases course, and my prof noted that major databases don\'t support it, even though it is in the SQL-92 standard. I tried go

7条回答
  •  一整个雨季
    2020-12-01 09:52

    There is some rudimentary support in Oracle 10g:

    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_assert.htm

    I'm sure, other RDBMS with stored procedure support ship with similar built-in procedures... Clearly, that's not part of any SQL standard, though. The standard does specify:

     ::=
              CREATE ASSERTION  
              [  ]
    
     ::=
              CHECK   
    

    See chapter 11.34 of http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt

    I'm not sure about the CREATE ASSERTION statement. I haven't encountered it in any RDBMS so far, and I don't think many RDBMS actually implement that. On the other hand, a CHECK clause on a single table column can be considered an assertion, too.

提交回复
热议问题