Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan Lecture-03 Introduction –Data Models Lectured by, Jesmin Akhter.

Slides:



Advertisements
Similar presentations
Weak Entity Sets An entity set that does not have a primary key is referred to as a weak entity set. The existence of a weak entity set depends on the.
Advertisements

Text-Book Chapters (7 and 8) Entity-Relationship Model
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Adapted from: ©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Fly-over Introduction Purpose of Database Systems View of Data Data.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
Data Definition Language (DDL) Specification notation for defining the database schema –E.g. create table account ( account-number char(10), balance integer)
DATABASE SYSTEM CONCEPTS
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction n Why Database Systems? n Data Models n Data Definition Language.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Database Management Systems Purpose of Database Systems View of Data.
Chapter 2: Entity-Relationship Model (Continued)
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Reduction of an E-R Schema to Tables A database which conforms to an E-R diagram can be represented.
Dr. Kalpakis CMSC 461, Database Management Systems Introduction.
Introduction to DBMS Purpose of Database Systems View of Data
CS462: Introduction to Database Systems. ©Silberschatz, Korth and Sudarshan1.2Database System Concepts Course Information Instructor  Kyoung-Don (KD)
Database System Concepts, 5th Ed. Chapter 6: Entity-Relationship Model.
Temple University – CIS Dept. CIS616– Principles of Database Systems V. Megalooikonomou Introduction (based on notes by Silberchatz,Korth, and Sudarshan)
ADVANCED DATABASES WITH ORACLE 11g FOR ADDB7311 LEARNING UNIT 1 of 7.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Lecture 6: Introduction to Database Management Systems Lecturer: Prof. Kazimierz Subieta.
Introduction to Databases
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 6: Entity-Relationship.
Chapter 3: Relational Model I Structure of Relational Databases Structure of Relational Databases Convert a ER Design to a Relational Database Convert.
Chapter 1 : Introduction §Purpose of Database Systems §View of Data §Data Models §Data Definition Language §Data Manipulation Language §Transaction Management.
Chapter 3: Relational Model  Structure of Relational Databases  Normal forms (chap. 7)  Reduction of an E-R Schema to Relational (Sect. 2.9)  Relational.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts COMP319: Introduction Course Structure Course Assessment Review: DBMS Structure Review: Terminology.
©Silberschatz, Korth and Sudarshan4.1Database System Concepts Database system,CSE-313, P.B. Dr. M. A. Kashem Associate. Professor. CSE, DUET, Gazipur.
Chapter 7 Database Design and The E–R Model. 2 Goals n Facilitate DB design and represent the overall logical structure of the DB. n Definition Entities.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 6: Entity-Relationship.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan Chapter 6: Entity-Relationship Model.
EXAMPLE. Subclasses and Superclasses Entity type may have sub-grouping that need to be represented explicitly. –Example: Employee may grouped into.
1 Session 2 Welcome: The seventh learning sequence “ Reduction of an EER schema to tables“ Recap : In the previous learning sequence, we discussed the.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts DB Schema Design: the Entity-Relationship Model What’s the use of the E-R model? Entity Sets.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Chapter 2 : Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model ([S] Chp. 6) Entity Sets Relationship Sets Design Issues.
ICOM 5016 – Introduction to Database Systems Lecture 9 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan Lecture-03 Introduction –Data Models Lectured by, Jesmin Akhter.
ICOM 5016 – Introduction to Database Systems Lecture 5 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Computing & Information Sciences Kansas State University Friday, 26 Sep 2008CIS 560: Database System Concepts Lecture 13 of 42 Friday, 26 September 2008.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Mr.Prasad Sawant, MIT Pune India Introduction to DBMS.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
CS157A Lecture 4 ER Model 2 Prof. Sin-Min Lee Department of Computer Science San Jose State University.
C HAPTER 1: I NTRODUCTION Purpose of Database Systems View of Data Data Models Data Definition Language Data Manipulation Language Transaction Management.
Chapter 1: Introduction
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
©Silberschatz, Korth and Sudarshan7.1Database System Concepts - 6 th Edition Chapter 7: Entity-Relationship Model.
Database System Concepts Introduction Purpose of Database Systems View of Data Data Models Data Definition Language Data Manipulation Language Transaction.
Databases Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
©Silberschatz, Korth and Sudarshan 1.1 Database System Concepts قواعد البيانات Data Base قواعد البيانات CCS 402 Mr. Nedal hayajneh E- mail
CHAPTER 1: INTRODUCTION Purpose of Database Systems View of Data Data Models Data Definition Language Data Manipulation Language Storage Management Database.
Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of an.
Database System Concepts ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 6: Entity-Relationship.
Introduction to DBMS Purpose of Database Systems View of Data
Unit 1: INTRODUCTION Database system, Characteristics Database Users
Chapter 1: Introduction
Entity-Relationship Model
Introduction to Database Systems
Session 2 Welcome: The seventh learning sequence
Introduction to DBMS Purpose of Database Systems View of Data
Chapter 6: Entity-Relationship Model
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Presentation transcript:

Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan Lecture-03 Introduction –Data Models Lectured by, Jesmin Akhter

©Silberschatz, Korth and SudarshanSlide 2Database System Concepts - 6 th Edition Application Architectures/Database access from application programs  Two-tier architecture: E.g. client programs using ODBC/JDBC (Open Database connectivity)/ (Java Database connectivity) to communicate with a database. ODBC is a commonly used application interface standard for using with the C Language and JDBC for Java language.  Three-tier architecture: E.g. web-based applications, and applications built using “middleware”. Middleware is a Program that controls data transfer between clients and servers in order to provide a consistent environment, particularly for Online Transaction Processing (OLTP).

©Silberschatz, Korth and SudarshanSlide 3Database System Concepts - 6 th Edition Database Users Users are differentiated by the way they expect to interact with the system Application programmers – are computer professionals that write application program. He develops user interface using RAD(Rapid Application Development)and interact with system through DML calls. Sophisticated users – form requests in a database query language. Specialized users – write specialized database applications that do not fit into the traditional data processing framework such as computer aided-design systems, Knowledge base and expert system and store data with complex data types. Naïve users – invoke one of the permanent application programs that have been written previously E.g. people accessing database over the web, bank tellers, clerical staff

©Silberschatz, Korth and SudarshanSlide 4Database System Concepts - 6 th Edition Database Administrator Has central control over the system. Coordinates all the activities of the database system; the database administrator has a good understanding of the enterprise’s information resources and needs. Database administrator's duties include: Schema definition Storage structure and access method definition Schema and physical organization modification Granting user authority to access the database Specifying integrity constraints Acting as liaison with users Monitoring performance and responding to changes in requirements

©Silberschatz, Korth and SudarshanSlide 5Database System Concepts - 6 th Edition Transaction Management A transaction is a collection of operations that performs a single logical function in a database application Transaction-management component ensures that the database remains in a consistent (correct) state despite system failures (e.g., power failures and operating system crashes) and transaction failures. Concurrency-control manager controls the interaction among the concurrent transactions, to ensure the consistency of the database.

©Silberschatz, Korth and SudarshanSlide 6Database System Concepts - 6 th Edition Storage Management Storage manager is a program module that provides the interface between the low-level data stored in the database and the application programs and queries submitted to the system. The storage manager is responsible to the following tasks: interaction with the file manager efficient storing, retrieving and updating of data

©Silberschatz, Korth and SudarshanSlide 7Database System Concepts - 6 th Edition Overall System Structure

©Silberschatz, Korth and SudarshanSlide 8Database System Concepts - 6 th Edition The query processor

©Silberschatz, Korth and SudarshanSlide 9Database System Concepts - 6 th Edition Keys A super key of an entity set is a set of one or more attributes whose values uniquely determine each entity. A candidate key of an entity set is a minimal super key Customer-id is candidate key of customer account-number is candidate key of account primary key Although several candidate keys may exist, one of the candidate keys is selected to be the primary key. Attributes values are never or rarely changed.

©Silberschatz, Korth and SudarshanSlide 10Database System Concepts - 6 th Edition E-R Diagram with a Ternary Relationship

©Silberschatz, Korth and SudarshanSlide 11Database System Concepts - 6 th Edition Weak Entity Sets An entity set that does not have a primary key is referred to as a weak entity set. The existence of a weak entity set depends on the existence of a identifying entity set it must relate to the identifying entity set via a total, one-to- many relationship set from the identifying to the weak entity set Identifying relationship depicted using a double diamond The discriminator (or partial key) of a weak entity set is the set of attributes that distinguishes among all the entities of a weak entity set. The primary key of a weak entity set is formed by the primary key of the strong entity set on which the weak entity set is existence dependent, plus the weak entity set’s discriminator.

©Silberschatz, Korth and SudarshanSlide 12Database System Concepts - 6 th Edition Weak Entity Sets (Cont.) We depict a weak entity set by double rectangles. We underline the discriminator of a weak entity set with a dashed line. payment-number – discriminator of the payment entity set Primary key for payment – (loan-number, payment-number)

©Silberschatz, Korth and SudarshanSlide 13Database System Concepts - 6 th Edition Weak Entity Sets (Cont.) Note: the primary key of the strong entity set is not explicitly stored with the weak entity set, since it is implicit in the identifying relationship. If loan-number were explicitly stored, payment could be made a strong entity, but then the relationship between payment and loan would be duplicated by an implicit relationship defined by the attribute loan- number common to payment and loan

©Silberschatz, Korth and SudarshanSlide 14Database System Concepts - 6 th Edition Summary of Symbols Used in E-R Notation

©Silberschatz, Korth and SudarshanSlide 15Database System Concepts - 6 th Edition Summary of Symbols (Cont.)

©Silberschatz, Korth and SudarshanSlide 16Database System Concepts - 6 th Edition Alternative E-R Notations

©Silberschatz, Korth and SudarshanSlide 17Database System Concepts - 6 th Edition Reduction of an E-R Schema to Tables Primary keys allow entity sets and relationship sets to be expressed uniformly as tables which represent the contents of the database. A database which conforms to an E-R diagram can be represented by a collection of tables. For each entity set and relationship set there is a unique table which is assigned the name of the corresponding entity set or relationship set. Each table has a number of columns (generally corresponding to attributes), which have unique names. Converting an E-R diagram to a table format is the basis for deriving a relational database design from an E-R diagram.

©Silberschatz, Korth and SudarshanSlide 18Database System Concepts - 6 th Edition Representing Entity Sets as Tables A strong entity set reduces to a table with the same attributes.

©Silberschatz, Korth and SudarshanSlide 19Database System Concepts - 6 th Edition Composite and Multivalued Attributes Composite attributes are flattened out by creating a separate attribute for each component attribute E.g. given entity set customer with composite attribute name with component attributes first-name and last-name the table corresponding to the entity set has two attributes name.first-name and name.last-name A multivalued attribute M of an entity E is represented by a separate table EM Table EM has attributes corresponding to the primary key of E and an attribute corresponding to multivalued attribute M E.g. Multivalued attribute dependent-names of employee is represented by a table employee-dependent-names( employee-id, dname) Each value of the multivalued attribute maps to a separate row of the table EM  E.g., an employee entity with primary key John and dependents Johnson and Johndotir maps to two rows: (John, Johnson) and (John, Johndotir)

©Silberschatz, Korth and SudarshanSlide 20Database System Concepts - 6 th Edition Representing Weak Entity Sets A weak entity set becomes a table that includes a column for the primary key of the identifying strong entity set

©Silberschatz, Korth and SudarshanSlide 21Database System Concepts - 6 th Edition Representing Relationship Sets as Tables A many-to-many relationship set is represented as a table with columns for the primary keys of the two participating entity sets, and any descriptive attributes of the relationship set. E.g.: table for relationship set borrower

©Silberschatz, Korth and SudarshanSlide 22Database System Concepts - 6 th Edition E-R Diagram for Exercise 2.10

©Silberschatz, Korth and SudarshanSlide 23Database System Concepts - 6 th Edition Thank You