انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

Relational Set Operators

الكلية كلية تكنولوجيا المعلومات     القسم قسم شبكات المعلومات     المرحلة 2
أستاذ المادة انوار جعفر موسى جعفر       14/11/2012 09:16:26
INTEGRITY RULES
Relational database integrity rules are very important to good database design. Many (but by no means all) RDBMS enforce integrity rules automatically. Those rules are:

1- ENTITY INTEGRITY

All primary key entries are unique, and no part of primary key may be null. Each row will have a unique identity, and foreign key values can properly reference primary key values, for example... No invoice can have a duplicate number, nor can it be null. In short, all invoices are uniquely identified by their invoice number.

2- REFERENTIAL INTEGRITY

A foreign key may have either a null entry, as long as it is not a part
of its table s primary key, or an entry that matches the primary key
value in a table to which it is related.(every non –null foreign key
value must reference an existing primary key value).It is possible for
an attribute not to have corresponding value, but it will be impossible
to have an invalid entry. for example, A Customer might not yet have
an assigned sales representative(number),but it will be impossible to
have an invalid sales representative(number).as in figure below:


To avoid nulls, some designers use special codes, known as flags, to
indicate the absence of some value.



Other integrity rules that can be enforced in the relational model are the NOT NULL and UNIQUE constraints. The NOT NULL constrain can be placed on a column to ensure that every row in the table has a value for that column the UNIQUE constraint is a restriction placed on a column to ensure that no duplicate values exist for that column.

Relational set operators
The data in relational tables are of limited value unless can be manipulated to generate useful information. This section describes the basic data manipulation capabilities of the relational model. Relational algebra defines the theoretical way of manipulating table contents using the following operators:

1. UNION
Combines all rows from tow tables, excluding duplicate rows.
The tables must have the same attribute characteristics (the columns
and domains must be identical) to be used in UNION.


المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .