6.9 List the names and addresses of all guests in London, alphabetically ordered by name.

Size: px
Start display at page:

Download "6.9 List the names and addresses of all guests in London, alphabetically ordered by name."

Transcription

1 ADDITIONAL EXERCISES FOR DATABASE SQL 6.7 List full details of all hotels. SELECT * FROM Hotel; 6.8 List full details of all hotels in London. SELECT * FROM Hotel WHERE city = London ; 6.9 List the names and addresses of all guests in London, alphabetically ordered by name. SELECT guestname, guestaddress FROM Guest WHERE address LIKE %London% ORDER BY guestname; Strictly speaking, this would also find rows with an address like: 10 London Avenue, New York List all double or family rooms with a price below per night, in ascending order of price. SELECT * FROM Room WHERE price < 40 AND type IN ( D, F ) ORDER BY price; (Note, ASC is the default setting) List the bookings for which no dateto has been specified. SELECT * FROM Booking WHERE dateto IS NULL; 6.12 How many hotels are there? SELECT COUNT(*) FROM Hotel; 6.13 What is the average price of a room? SELECT AVG(price) FROM Room; 6.14 What is the total revenue per night from all double rooms? SELECT SUM(price) FROM Room WHERE type = D ; 6.15 How many different guests have made bookings for August? SELECT COUNT(DISTINCT guestno) FROM Booking WHERE (datefrom <= DATE AND dateto >= DATE ) OR (datefrom >= DATE AND datefrom <= DATE );

2 6.22 List the number of rooms in each hotel. SELECT hotelno, COUNT(roomNo) AS count FROM Room GROUP BY hotelno; 6.23 List the number of rooms in each hotel in London. SELECT hotelno, COUNT(roomNo) AS count FROM Room r, Hotel h WHERE r.hotelno = h.hotelno AND city = London GROUP BY hotelno; 6.28 Update the price of all rooms by 5%. UPDATE Room SET price = price*1.05; 2. Answer below questions based on schema in the exercises at the end of chapter 5. List all borrower details. SELECT * FROM Borrower; List all book titles published in the year SELECT title FROM Book WHERE year = 2012 ; List all copies of book titles that are available for borrowing. SELECT copyno, title FROM BookCopy bc, Book b WHERE bc.isbn = b.isbn AND bc.available = Y ; List all copies of the book title Lord of the Rings that are available for borrowing. SELECT copyno FROM BookCopy bc, Book b WHERE bc.isbn = b.isbn AND bc.available = Y AND title = Lord of the Rings ;

3 List the names of borrowers who currently have the book title Lord of the Rings on loan. SELECT borrowername FROM Borrower bw, Book b, BookCopy bc, BookLoan bl WHERE bw.borrowerno = bl.borrowerno AND bl.copyno = bc.copyno AND bc.isbn = b.isbn AND bc.available = N AND title = Lord of the Rings ; List the names of borrowers with overdue books. SELECT borrowername From Borrower bw, BookLoan bl WHERE bw.borrowerno = bl.borrowerno and datedue > today s date; How many copies of ISBN are there? SELECT COUNT(*) FROM BookCopy WHERE ISBN = ; How many copies of ISBN are currently available? SELECT COUNT(copyNo) FROM BookCopy WHERE available = Y AND ISBN = ; How many times has the book with ISBN been borrowed? SELECT COUNT(*) FROM BookCopy bc, BookLoan bl WHERE bc.copyno = bl.copyno AND ISBN = ; Produce a report of book titles that have been borrowed by Peter Bloomfield. SELECT DISTINCT title FROM Borrower bw, Book b, BookCopy bc, BookLoan bl WHERE bw.borrowerno = bl.borrowerno AND bl.copyno = bc.copyno AND bc.isbn = b.isbn AND borrowername = Peter Bloomfield ;

4 Entity Relationship Diagram 1. Use the following business rules to create a Crow s Foot ERD. Write all appropriate connectivities and cardinalities in the ERD. a. A department employs many employees, but each employee is employed by one department. b. Some employees, known as rovers, are not assigned to any department. c. A division operates many departments, but each department is operated by one division. d. An employee may be assigned many projects, and a project may have many employees assigned to it. e. A project must have at least one employee assigned to it. f. One of the employees manages each department, and each department is managed by only one employee. g. One of the employees runs each division, and each division is run by only one employee.

5 2. The Jonesburgh County Basketball Conference (JCBC) is an amateur basketball association. Each city in the county has one team as its representative. Each team has a maximum of 12 players and a minimum of 9 players. Each team also has up to three coaches (offensive, defensive, and physical training coaches). During the season, each team plays two games (home and visitor) against each of the other teams. Given those conditions, do the following: a. Identify the connectivity of each relationship. b. Identify the type of dependency that exists between CITY and TEAM. c. Identify the cardinality between teams and players and between teams and city. d. Identify the dependency between coach and team and between team and player. e. Draw the Chen and Crow s Foot ERDs to represent the JCBC database. M M (1,1) GAME (1,1) (2,N) (2,N) CITY sponsors TEAM has (1,1) (1,1) (9,12) 1 (1,3) M (1,1) PLAYER is coached by M (1,1) COACH

6 3. Create an ERD based on the Crow s Foot model, using the following requirements: An INVOICE is written by a SALESREP. Each sales representative can write many invoices, but each invoice is written by a single sales representative. The INVOICE is written for a single CUSTOMER. However, each customer can have many invoices. An INVOICE can include many detail lines (LINE), each of which describes one product bought by the customer. The product information is stored in a PRODUCT entity. The product s vendor information is found in a VENDOR entity.

7 Normalization 1. (a) Identify the dependencies (b) Normalize the table

8 2. Using the description of the attributes given in below figure, convert the ERD shown into a dependency diagram and at least 3NF table.

9 4. Using the Invoice table structure below: (a) Write the relational schema, draw its dependency diagram and identify all dependencies, including all partial and transitive dependencies. You can assume that the table does not contain repeating groups and that any invoice number may reference more than one product. (Hint: This table uses a composite primary key.) (b) Normalize it to 2NF and 3NF

10

11

1 P a g e D a t a b a s e o l d p a p e r b y w a s i m

1 P a g e D a t a b a s e o l d p a p e r b y w a s i m 1 P a g e D a t a b a s e o l d p a p e r b y w a s i m Q#1. What is concurrency control? Ans: Concurrency control (CC) is a process to ensure that data is updated correctly andappropriately when multiple

More information

Objective. The goal is to review material covered in Chapters 1-5. Do the following questions from the book.

Objective. The goal is to review material covered in Chapters 1-5. Do the following questions from the book. CSCE 4523 Assignment 2 - Due Sunday, Feb. 19, 2017; 11:59pm on Blackboard This assignment may be done in pairs (undergrads only). Grad students must do the assignment individually. Objective The goal is

More information

Entity Relationship Modeling. From Rob and Coronel (2004), Database Systems: Design, Implementation, and Management

Entity Relationship Modeling. From Rob and Coronel (2004), Database Systems: Design, Implementation, and Management Entity Relationship Modeling Entity-Relationship Diagram (ERD) Components Entities: correspond to tables in the relational database Attributes: define the characteristics of entities Attributes have a

More information

Chapter 6. SQL: SubQueries

Chapter 6. SQL: SubQueries Chapter 6 SQL: SubQueries Pearson Education 2009 Definition A subquery contains one or more nested Select statements Example: List the staff who work in the branch at 163 Main St SELECT staffno, fname,

More information

Lecture 03. Fall 2017 Borough of Manhattan Community College

Lecture 03. Fall 2017 Borough of Manhattan Community College Lecture 03 Fall 2017 Borough of Manhattan Community College 1 2 Outline 1 Brief History of the Relational Model 2 Terminology 3 Integrity Constraints 4 Views 3 History of the Relational Model The Relational

More information

Lecture 03. Spring 2018 Borough of Manhattan Community College

Lecture 03. Spring 2018 Borough of Manhattan Community College Lecture 03 Spring 2018 Borough of Manhattan Community College 1 2 Outline 1. Brief History of the Relational Model 2. Terminology 3. Integrity Constraints 4. Views 3 History of the Relational Model The

More information

Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 7 Data Modeling with Entity Relationship Diagrams

Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 7 Data Modeling with Entity Relationship Diagrams Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition Chapter 7 Data Modeling with Entity Relationship Diagrams Objectives In this chapter, students will learn: The

More information

2.8.1 Practicals Question Bank Algebra Unit-I 1. Show that {1, 2, 3} under multiplication modulo 4 is not a group but that {1, 2, 3, 4} under multiplication modulo 5 is a group. 2. Let G be a group with

More information

SQL DDL. Intro SQL CREATE TABLE ALTER TABLE Data types Service-based database in Visual Studio Database in PHPMyAdmin

SQL DDL. Intro SQL CREATE TABLE ALTER TABLE Data types Service-based database in Visual Studio Database in PHPMyAdmin SQL DDL Intro SQL CREATE TABLE ALTER TABLE Data types Service-based database in Visual Studio Database in PHPMyAdmin Steen Jensen, autumn 2017 Languages Languages for relational DBMSs are: SQL QBE Structured

More information

SQL grouping, views & modifying data

SQL grouping, views & modifying data SQL grouping, views & modifying data Grouping (GROUP BY) Views INSERT UPDATE DELETE Steen Jensen, autumn 2017 SQL query - grouping Grouping makes it possible to show information listed in groups Conditions

More information

A l Ain University Of Science and Technology

A l Ain University Of Science and Technology A l Ain University Of Science and Technology 4 Handout(4) Database Management Principles and Applications The Entity Relationship (ER) Model http://alainauh.webs.com/ 1 In this chapter, you will learn:

More information

CS313D: ADVANCED PROGRAMMING LANGUAGE

CS313D: ADVANCED PROGRAMMING LANGUAGE CS313D: ADVANCED PROGRAMMING LANGUAGE Computer Science department Lecture 11: Connection to Databases Lecture Contents 2 What is a database? Relational databases Cases study: A Books Database Querying

More information

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE COMP 60711 Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE Data Engineering Date: Thursday 25th January 2018 Time: 09:45-11:45 Please answer ONE Question from Section A and ONE Question from

More information

Database Management Systems (Classroom Practice Booklet Solutions)

Database Management Systems (Classroom Practice Booklet Solutions) Database Management Systems (Classroom Practice Booklet Solutions) 2. ER and Relational Model 4 ssn cid 01. Ans: (b) Professor Teaches course 02. Ans: (c) Sol: Because each patient is admitted into one

More information

A l Ain University Of Science and Technology

A l Ain University Of Science and Technology A l Ain University Of Science and Technology 4 Handout(4) Database Management Principles and Applications The Entity Relationship (ER) Model http://alainauh.webs.com/ http://www.comp.nus.edu.sg/~lingt

More information

MIS2502: Data Analytics Relational Data Modeling - 1. JaeHwuen Jung

MIS2502: Data Analytics Relational Data Modeling - 1. JaeHwuen Jung MIS2502: Data Analytics Relational Data Modeling - 1 JaeHwuen Jung jaejung@temple.edu http://community.mis.temple.edu/jaejung Where we are Now we re here Data entry Transactional Database Data extraction

More information

Represent entities and relations with diagrams

Represent entities and relations with diagrams LEARNING OBJECTIVES Define data modeling terms Describe E-R Model Identify entities and relations Represent entities and relations with diagrams WHAT IS DATA MODELING? A data model is a collection of concepts

More information

CSC 261/461 Database Systems Lecture 8. Spring 2018

CSC 261/461 Database Systems Lecture 8. Spring 2018 CSC 261/461 Database Systems Lecture 8 Spring 2018 Announcement Quiz No New Problem Set Study Chapter 5, 6, and 7 Go through the problem set Announcement Project 2 Part 1 Already out. Workshop covered

More information

Database Systems. Answers

Database Systems. Answers Database Systems Question @ Answers Question 1 What are the most important directories in the MySQL installation? Bin Executable Data Database data Docs Database documentation Question 2 What is the primary

More information

0. Database Systems 1.1 Introduction to DBMS Information is one of the most valuable resources in this information age! How do we effectively and efficiently manage this information? - How does Wal-Mart

More information

Exam I Computer Science 420 Dr. St. John Lehman College City University of New York 12 March 2002

Exam I Computer Science 420 Dr. St. John Lehman College City University of New York 12 March 2002 Exam I Computer Science 420 Dr. St. John Lehman College City University of New York 12 March 2002 NAME (Printed) NAME (Signed) E-mail Exam Rules Show all your work. Your grade will be based on the work

More information

Database Systems. A Practical Approach to Design, Implementation, and Management. Database Systems. Thomas Connolly Carolyn Begg

Database Systems. A Practical Approach to Design, Implementation, and Management. Database Systems. Thomas Connolly Carolyn Begg Database Systems A Practical Approach to Design, Implementation, and Management For these Global Editions, the editorial team at Pearson has collaborated with educators across the world to address a wide

More information

Entity-Relationship Model

Entity-Relationship Model Entity-Relationship Model Data Models High-level or conceptual data models provide concepts that are close to the way many users perceive data, whereas low-level or physical data models provide concepts

More information

Relational Model (cont d) & Entity Relational Model. Lecture 2

Relational Model (cont d) & Entity Relational Model. Lecture 2 Relational Model (cont d) & Entity Relational Model Lecture 2 Relational Database Operators Relational algebra Defines theoretical way of manipulating table contents using relational operators: SELECT

More information

Chapter 2 Conceptual Modeling. Objectives

Chapter 2 Conceptual Modeling. Objectives Chapter 2 Conceptual Modeling Basic Entity Relationship Diagrams 1 Objectives Definition of terms Importance of data modeling Write good names and definitions for entities, relationships, and attributes

More information

Discussion Focus. Figure 1

Discussion Focus. Figure 1 Discussion Focus Efficient data management typically requires the use of computer database. A database is a shared, integrated computer structure that stores a collection of: End-user data that is the

More information

CSC 261/461 Database Systems Lecture 7

CSC 261/461 Database Systems Lecture 7 CSC 261/461 Database Systems Lecture 7 Spring 2018 Announcement Project 1 Milestone 1 is due Tonight Project 2 Part 1: will be out tonight! You should definitely go to workshops this week Workshop on Project

More information

IS 263 Database Concepts

IS 263 Database Concepts IS 263 Database Concepts Lecture 1: Database Design Instructor: Henry Kalisti 1 Department of Computer Science and Engineering The Entity-Relationship Model? 2 Introduction to Data Modeling Semantic data

More information

Entity Relationship Diagram (ERD): Basics

Entity Relationship Diagram (ERD): Basics Entity Relationship Diagram (ERD): Basics CIS 3730 Designing and Managing Data J.G. Zheng Fall 2010 Overview: 3 Level Database Design Creating an Entity Relationship Diagram (ERD) and associated data dictionary

More information

Normalization. Normal Forms. Normal Forms

Normalization. Normal Forms. Normal Forms Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities. 5- Normal Forms First Normal Form (NF) There are no attributes

More information

Chapter 1 SQL and Data

Chapter 1 SQL and Data Chapter 1 SQL and Data What is SQL? Structured Query Language An industry-standard language used to access & manipulate data stored in a relational database E. F. Codd, 1970 s IBM 2 What is Oracle? A relational

More information

CSC 261/461 Database Systems Lecture 8. Fall 2017

CSC 261/461 Database Systems Lecture 8. Fall 2017 CSC 261/461 Database Systems Lecture 8 Fall 2017 Announcement Project 2 is out. Not a group project! CSC 261, Spring 2017, UR Agenda More about ER model ER model to Relation (Table) CSC 261, Spring 2017,

More information

CSC 261/461 Database Systems Lecture 6. Spring 2017 MW 3:25 pm 4:40 pm January 18 May 3 Dewey 1101

CSC 261/461 Database Systems Lecture 6. Spring 2017 MW 3:25 pm 4:40 pm January 18 May 3 Dewey 1101 CSC 261/461 Database Systems Lecture 6 Spring 2017 MW 3:25 pm 4:40 pm January 18 May 3 Dewey 1101 CSC 261/461 Database Systems Lecture 6 Spring 2017 MW 3:25 pm 4:40 pm January 18 May 3 Dewey 1101 Announcement

More information

CS317 File and Database Systems

CS317 File and Database Systems CS317 File and Database Systems Lecture 4 Intro to SQL (Chapter 6 - DML, Chapter 7 - DDL) September 17, 2018 Sam Siewert Backup to PRClab1.erau.edu If PRClab1.erau.edu is down or slow Use SE Workstation

More information

More on the Chen Notation

More on the Chen Notation More on the Chen Notation Reference: http://www.vertabelo.com/blog/technical-articles/chen-erd-notation Peter Chen, who developed entity-relationship modeling and published his work in 1976, was one of

More information

PART III SOLUTIONS TO REVIEW QUESTIONS AND EXERCISES

PART III SOLUTIONS TO REVIEW QUESTIONS AND EXERCISES PART III SOLUTIONS TO REVIEW QUESTIONS AND EXERCISES Solutions to Review Questions and Exercises Part One Background 4 Chapter 1 Introduction to Databases... 4 Chapter 2 Database Environment... 6 Chapter

More information

UNIVERSITY OF BOLTON WESTERN INTERNATIONAL COLLEGE FZE BSC (HONS) COMPUTING SEMESTER ONE EXAMINATION 2015/2016 DATABASE THEORY AND PRACTICE

UNIVERSITY OF BOLTON WESTERN INTERNATIONAL COLLEGE FZE BSC (HONS) COMPUTING SEMESTER ONE EXAMINATION 2015/2016 DATABASE THEORY AND PRACTICE OCD52 UNIVERSITY OF BOLTON WESTERN INTERNATIONAL COLLEGE FZE BSC (HONS) COMPUTING SEMESTER ONE EXAMINATION 2015/2016 DATABASE THEORY AND PRACTICE MODULE NO: CPU5002 Date: Wednesday, 13 January 2016 Time:

More information

2011 DATABASE MANAGEMENT SYSTEM

2011 DATABASE MANAGEMENT SYSTEM Name :. Roll No. :..... Invigilator s Signature :.. CS/B.TECH(IT)/SEM-6/IT-604/2011 2011 DATABASE MANAGEMENT SYSTEM Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks.

More information

Database Technologies. Madalina CROITORU IUT Montpellier

Database Technologies. Madalina CROITORU IUT Montpellier Database Technologies Madalina CROITORU croitoru@lirmm.fr IUT Montpellier Part 2 RELATIONAL ALGEBRA Background notions I A database relation is a set. Sets can be refined: One can select a subset of elements

More information

Database Concepts and Applications

Database Concepts and Applications ,'.'. Page No... 1 MCA401 USN Fourth Semester M.C.ADegree Examination, July IAugust 2004 Master of Computer Applications (Old Scheme) Database Concepts and Applications Time: 3 hrs.] [Max.Marks : 100 Note:

More information

The entity is an object of interest to the end user. entity correspond to the table not to a row- in the relational environment.

The entity is an object of interest to the end user. entity correspond to the table not to a row- in the relational environment. THE ENTITY RELATIONSHIP MODEL(ERM)ENTITIES The entity is an object of interest to the end user. entity correspond to the table not to a row- in the relational environment. ATTRIBUTES Attributes are characteristics

More information

GUJARAT TECHNOLOGICAL UNIVERSITY

GUJARAT TECHNOLOGICAL UNIVERSITY Seat No.: Enrolment No. GUJARAT TECHNOLOGICAL UNIVERSITY BE - SEMESTER III (NEW) - EXAMINATION SUMMER 2017 Subject Code: 21303 Date: 02/06/2017 Subject Name: Database Management Systems Time: 10:30 AM

More information

ERD Getting Started Guide

ERD Getting Started Guide Enterprise Studio ERD Getting Started Guide 2017-09-21 Applies to: Enterprise Studio 3.0.0, Team Server 3.0.0 Table of contents 1 About modeling with ERD 4 1.1 What are entity-relationship diagrams? 4

More information

Data Modeling During System Analysis. Logical Data Model Stages. What is Conceptual Database Design? Gathering Information for Conceptual

Data Modeling During System Analysis. Logical Data Model Stages. What is Conceptual Database Design? Gathering Information for Conceptual Data Modeling Entity Relationship Diagram Lecture 16 CSC(291) [Software Engineering 1] Instructor: Saif-ur-Rehman Khan COMSATS Institute of Information Technology, Islamabad Data Modeling During System

More information

Who is the borrower whose id is 12345? σ borrower borrower_id = select * from borrower where borrower_id = '12345'

Who is the borrower whose id is 12345? σ borrower borrower_id = select * from borrower where borrower_id = '12345' Who is the borrower whose id is 12345? σ borrower borrower_id = 12345 select * from borrower where borrower_id = '12345' List the names of all borrowers π borrower last_name first_name select last_name,

More information

MIS2502: Data Analytics Relational Data Modeling. Jing Gong

MIS2502: Data Analytics Relational Data Modeling. Jing Gong MIS2502: Data Analytics Relational Data Modeling Jing Gong gong@temple.edu http://community.mis.temple.edu/gong Where we are Now we re here Data entry Transactional Database Data extraction Analytical

More information

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 4 Entity Relationship (ER) Modeling

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management Tenth Edition Chapter 4 Entity Relationship (ER) Modeling 4.1 The Entity Relationship Model (ERM) ER model forms the basis of an ER diagram ERD

More information

Database Systems. A Practical Approach to Design, Implementation, and Management. Database Systems. Thomas Connolly Carolyn Begg

Database Systems. A Practical Approach to Design, Implementation, and Management. Database Systems. Thomas Connolly Carolyn Begg Database Systems A Practical Approach to Design, Implementation, and Management For these Global Editions, the editorial team at Pearson has collaborated with educators across the world to address a wide

More information

Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity Sets Extended E-R Features Design of the Bank Database Reduction to

Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity Sets Extended E-R Features Design of the Bank Database Reduction to Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity Sets Extended E-R Features Design of the Bank Database Reduction to Relation Schemas Database Design UML A database can be modeled

More information

Logical Operators and aggregation

Logical Operators and aggregation SQL Logical Operators and aggregation Chapter 3.2 V3.0 Copyright @ Napier University Dr Gordon Russell Logical Operators Combining rules in a single WHERE clause would be useful AND and OR allow us to

More information

Name :. Roll No. :... Invigilator s Signature : DATABASE MANAGEMENT SYSTEM

Name :. Roll No. :... Invigilator s Signature : DATABASE MANAGEMENT SYSTEM Name :. Roll No. :..... Invigilator s Signature :.. CS/B.TECH(IT)/SEM-6/IT-604/2011 2011 DATABASE MANAGEMENT SYSTEM Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks.

More information

Midterm Exam #1 (Version B) CS 122A Spring 2018

Midterm Exam #1 (Version B) CS 122A Spring 2018 https://orangecounty.craigslist.org/d/housing/search/hhhname: SEAT NO.: STUDENT ID: Midterm Exam #1 (Version B) CS 122A Spring 2018 Max. Points: 100 (Please read the instructions carefully) Instructions:

More information

Entity Relationship Diagram (ERD) Dr. Moustafa Elazhary

Entity Relationship Diagram (ERD) Dr. Moustafa Elazhary Entity Relationship Diagram (ERD) Dr. Moustafa Elazhary Data Modeling Data modeling is a very vital as it is like creating a blueprint to build a house before the actual building takes place. It is built

More information

Practice 1 1: Instance or Entity

Practice 1 1: Instance or Entity Practice 1 1: Instance or Entity Practice 1 1: Instance or Entity Goal (See Page 47) The goal of this practice is to learn to make a distinction between an entity, an attribute, and an instance of an entity.

More information

Data Analysis 1. Chapter 2.1 V3.1. Napier University Dr Gordon Russell

Data Analysis 1. Chapter 2.1 V3.1. Napier University Dr Gordon Russell Data Analysis 1 Chapter 2.1 V3.1 Copyright @ Napier University Dr Gordon Russell Entity Relationship Modelling Overview Database Analysis Life Cycle Components of an Entity Relationship Diagram What is

More information

Database Management Systems

Database Management Systems Sample Questions 1 Write SQL query to create a table for describing a book. The table should have Book Title, Author, Publisher, Year published, and ISBN fields. Your table should have a primary key. For

More information

Entity-Relationship Modelling. Entities Attributes Relationships Mapping Cardinality Keys Reduction of an E-R Diagram to Tables

Entity-Relationship Modelling. Entities Attributes Relationships Mapping Cardinality Keys Reduction of an E-R Diagram to Tables Entity-Relationship Modelling Entities Attributes Relationships Mapping Cardinality Keys Reduction of an E-R Diagram to Tables 1 Entity Sets A enterprise can be modeled as a collection of: entities, and

More information

Entity Relationship Modelling

Entity Relationship Modelling Entity Relationship Modelling Overview Database Analysis Life Cycle Components of an Entity Relationship Diagram What is a relationship? Entities, attributes, and relationships in a system The degree of

More information

Detailed Data Modelling: Attribute Collection and Normalisation of Data

Detailed Data Modelling: Attribute Collection and Normalisation of Data Detailed Data Modelling IMS1002 /CSE1205 Systems Analysis and Design Detailed Data Modelling: Attribute Collection and Normalisation of Data The objective of detailed data modelling is to develop a detailed

More information

Database Management Systems (Solutions for Vol 1_Classroom Practice Questions)

Database Management Systems (Solutions for Vol 1_Classroom Practice Questions) Database Management Systems (Solutions for Vol 1_Classroom Practice Questions) 2. ER and Relational Model 01. Ans: (b) 07. Ans: 1 ssn cid Derived attribute is an attribute that derives its value from one

More information

Database Design and Administration for OnBase WorkView Solutions. Mike Martel Senior Project Manager

Database Design and Administration for OnBase WorkView Solutions. Mike Martel Senior Project Manager Database Design and Administration for OnBase WorkView Solutions Mike Martel Senior Project Manager 1. Solution Design vs. Database Design Agenda 2. Data Modeling/Design Concepts 3. ERD Diagramming Labs

More information

Relational Database Model. III. Introduction to the Relational Database Model. Relational Database Model. Relational Terminology.

Relational Database Model. III. Introduction to the Relational Database Model. Relational Database Model. Relational Terminology. III. Introduction to the Relational Database Model Relational Database Model In 1970, E. F. Codd published A Relational Model of Data for Large Shared Data Banks in CACM. In the early 1980s, commercially

More information

Comparison of ER Modeling Notations

Comparison of ER Modeling Notations The ER models used in this text are based on the Chen and Crow s Foot notations. However, you should be aware of other ER notations, including the Rein85 and the IDEFX. P review E A P P E N D I X Comparison

More information

8) A top-to-bottom relationship among the items in a database is established by a

