McMillan’s Quizzes Multiple choice, open book, open notes Not open computers, not open classmates Partial credit: if less than half the class gets a question.

Slides:



Advertisements
Similar presentations
ER Model For a college DB
Advertisements

COP4540 Database Management System Midterm Review
IS698: Database Management Min Song IS NJIT. The Relational Data Model.
Relational Database. Relational database: a set of relations Relation: made up of 2 parts: − Schema : specifies the name of relations, plus name and type.
Relational Algebra Tim Kaddoura CS157A. Introduction  Relational query languages are languages for describing queries on a relational database  Three.
1 CHAPTER 4 RELATIONAL ALGEBRA AND CALCULUS. 2 Introduction - We discuss here two mathematical formalisms which can be used as the basis for stating and.
1 Database Design I: The Entity- Relationship Model Chapter 5.
1 Chapter 4 Database Design I: The Entity-Relationship Model.
The Entity-Relationship Model
The Entity-Relationship (ER) Model
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
SQL Lecture 10 Inst: Haya Sammaneh. Example Instance of Students Relation  Cardinality = 3, degree = 5, all rows distinct.
Conceptual Design and The Entity-Relationship Model
ENTITY RELATIONSHIP MODELLING
D ATABASE S YSTEMS I A DMIN S TUFF. 2 Mid-term exam Tuesday, Oct 2:30pm Room 3005 (usual room) Closed book No cheating, blah blah No class on Oct.
1 The Entity-Relationship Model Chapter 2. 2 Overview of Database Design  Conceptual design: (ER Model is used at this stage.) –What are the entities.
COP5725 – Principles of Database Management Systems
The Entity-Relationship Model
3-1 Chapter 3 Data and Knowledge Management
The Entity- Relationship Model CS 186 Fall 2002: Lecture 2 R &G - Chapter 2 A relationship, I think, is like a shark, you know? It has to constantly move.
1 Data Modeling Yanlei Diao UMass Amherst Feb 1, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
1 Database Design I: The Entity-Relationship Model Chapter 5.
The Entity- Relationship Model R &G - Chapter 2 A relationship, I think, is like a shark, you know? It has to constantly move forward or it dies. And I.
Systems Analysis and Design in a Changing World, 6th Edition
Database Design & ER Diagrams
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Entity Relationship Diagrams (ERDs)
Chapter 3: Modeling Data in the Organization
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
Database Design Concepts
1 Data Modeling : ER Model Lecture Why We Model  We build models of complex systems because we cannot comprehend any such system in its entirety.
Converting ER model Into Relational Table
Chapter 2.  Conceptual design: (ER Model is used at this stage.) ◦ What are the entities and relationships in the enterprise? ◦ What information about.
Conversion from ER diagram to relational model
1 Chapter 4 Database Design I: The Entity-Relationship Model.
Entity-Relationship Model Ch. 3
ICS 321 Spring 2011 High Level Database Models Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 2/7/20111Lipyeow.
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
2141-W2013 Mid-term Prep. Next week Monday, Feb 18 – Midterm Covers everything before normalization Wednesday, Feb 20 – Ass 3 (normalization) due – Wrap.
Prepared by The Smartpath Information Systems
CS499 Project #3 XML mySQL Test Generation Members Erica Wade Kevin Hardison Sameer Patwa Yi Lu.
Database Management Systems MIT Lesson 02 – Database Design (Entity Relationship Diagram) By S. Sabraz Nawaz.
An Entity Relationship (ER) Diagram is a graphic that shows the interrelationship between entities in a database.
SE305 Database System Technology 23/10/2014 Quiz-2.
Chapter 3 Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
1 Data Modeling : ER Model…. Lecture Summary so for …. ER Model Entity, Attribute, Key Relationships Instance Diagram.
ICOM 5016 – Introduction to Database Systems Lecture 5 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Chapter 2: Intro to Relational Model. 2.2 Example of a Relation attributes (or columns) tuples (or rows)
Computing & Information Sciences Kansas State University Friday, 26 Sep 2008CIS 560: Database System Concepts Lecture 13 of 42 Friday, 26 September 2008.
COMP3030 Database Management System Final Review
advanced data modeling
Copyright © Curt Hill The Relational Calculus Another way to do queries.
Relational Database in Access Student System As always please use speaker notes!
ER & Relational: Digging Deeper R &G - Chapters 2 & 3.
Howard Paul. Sequential Access Index Files and Data File Random Access.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 3: Modeling Data in the Organization Modern Database Management 9 th Edition Jeffrey.
Test SEITA.
SHAKEELA Databases = Fun..Fun..Fun. Databases are……UBIQUITOUS EVERYWHERE...Ever Present…used all over the world  Online Movie Store  Airlines  Grades.
1 CS122A: Introduction to Data Management Lecture #4 (E-R  Relational Translation) Instructor: Chen Li.
COP Introduction to Database Structures
Database Design Goal: specification of database schema Methodology:
The Relational Model.
Databases Chapter 16.
Entity-Relationship Model
Outline of the ER Model By S.Saha
Entity-Relationship Modeling
Order Database – ER Diagram
The Entity-Relationship Model
Chapter 7: Entity-Relationship Model
CS4222 Principles of Database System
Presentation transcript:

McMillan’s Quizzes Multiple choice, open book, open notes Not open computers, not open classmates Partial credit: if less than half the class gets a question right, he’ll give half-credit for the next best answer Not easy!

Of the following, which is an advantage of using a relational database? A.Attributes are inherited B.Relations are related to others hierarchically C.It is the only database approach that provides data independence D.It permits queries that are at least as powerful as relational algebra E.All of the above

Which of the following is uncharacteristic of a database schema? A. Attributes are not strongly typed B. Entities without a primary key C. A relation with a variable number of attributes D. It is unique to a database instance. E. All of the above

Professor Department WorksIn DeptHead since id dno since Of the following, what is implied by the heavy arrow from “Professor” to “WorksIn” A.Each department must have at least one professor B.All professors work in exactly one department C.Professors may be members of one or more departments D.All professors either work in, or head some department E.None of the above

Why is the ‘join’ operator not one of the five primitive (basic) operators of relational algebra? A.It was not included in Codd’s seminal papers B.Joins can be accomplished by composing primitive operations. C.It is equivalent to the Carteasian product D.It has too many variants to be considered a primitive operator. E.None of the Above

Which of the following best describes the result of this relational algebra statement? A. IDs of students who have taken at least two different courses B. IDs of students who have taken the same course twice C. IDs of students who have taken exactly one course D. IDs of students who have taken exactly two courses E. None of the above  StudID1 (  Course1  Course2 (  (T1(1  StudID1, 2  Course1, 3  Semester1, 4  Grade1), Transcript) ⋈ StudID1=StudID2  (T2(1  StudID2, 2  Course2, 3  Semester2, 4  Grade2), Transcript)))

Problem Points ER: binary, ternary, aggregate relationships. Problem: Represent supplier inventory, and who sells what to whom. Suppliers Orders Products

SQL: Aggregate Operators Example: sqlite> SELECT * FROM Sample; a|b 1|1 2|4 3|9 4|8 5|5 sqlite> SELECT a, MAX(b) FROM Sample; What does this return? Does it even run?

Relational Calculus – Some points TRC != DRC TRC Projection

4C: Find all classes in which no student failed (TRC) –Do with and without the universal quantifier CREATE TABLE Courses ( number TEXT, semester TEXT, seats INTEGER, PRIMARY KEY(number, semester) ); CREATE TABLE Enrollment ( student_name TEXT, course_number TEXT, course_semester TEXT, grade INTEGER, PRIMARY KEY(student_name, course_number, course_semester), FOREIGN KEY student_name REFERENCES Students(name), FOREIGN KEY (course_number, course_semester) REFERENCES Courses(number, semester) );

Questions? Database Concepts / History ER model, ER diagrams Relational model Relational algebra Relational calculus SQL Database Application Development