CS540_B_HW09_16020.pdf - -Course ID CS540(B-Student ID 16020-Student Name Jaydutt Pathak-Homework 09 ANSWER 1 Data Integrity means data in a database

CS540_B_HW09_16020.pdf - -Course ID CS540(B-Student ID...

This preview shows page 1 - 3 out of 8 pages.

--Course ID: CS540 (B) --Student ID: 16020 --Student Name: Jaydutt Pathak --Homework#: 09 ANSWER 1: Data Integrity means data in a database adheres to business rules. There are three primary ways in which data integrity can be maintained Application Code Database Triggers Declarative Integrity Constraints Mapping the business rules one of the three methods is a design decision made by the designer. The database administrator is primarily concerned with implementation methods chosen by the designer and balancing the performance needs against integrity requirements. Application code can be implemented either as stored procedures within the database or as applications running on the client. This lesson focuses on the use of integrity constraints. Database Triggers: Database triggers are PL/SQL programs that are executed when a certain event such as an insert or an update of a column occurs on a table. Triggers can be enabled or disabled-that is, they can be set to execute when the event occurs, or they can be set not to execute even though they are defined. Database triggers are usually created only to enforce a complex business rule that cannot be defined as an integrity constraint.
Image of page 1
Integrity Constraints: Integrity constraints are the preferred mechanism for enforcing business rules because they: Provide improved performance Are easy to declare and modify they do not require extensive coding Centralize rules Are flexible(enabled or disabled) Are fully documented in the data dictionary ANSWER 2: An integrity constraint can be enabled or disabled. If a constraint is enabled, data is checked as it is entered or updated in the database. Data that does not confirm to the constraint’s rule prevented from being entered. If a constraint is disabled, then data that does not confirm can be entered into the database. An integrity constraint can be in one of the following states DISABLE NOVALIDATE DISABLE VALIDATE ENABLE NOVALIDATE ENABLE VALIDATE Disable No validate A constraint that is disable no validate is not checked. Data in the table as well as new data that is entered or updated may not conform to the rules defined by the constraint.
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 8 pages?

  • Spring '18
  • Constraints, administrator, Database management system, Constraint

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture