Vous êtes sur la page 1sur 7

Introduction to Relational Database Management System (RDBMS) Introduction Dr. E.

.F Codd was the founder of RDBMS He defined RDBMS is A Relational Model of Data for Large shard Data Banks RDBMS Terminology: Relation - Table Tuple Row, record Cardinality - Number of rows Attribute column, field Degree Number of columns Primary key unique identifier Domain set of legal values Relational Data Structure The smallest unit of data in the relational model is the individual data value Data value are assumed to be atomic e, no internal structure. A domain is a set of all possible data values

Do ma I n s

Consultancy Production, Maintenance Operations, Ec

EMP_NO E09898 E19765 E20193 E21989 E25678

NAME Alexis Leon Richard Bode James Smith Thomas John David Jacob

AGE 31 40 55 44 35

DEPARTMENT Consultancy Production Consultancy Operations Maintenance

R eI Cardinality a t i Tuples o n

Attributes Degree

The number of attributes in a relation is called the degree of the relation. A relation of degree one is unary, a relation of degree two is called binary etc. The number of tuples (or) row in a relation is called Cardinality of the relation Relational Data integrity Most of the relations have on attribute which are uniquely identify each tuple in the relation. In some cases, there are more than one attribute which can uniquely identified each tuple in the relation . This attribute is called as Candidate key ie,

Example Element table Symbol A1 Fe Ni Name Aluminum Iron Nickel Atomic no. 13 26 28 Melting pt 933 1811 1728 Boiling pt 2792 3134 3186

In this Element table there are 3 candidate keys such that symbol Name and Atomic no. Every relation has at least one candidate key. In case of base relation one candidate key is designated as Primary key and remainiry keys are called alternate keys. Foreign key is an attribute (or) attribute combination of are relation whose values are required to match those of the primary key of some other relation (table). Shipment table Item A1 Fe Au Quantity 100 500 5 Destination Delhi Delhi Delhi

Item of the shipment table matches the symbol of the Element table. Therefore item is the foreign key Constraints for Relational Model. Relational data model includes several types of constraints to maintain accuracy and integrity of the data in the database. The major integrity constraints: Domain constraints Entity integrity Referential integrity Operational constraints.

i) Domain constraints: - A domain is a set of values that may be assigned to an attribute.

- A domain definition usually consists of following Components: Domain name Meaning Data type Size (or) length Allowable values (or) Allowable range.
[[

ii) Entity integrity: Entity integrity rule is designed to assure that every relation has primary key and the value of primary key is valid. Entity integrity guarantees that every primary key attribute is non-null. iii) Referential integrity: It is a rule that maintains consistency among rows of two tables. The rule states that the foreign key in one relation, either each foreign key value must match a primary key value in other table (or) foreign key value must be null. iv) Operational Constraints: These are the constraints enforced in the database by the business rules (or) real world limitations. And : Age should be less than (or) equal to 60.

CODDs Rules

Relational database is the finite collection of relations and relation in terms of domains, attribute, associations and tuples. Dr. E.F. Codd, places relational models characteristics in three broad categories. 1. Structural features that support the view of the data. They include relations and their undergoing components, 2. Integrity features such as entity and referential integrity and also application specific constraints. 3. Data manipulation features for data retrieval, insertion, deletion and update. Codd provides a set of 12 rules which quality a database product as relation. 1. Information rule: All information in a relational database include table names, column names is represent by values in tables. This view of data speeds design and learning process. Action can be taken when the constraints are violated. Access of data can be restricted. 2. Guaranteed Access rule: Every piece of data in a relational database can be accessed by using a combination of a table, a primary key valve that identifies the row and a column name, which identifies User productivity is improved since there is no need to resort to using physical pointers (or) address. It is possible to retrieve each individual piece of data stored in database by specifying the name of the table in which it is stored

the column and primary key which identifies the cell in which is stored. 3. Systematic Treatment of Nulls Rule: RDBMS handles records that have unknown (or) inapplicable valves in predefined fashion. Through the set of rules for handling nulls, user can distinguish results of the queries that involve nulls, zeros and blanks 4. Active on-line catalog Based on the relational model The description of the database of its contents are database tables, it can queried on-line via the data manipulation language. 5. Comprehensive Data sub-language rule: RBDMS have several languages. It allows the user to do the following, 6. View updating rule: Any view that can be updated theoretically can be updated using the RDBMS. Data consistency is ensured since the changes made in the view is transmitted to the base table and Vice-versa. 7. High-level insert, update and delete: RDBMS supports insertion, updating and deletion of a table level. The performance is improved since the commands act on a set of records rather than on one record at a time. define tables and views query and update set integrity constraints set authorizations. Define transactions.

8. Physical Data independence: The execution of ad hoc request and application programs is not affected by changes in the physical data access and storage methods. Data base administers can make changes to physical access and storage methods which improve the performance. 9. Logical data independence: Logical data changes in tables and views such as adding / deleting columns or changing field need not necessitate modification in the program or format of adhoc repast. 10. Integrity independence: Like table and view, integrity constraints are stored in on line catalog and therefore changed without changes in the application programs. 11. Distribution independence: Application programs and adhoc request are not affected by changes in the distribution of physical date. This improves reliability. 12. Non-subversion rule: If the RDBMS has a language that accesses the information of a record at-time, this language should not be used to bypass the integrity constraints. This is necessary for date integrity.

Vous aimerez peut-être aussi