8) A top-to-bottom relationship among the items in a database is established by a MULTIPLE CHOICE QUESTIONS IN DBMS (unit-1 to unit-4) 1) ER model is used in phase a) conceptual database b) schema refinement c) physical refinement d) applications and security 2) The ER model is relevant

More information

Logical Database Design. ICT285 Databases: Topic 06

Logical Database Design. ICT285 Databases: Topic 06 Logical Database Design ICT285 Databases: Topic 06 1. What is Logical Database Design? Why bother? Bad logical database design results in bad physical database design, and generally results in poor database

More information

A good example of entities and relationships can be seen below.

A good example of entities and relationships can be seen below. Unit 2: Unit 2: Conceptual Design: Data Modeling and the Entity Relationship Model - Discussion 1 Scroll down and click "Respond" to post your reply to the Discussion questions. Please review the Discussion

More information

Auto Night Audit Reports Configuring Auto Night Audit Reporting Group Folio Summary Charges Tax Invoice View:...

Auto  Night Audit Reports Configuring Auto Night Audit Reporting Group Folio Summary Charges Tax Invoice View:... 8.1.1.2 RELEASE NOTES April 2016 Contents Auto Email Night Audit Reports... 2 Configuring Auto Night Audit Reporting... 2 Email... 2 Group Folio Summary Charges... 3 Tax Invoice View:... 4 Folios Indicate

More information

MIS2502: Review for Exam 1. Jing Gong

MIS2502: Review for Exam 1. Jing Gong MIS2502: Review for Exam 1 Jing Gong gong@temple.edu http://community.mis.temple.edu/gong Overview Date/Time: Tuesday, Feb. 16, in class (1 hour 20 minutes) Place: Regular classroom Please arrive 5 minutes

More information

BIRKBECK (University of London)

BIRKBECK (University of London) BIRKBECK (University of London) BSc Examination for Internal Students School of Computer Science and Information Systems Database Management COIY028U - Course Unit Value: 1/2 May 2006 : Afternoon 14.30

More information

Detailed Data Modelling. Detailed Data Modelling. Detailed Data Modelling. Identifying Attributes. Attributes

Detailed Data Modelling. Detailed Data Modelling. Detailed Data Modelling. Identifying Attributes. Attributes IMS1002 /CSE1205 Systems Analysis and Design Detailed Data Modelling The objective of detailed data modelling is to develop a detailed data structure that: Detailed Data Modelling: Attribute Collection

More information

Fundamentals of Database Systems

Fundamentals of Database Systems Fundamentals of Database Systems Assignment: 2 Due Date: 18th August, 2017 Instructions This question paper contains 10 questions in 6 pages. Q1: Consider the following schema for an office payroll system,

More information

Chapter 2: Entity-Relationship Model. Entity Sets. Entity Sets customer and loan. Attributes. Relationship Sets. A database can be modeled as:

Chapter 2: Entity-Relationship Model. Entity Sets. Entity Sets customer and loan. Attributes. Relationship Sets. A database can be modeled as: Chapter 2: Entity-Relationship Model Entity Sets Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of an E-R Database Schema Reduction of an

More information

Unit Assessment Guide

Unit Assessment Guide Unit Assessment Guide Unit Details Unit code Unit name Unit purpose/application ICTWEB425 Apply structured query language to extract and manipulate data This unit describes the skills and knowledge required

More information

MIDTERM EXAMINATION Spring 2010 CS403- Database Management Systems (Session - 4) Ref No: Time: 60 min Marks: 38

MIDTERM EXAMINATION Spring 2010 CS403- Database Management Systems (Session - 4) Ref No: Time: 60 min Marks: 38 Student Info StudentID: Center: ExamDate: MIDTERM EXAMINATION Spring 2010 CS403- Database Management Systems (Session - 4) Ref No: 1356458 Time: 60 min Marks: 38 BC080402322 OPKST 5/28/2010 12:00:00 AM

More information

Data about data is database Select correct option: True False Partially True None of the Above

Data about data is database Select correct option: True False Partially True None of the Above Within a table, each primary key value. is a minimal super key is always the first field in each table must be numeric must be unique Foreign Key is A field in a table that matches a key field in another

More information

A database can be modeled as: + a collection of entities, + a set of relationships among entities.

A database can be modeled as: + a collection of entities, + a set of relationships among entities. The Relational Model Lecture 2 The Entity-Relationship Model and its Translation to the Relational Model Entity-Relationship (ER) Model + Entity Sets + Relationship Sets + Database Design Issues + Mapping

More information

David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation

David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Five: Data Modeling with the Entity-Relationship Model Chapter Objectives To understand the two-phase

More information

THE COPPERBELT UNIVERSITY

THE COPPERBELT UNIVERSITY THE COPPERBELT UNIVERSITY SCHOOL OF INFORMATION AND COMMUNICATION TECHNOLOGY IT/IS DEPARTMENT MAY, 2018 SESSIONAL EXAMINATIONS CS235 DATABASE TECHNOLOGY TIME ALLOWED: THREE HOURS INSTRUCTIONS : Maximum

More information

Coursework 2 - Further SQL and PLSQL

Coursework 2 - Further SQL and PLSQL Database Management Sample Assignment www.expertsmind.com Coursework 2 - Further SQL and PLSQL This is an INDIVIDUAL coursework. Before you start this coursework you should have completed the SQL exercises

More information

Part 5: Introduction to Logical Design

Part 5: Introduction to Logical Design 5. Introduction to Logical Design 5-1 Part 5: Introduction to Logical Design References: Elmasri/Navathe:Fundamentals of Database Systems, 3rd Edition, 1999. Chapter 3, Data Modeling Using the Entity-Relationship

More information

FAQ: Relational Databases in Accounting Systems

FAQ: Relational Databases in Accounting Systems Question 1: What is the definition of a schema as it relates to a database? What are the three levels? Answer 1: A schema describes the logical structure of a database. The three levels of schemas are

More information

ER Modeling Data Modeling and the Entity-Relationship (ER) Diagram Pg 1

ER Modeling Data Modeling and the Entity-Relationship (ER) Diagram Pg 1 ER Modeling Data Modeling and the Entity-Relationship (ER) Diagram Pg 1 Data Modeling and the Entity-Relationship (ER) Diagram Ray Lockwood Points: The Entity-Relationship (ER) Diagram is seen by various

More information

Lecture 5 STRUCTURED ANALYSIS. PB007 So(ware Engineering I Faculty of Informa:cs, Masaryk University Fall Bühnová, Sochor, Ráček

Lecture 5 STRUCTURED ANALYSIS. PB007 So(ware Engineering I Faculty of Informa:cs, Masaryk University Fall Bühnová, Sochor, Ráček Lecture 5 STRUCTURED ANALYSIS PB007 So(ware Engineering I Faculty of Informa:cs, Masaryk University Fall 2015 1 Outline ² Yourdon Modern Structured Analysis (YMSA) Context diagram (CD) Data flow diagram

More information

Chapter 4 Entity Relationship Modeling In this chapter, you will learn:

Chapter 4 Entity Relationship Modeling In this chapter, you will learn: Chapter Entity Relationship Modeling In this chapter, you will learn: What a conceptual model is and what its purpose is The difference between internal and external models How internal and external models

More information

University of Toronto. CSC340S - Information Systems Analysis and Design

University of Toronto. CSC340S - Information Systems Analysis and Design csc340 Information Systems Analysis and Design page 1/12 University of Toronto Faculty of Arts and Science Department of Computer Science CSC340S - Information Systems Analysis and Design Spring 2002 John

More information

1. Considering functional dependency, one in which removal from some attributes must affect dependency is called

1. Considering functional dependency, one in which removal from some attributes must affect dependency is called Q.1 Short Questions Marks 1. Considering functional dependency, one in which removal from some attributes must affect dependency is called 01 A. full functional dependency B. partial dependency C. prime

More information

Computer Science Applications to Cultural Heritage. Relational Databases

Computer Science Applications to Cultural Heritage. Relational Databases Computer Science Applications to Cultural Heritage Relational Databases Filippo Bergamasco (filippo.bergamasco@unive.it) http://www.dais.unive.it/~bergamasco DAIS, Ca Foscari University of Venice Academic

More information

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 4 Entity Relationship (ER) Modeling

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management Tenth Edition Chapter 4 Entity Relationship (ER) Modeling Objectives In this chapter, students will learn: The main characteristics of entity relationship

More information

DATABASE MANAGEMENT SYSTEM

DATABASE MANAGEMENT SYSTEM DATABASE MANAGEMENT SYSTEM For COMPUTER SCIENCE DATABASE MANAGEMENT. SYSTEM SYLLABUS ER model. Relational model: relational algebra, tuple calculus, SQL. Integrity constraints, normal forms. File organization,

More information

Data and Process Modeling

Data and Process Modeling Data and Process Modeling Chapter 3 Data Models Start with User Views Data Model Diagramming Entity Relationship Diagram (ERD) is most common Original by Peter Chen in 1976 Common ERD Elements: Entities

More information

BSc (Hons) Web Technologies, BSc (Hons) Business Information System. Examinations for / Semester 2. Resit Examinations for BIS/15B/FT

BSc (Hons) Web Technologies, BSc (Hons) Business Information System. Examinations for / Semester 2. Resit Examinations for BIS/15B/FT BSc (Hons) Web Technologies, BSc (Hons) Business Information System Cohorts: BWT/16B/FT & BIS/16B/FT Examinations for 2016-2017 / Semester 2 Resit Examinations for BIS/15B/FT MODULE: DATABASE MANAGEMENT

More information

Conceptual Data Models for Database Design

Conceptual Data Models for Database Design Conceptual Data Models for Database Design Entity Relationship (ER) Model The most popular high-level conceptual data model is the ER model. It is frequently used for the conceptual design of database

More information

Example: specific person, company, event, plant

Example: specific person, company, event, plant A database can be modeled as: a collection of entities, relationship among entities. An entity is an object that exists and is distinguishable from other objects. Example: specific person, company, event,

More information

course 3 Levels of Database Design CSCI 403 Database Management Mines Courses ERD Attributes Entities title 9/26/2018

course 3 Levels of Database Design CSCI 403 Database Management Mines Courses ERD Attributes Entities title 9/26/2018 3 Levels of Database Design CSCI 403 Database Management 13 Database Modeling with Entity-Relationship Diagrams Conceptual (this lecture) Understand data entities & relationships between them Communication

More information

Attributes. Entity-Relationship Model (ERM) IV. Entity Relationship Modeling. Entities and Attributes: Chen and Crow s Foot

Attributes. Entity-Relationship Model (ERM) IV. Entity Relationship Modeling. Entities and Attributes: Chen and Crow s Foot Entity-Relationship odel (ER) IV. Entity Relationship odeling Basis of an Entity-Relationship Diagram (ERD) A design technique Diagrams entities sets (with attributes) and the relationship between the

More information

Oracle Academy Amazing Books Part 1: Building Tables and Adding Constraints

Oracle Academy Amazing Books Part 1: Building Tables and Adding Constraints Oracle Academy Amazing Books In this section, you use the Object Browser in Oracle Application Express to: Build the base tables for the project Add foreign key constraints Be sure to have a copy of the

More information

EE221 Databases Practicals Manual

EE221 Databases Practicals Manual EE221 Databases Practicals Manual Lab 1 An Introduction to SQL Lab 2 Database Creation and Querying using SQL Assignment Data Analysis, Database Design, Implementation and Relation Normalisation School

More information

ALTERNATE SCHEMA DIAGRAMMING METHODS DECISION SUPPORT SYSTEMS. CS121: Relational Databases Fall 2017 Lecture 22

ALTERNATE SCHEMA DIAGRAMMING METHODS DECISION SUPPORT SYSTEMS. CS121: Relational Databases Fall 2017 Lecture 22 ALTERNATE SCHEMA DIAGRAMMING METHODS DECISION SUPPORT SYSTEMS CS121: Relational Databases Fall 2017 Lecture 22 E-R Diagramming 2 E-R diagramming techniques used in book are similar to ones used in industry

More information

Institute of Southern Punjab, Multan

Institute of Southern Punjab, Multan Institute of Southern Punjab, Multan Mr. Muhammad Nouman Farooq BSC-H (Computer Science) MS (Telecomm. and Networks) Honors: Magna Cumm Laude Honors Degree Gold Medalist! Blog Url: noumanfarooqatisp.wordpress.com

More information

Home Page. Title Page. Page 1 of 14. Go Back. Full Screen. Close. Quit

Home Page. Title Page. Page 1 of 14. Go Back. Full Screen. Close. Quit Page 1 of 14 A BCNF Normalisation Algorithm Input: A specification containing: 1. a relation schema, R, and 2. a set of Functional Dependencies (FDs), F over R. An Entity-relationship Diagram (ERD) conforming

More information