Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.

Slides:



Advertisements
Similar presentations
Banking Business Scenario
Advertisements

ER Model For a college DB
ER Modeling Case Studies
Exercise 1 Consider the ER diagram below. Assume that an employee may work in up to two departments or may not be assigned to any department. Assume that.
Entity-Relationship Modeling (ER-M)
ER Modeling Case Studies
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 102 Computer Programming II (Lab:
Entity-Relationship Models
1 The Entity-Relationship Model Chapter 2. 2 Exercise  What can you say about policy of the bank from the ER diagram?  What can you say about the policy.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Dept. of Computer & Information Sciences
CS370 Spring 2007 CS 370 Database Systems Lecture 6 Introduction to Database Design.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.
E/R Exercises – Part I April 16, 2017.
Conceptual Models Agenda - Steps in the design of a DB - Need for conceptual models - The Entity-Relationship Model (ER-Model)
Jyh-haw Yeh Dept. of Computer Science Boise State University
1 Database Design Victor Matos. 2 Phases of Database Design u Conceptual design begins with the collection of requirements and results needed from the.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
The (min,max) notation (1,1) (0,1) (1,N) (1,1). SUMMARY OF ER-DIAGRAM NOTATION FOR ER SCHEMAS Meaning ENTITY TYPE WEAK ENTITY TYPE RELATIONSHIP TYPE IDENTIFYING.
Database Design Concepts Lecture 7 Introduction to E:R Modelling Identifying Entities.
Case study Lisa’s Bookstore IST210.
Entity Relationship Model Chapter 6. Basic Elements of E-R Model Entity Object of the real world that stores data. Eg. Customer, State, Project, Supplier,
ER Modeling Case Studies
Data Modeling Using the Entity-Relationship Model
the Entity-Relationship Model
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.
Practice of ER modeling
Instructor :Huda Al-Omair
Introduction to Database Systems
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 102 Computer Programming II (Lab:
Assignements. CSC343: Intro. to Databases2 Exercise 1 Superkeys: Candidate keys: Primary key:
Dept. of Computer & Information Sciences
Lecture 7 of Advanced Databases
Database Design 3: Advanced Data Modeling Concepts CS 320.
Data modeling using the entity-relationship model Chapter 3 Objectives How entities, tuples, attributes and relationships among entities are represented.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.
Tutorial 5 CS 340.
Weak Entity Sets A weak entity is an entity that cannot exist in a database unless another type of entity also exists in that database. Weak entity meets.
Data Modelling Using Entity-Relationship (ER) Model
Keys for Relationship Sets The combination of primary keys of the participating entity sets forms a super key of a relationship set. – (customer-id, account-number)
1 The Entity- Relationship Model Instructor: Mohamed Eltabakh
Introduction to Database Systems
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.
Introduction to Database Systems
COMP 430 Intro. to Database Systems Entity-Relationship Diagram Basics Slides use ideas from Chris Ré.
1 Database Systems ( 資料庫系統 ) 9/23/2009 Lecture #2.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.
1 CS 430 Database Theory Winter 2005 Lecture 3: A Fifty Minute Introduction to Data Modeling.
MIS 3053 Database Design & Applications The University of Tulsa Professor: Akhilesh Bajaj ER Model Lecture 3 © Akhilesh Bajaj, 2000, 2002, All Rights.
Entity Relationship Diagram ERD. Background Peter Chen developed ERDs in Charles Bachman and James Martin have added some slight refinements to.
DATA SCIENCE MIS0855 | Spring 2016 Designing Data
DATA MODELING AND ENTITY-RELATIONSHIP MODEL II IST 210: Organization of Data IST210 1.
1 What is a Database Management System? Lecture slides by Dr. Sara Cohen Spring 2008.
The Entity-Relationship Model
Dept. of Computer & Information Sciences
Entity-Relationship Model
E-R Diagram (Cont.) Draw ER Diagram for the following scenario:
Assignment 1 Question 1 ER Diagram Never Stand Still
Dept. of Computer & Information Sciences
Database EER.
ER Modeling Case Studies
ER Models ISSUES and Examples CS263 Lecture 9
Database Systems (資料庫系統)
Practice of ER modeling
Question 01 A company database needs to store information about employees (identified by NIC, with salary and phone as attributes), departments (identified.
CS4222 Principles of Database System
ER Modeling Case Studies
ER Modeling Case Studies
Entity Relation Model Tingting Zhang.
Presentation transcript:

Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems (Chapter 3 Practice Exercises)

Chapter 3 Tutorial5 Exercise 4 Identify the entities and relationships for the following description and draw an ER diagram. A library system contains libraries, books, authors and patrons, with identifying attributes library Number, book number, author number, and patron number, respectively. Libraries are further described by a library name and location, books by title and page count, authors by author name, and patrons by patron name and patron weight. Libraries hold numerous books (some with multiple copies), each authored by one or more authors. Patrons borrow books, but at any point in time, may not have anything checked out. When they do have a book checked out, there is a due date associated with it.

Chapter 3 Tutorial6 Exercise 4 (solution) LIBRARYBOOK HOLDS CHECK -OUT LibNo Location LibNameBookNoTitle PageCount PATRON PatronName AUTHOR AuthorName AuthorNo PatronNoPatronWeight WRITTEN_BY 1N N 1 M N DueDate

Chapter 3 Tutorial7 Exercise 5 A loan company wants to design a database to track student loans. Each student attending school is eligible for a loan. A student may have more than one loan. A student may be registered, possibly at different times, in more than one school. Each loan should belong to only one bank. Each bank can approve as many loans as it desires. For each loan, the loan company will track: the student’s SSN, name, address, amount of loan, date of loan, interest rate ( which may be different for each loan as determined by the bank), duration of loan, monthly payment, remaining balance, school ID, school name and address, number of years the student has been at the school, bank name, bank branch and bank ID. Draw an ER diagram. State any assumptions you make in the diagram.

Chapter 3 Tutorial8 Exercise 5 (solution) STUDENTLOAN BORROWS APPROVED_BY SSNSNameLoanId Payment BANK BankName SCHOOL SchoolId 1N N 1 SAddress ATTENDS M N SchoolAddress SchoolName BankIdBankBranch DateAmount Duration Interest Balance Assumption: each loan to a student (for different schools) is given a unique LoanId number. NoOfYears

Chapter 3 Practice Exercises16 Exercise 6 Consider the following information about a university database: Professors have a SSN, a name, an age, a rank, and a research specialty. Projects have a project number, a sponsor name (e.g. NFS), a starting date, an ending date, and a budget. Graduate students have a SSN, a name, an age, and a degree program (e.g., M.S. or Ph.D.). Each project is managed by one professor (known as the project's principal investigator). Each project is worked on by one or more professors (known as the project's co-investigators). Professors can manage and/or work on multiple projects.

Chapter 3 Practice Exercises17 Exercise 6 Each project is worked on by one or more graduate students (known as the project's research assistants). When graduate students work on a project, a professor must supervise their work on the project. Graduate students can work on multiple projects, in which case they will have a (potentially different) supervisor for each one. Departments have a department number, a department name, and a main office. Departments have a professor (known as the chairman) who runs the department. Professors work in one or more departments, and for each department that they work in, a time percentage is associated with their job.

Chapter 3 Practice Exercises18 Exercise 6 Graduate students have one major department in which they are working on their degree. Each graduate student has another, more senior graduate student (known as a student advisor) who advises him or her on what courses to take. Draw an ER diagram that captures the information about the university.

Chapter 3 Practice Exercises19 Exercise 6 (solution) PROFESSORPROJECT MANAGES WORKS -ON2 GRAD_STUDENT DEPARTMENT SSN SUPERVISES 1N M N N 1 SSNAgePNameRank Specialty WORKS_ON M PNoSDate Sponsor EDate Budget SName Age Degree ADVISES 1 N senior Graduate MAJOR N DNo DName Office WORKS_INRUNS 1 1 M NTime 1 M N