2. Database Management System(DBMS)D.Balaganesh LINCOLN UNIVERSITYCOLLGE2 Collection of interrelated data Set of programs to access the data DBMS contains information about a particularenterprise DBMS provides an environment that is bothconvenient and efficient to use. Database Applications: Banking: all transactions Airlines: reservations, schedules Universities: registration, grades Sales: customers, products, purchases Manufacturing: production, inventory, orders, supplychain Human resources: employee records, salaries, taxdeductions Databases touch all aspects of our lives
3. Purpose of Database SystemD.Balaganesh LINCOLN UNIVERSITYCOLLGE3 In the early days, database applications werebuilt on top of file systems Drawbacks of using file systems to store data: Data redundancy and inconsistency Multiple file formats, duplication of information in differentfiles Difficulty in accessing data Need to write a new program to carry out each new task Data isolation — multiple files and formats Integrity problems Integrity constraints (e.g. account balance > 0) becomepart of program code Hard to add new constraints or change existing ones
4. Purpose of Database Systems (Cont.)D.Balaganesh LINCOLN UNIVERSITYCOLLGE4 Drawbacks of using file systems (cont.) Atomicity of updates Failures may leave database in an inconsistent state withpartial updates carried out E.g. transfer of funds from one account to another shouldeither complete or not happen at all Concurrent access by multiple users Concurrent accessed needed for performance Uncontrolled concurrent accesses can lead to inconsistencies E.g. two people reading a balance and updating it at thesame time Security problems Database systems offer solutions to all the aboveproblems
6. Three-Level Architecture6 External Level Users’ view of the database. Describes that part of database that is relevant to aparticular user. Conceptual Level Community view of the database. Describes what data is stored in database andrelationships among the data.
7. Three-Level Architecture7 Internal Level Physical representation of the database on thecomputer. Describes how the data is stored in the database.
8. Data Independence8 Logical Data Independence Refers to immunity of external schemas to changes inconceptual schema. Conceptual schema changes (e.g. addition/removal ofentities). Should not require changes to external schema orrewrites of application programs.
9. Data Independence9 Physical Data Independence Refers to immunity of conceptual schema to changes inthe internal schema. Internal schema changes (e.g. using different fileorganizations, storage structures/devices). Should not require change to conceptual or externalschemas.
10. Data Independence and the Three-Level Architecture10© Pearson Education Limited 1995, 2005
11. Database Languages11 Data Definition Language (DDL) Allows the DBA or user to describe and name entities,attributes, and relationships required for theapplication plus any associated integrity and security constraints.© Pearson Education Limited 1995, 2005
12. Database Languages12 Data Manipulation Language (DML) Provides basic data manipulation operations on dataheld in the database. Procedural DML allows user to tell system exactly how to manipulatedata.TCL transmission Control Language
13. Entity-Relationship ModelD.Balaganesh LINCOLN UNIVERSITYCOLLGE13Example of schema in the entity-relationshipmodel
14.  An ER model is an abstract way to describe adatabase. Describing a database usually startswith a relational database, which stores data intables. Some of the data in these tables point todata in other tables - for instance, your entry inthe database could point to several entries foreach of the phone numbers that are yours. TheER model would say that you are an entity, andeach phone number is an entity, and therelationship between you and the phone numbersis has a phone number. Diagrams created todesign these entities and relationships are calledentity–relationship diagrams or ER diagrams