1. Trang chủ
  2. » Tất cả

Slide1

21 121 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

Session 1Introduction to Data Integrity Session ObjectivesIn this session we will learn about:–Data IntegrityDefine and describe data integrityList the rules for data integrity–Types of Data Integrity–Integrity Constraint Data integrityIn a database when data is entered or modified, the entered value need to be valid and accurate. Also, if any modification or deletion is carried out on the data, the change should reflect in all the relevant places in the database. This ensures the validity and consistency of data at all times, hence maintaining data integrityIntegrity of data can be maintained by specifying certain checks at the time of creating and modifying tables and then applying those checks when handing data Data integrityINSERTUDATEDELETEIs the data lyingWithin the constraints?INSERT, UPDATE or DELETEoperation is invalid.Discard the changeINSERT, UPDATE or DELETEoperation is valid.Save the changeNoYes Rules for Data IntegrityNo two records in a table can have the exact same values in all the columnsOnly valid data values can be insertedThe validity of data has to be maintained when data is modifiedWhen multiple tables are related through a common column, any changes to the data values in that column in one table should be appropriately reflected in the related tables Business rules Business rules are the policies and standard adhered to by an organization in running its operations.These rules ensure that the data entered in the database conforms to company standards.For example, a bank can specify the maximum amount of loan and the maximum duration for loan repayment based on a person’s education level, current annual income and age Enforcing Data IntegrityCan be enforced by subjecting the data to various checks and constraints at the time of inserting, updating and deleting data.These are:–Constraints–Default Values–Rules–Triggers Types of Data IntegrityData integrityEntity Integrity(toàn vẹn thực thể)Domain integrity(toàn vẹn miền)ReferentialIntegrity(toàn vẹn tham chiếu)User-definedIntegrity(toàn vẹn do ng dùng định nghĩa) Entity IntegrityA table in a database represents an entity where as each record within the table represents an instance of that entityEntity integrity is ensued using:–PRIMARY KEY constraint–UNIQUE constraint–Indexes–IDENTITY property Domain integrityA domain defines a logical set of values that make up the valid values in a columnDomain integrity is maintained using:–FOREIGN KEY constraint–CHECK constraints–DEFAULT definitions–NOT NULL definitions–Data types–Rules 123doc.vn

Ngày đăng: 12/01/2013, 15:42

Xem thêm

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN