Course Hero Logo

Lec_5 (1).pptx - National University of Modern Languages...

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 - 7 out of 29 pages.

National University of ModernLanguagesDatabase Management SystemsLecture No. 5
Lecture# 5Database Management System
Relational Model and QueryLanguageThe relational data model represents data in the form of tables.The relational data model consists of the following three components.Data structureData are organized in the form of tables, with rows andcolumns.Data manipulationPowerful operations (typically implemented using theSQL language) are used to manipulate data stored in the relations.Data integrityThe model includes mechanisms to specify business rulesthat maintain the integrity of data when they are manipulated.
Primary Key VS Foreign KeyPrimary keyAn attribute or a combination of attributes that uniquely identifieseach row in a relation.EMPLOYEE1(EmpID, Name, DeptName, Salary)Foreign keyAn attribute in a relation that serves as the primary key of anotherrelation in the same database.
Relational Data ModelThe relational data model includes several types of constraints, orrules limiting acceptable values and actions, whose purpose is tofacilitate maintaining the accuracy and integrity of data in thedatabase.The major types of integrity constraints aredomain constraints,entity integrity,and referential integrity.
Domain and Entity IntegrityDomain ConstraintsAll of the values that appear in a column of a relation must be from the same domain.Domain definition usually consists of the following components: domain name, meaning, datatype, size (or length), and allowable values or allowable rangeEntity IntegrityThe entity integrity rule is designed to ensure that every relation has a primary key and thatthe data values for that primary key are all valid.

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 29 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
fa
Tags
entity integrity

Newly uploaded documents

Show More

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture