正在加载图片...
Domain constraints Integrity constraints guard against accidental damage to the database, by ensuring that authorized changes to the database do not result in a loss of data consistency Domain constraints are the most elementary form of integrity constraint They test values inserted in the database, and test queries to ensure that the comparisons make sense New domains can be created from existing data types E.g. create domain Dollars numeric(12, 2) create domain Pounds numeric (12, 2) We cannot assign or compare a value of type dollars to a value of type Pounds However, we can convert type as below (cast rA as Pounds) Database System Concepts 6.2 OSilberschatz. Korth and SudarshanDatabase System Concepts 6.2 ©Silberschatz, Korth and Sudarshan Domain Constraints Integrity constraints guard against accidental damage to the database, by ensuring that authorized changes to the database do not result in a loss of data consistency. Domain constraints are the most elementary form of integrity constraint. They test values inserted in the database, and test queries to ensure that the comparisons make sense. New domains can be created from existing data types E.g. create domain Dollars numeric(12, 2) create domain Pounds numeric(12,2) We cannot assign or compare a value of type Dollars to a value of type Pounds. However, we can convert type as below (cast r.A as Pounds)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有