Quiz 2. 1. Which of the following is not a mandatory characteristic of a relation? Rows are not ordered (Not required) Each row is a unique There is a.

Slides:



Advertisements
Similar presentations
DB glossary (focus on typical SQL RDBMS, not XQuery or SPARQL)
Advertisements

MSc IT UFCE8K-15-M Data Management Prakash Chatterjee Room 2Q18
The Relational Model Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
The Relational Database Model – some relations you might want to avoid!!!
The Relational Database Model
Chapter 3 The Relational Model Transparencies © Pearson Education Limited 1995, 2005.
Relations The Relational Data Model John Sieg, UMass Lowell.
Database Integrity, Security and Recovery Database integrity Database integrity Database security Database security Database recovery Database recovery.
CSE 190: Internet E-Commerce Lecture 10: Data Tier.
Chapter 3. 2 Chapter 3 - Objectives Terminology of relational model. Terminology of relational model. How tables are used to represent data. How tables.
Relational Model Stores data as tables –Each column contains values about the same attribute –Each column has a distinct name –Each row contains values.
1 Relational Model. 2 Relational Database: Definitions  Relational database: a set of relations  Relation: made up of 2 parts: – Instance : a table,
The Relational Database Model. 2 Objectives How relational database model takes a logical view of data Understand how the relational model’s basic components.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
CSEN 5314 Quiz 3.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
The Relational Model Codd (1970): based on set theory Relational model: represents the database as a collection of relations (a table of values --> file)
Thomas Connolly and Carolyn Begg’s
Database Architecture The Relational Database Model.
The Relational Database Model
Relational Model & Relational Algebra. 2 Relational Model u Terminology of relational model. u How tables are used to represent data. u Connection between.
Lecture 2 The Relational Model. Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations.
Chapter 4 The Relational Model Pearson Education © 2014.
© Pearson Education Limited, Chapter 2 The Relational Model Transparencies.
Relational Model Session 6 Course Name: Database System Year : 2012.
Chapter 4 The Relational Model.
CSC 280: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS Dr. Adam Anthony Fall 2012.
Learningcomputer.com SQL Server 2008 – Entity Relationships in a Database.
Chapter 3 The Relational Model. 2 Chapter 3 - Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between.
Lecture 7 Integrity & Veracity UFCE8K-15-M: Data Management.
SQL Server 7.0 Maintaining Referential Integrity.
The Relational Database Model
1 The Relational Database Model. 2 Learning Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical.
9/7/2012ISC329 Isabelle Bichindaritz1 The Relational Database Model.
FALL 2004CENG 351 File Structures and Data Management1 Relational Model Chapter 3.
Week 10 Quiz 9 Answers Group 28 Christine Hallstrom Deena Phadnis.
Database Systems, 9th Edition 1.  In this chapter, students will learn: That the relational database model offers a logical view of data About the relational.
Chapter 4 Constraints Oracle 10g: SQL. Oracle 10g: SQL 2 Objectives Explain the purpose of constraints in a table Distinguish among PRIMARY KEY, FOREIGN.
SQL LANGUAGE and Relational Data Model TUTORIAL Prof: Dr. Shu-Ching Chen TA: Hsin-Yu Ha.
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 3 The Relational Database Model.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 3 The Relational Database Model.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
Copyright © 2011 by Michael V. Mannino All rights reserved. Database Design, Application Development, and Administration, 5 th Edition Quiz G4 Hyunwoo.
Department of Mathematics Computer and Information Science1 CS 351: Database Systems Christopher I. G. Lanclos Chapter 3: The Relational Database Model.
Constraints Lesson 8. Skills Matrix Constraints Domain Integrity: A domain refers to a column in a table. Domain integrity includes data types, rules,
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
The Relational Model. 2 Relational Model Terminology u A relation is a table with columns and rows. –Only applies to logical structure of the database,
SE305 Database System Technology 25/09/2014 Quiz-1.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
Chapter 3: Relational Databases
Chapter 3 The Relational Database Model. Database Systems, 10th Edition 2 * Relational model * View data logically rather than physically * Table * Structural.
Lecture 03 Constraints. Example Schema CONSTRAINTS.
CHAPTER 2 : RELATIONAL DATA MODEL Prepared by : nbs.
The Relational Model © Pearson Education Limited 1995, 2005 Bayu Adhi Tama, M.T.I.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
Chapter 3 The Relational Model. Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between mathematical.
Week 2 Lecture The Relational Database Model Samuel ConnSamuel Conn, Faculty Suggestions for using the Lecture Slides.
Chapter 4 The Relational Model Pearson Education © 2009.
Constraints Advanced Database Systems Dr. AlaaEddin Almabhouh.
 MySQL  DDL ◦ Create ◦ Alter  DML ◦ Insert ◦ Select ◦ Update ◦ Delete  DDL(again) ◦ Drop ◦ Truncate.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
Quiz Questions Q.1 An entity set that does not have sufficient attributes to form a primary key is a (A) strong entity set. (B) weak entity set. (C) simple.
Database Systems: Design, Implementation, and Management Tenth Edition
CIS 207 The Relational Database Model
Lecture 2 The Relational Model
Chapter 3 The Relational Database Model
Lecturer: Mukhtar Mohamed Ali “Hakaale”
DATABASE SYSTEM.
Database Systems: Design, Implementation, and Management
Presentation transcript:

Quiz 2

1. Which of the following is not a mandatory characteristic of a relation? Rows are not ordered (Not required) Each row is a unique There is a primary key There is a foreign key 2.A foreign key is indicated in SQL in part with the use of the following keywords in a CREATE statement: UNIQUE NOT NULL PRIMARY KEY REFERENCES Answers

1. Rows are not ordered and There is a foreign key

3.Which of the following constraints are enforced by a relational data model? A value stored in a column within a row is atomic. Values in a primary key column are unique. Values in a foreign key column are subsets of values in a referenced column. All of the above. 4. Ture or False (a) False: The entity integrity rule ensures that people, things and events are uniquely identified in a database. (b) False: Primary key is subset of superkey but vice versa not true. (c) True: as b (d) True (e) False: The values must be unique for all cases including the new future cases Answers

4 (d) False: after projection we may have same rows and that is not a table (e)True: For now it’s a candidate key.

5.The inner join of a table of N rows and a table of M rows (M <= N) has the following number of rows: A number between 0 and M + N A number in the range 0 to M*N A number between M + N and M * N A number between M and M * N If there is no single match between then it’s zero. For the most, it should be cross product M*N 6. The full outer join of a table of N rows and a table of M rows (M <= N) has the following number of rows: A number between 0 and M + N A number in the range 0 to M*N A number between M + N and M * N A number between M and M * N (?) Since N>=M, then at least the new table contains N rows and up to M*N rows

7. Which of the following pictures represents a relational table? B a : not a relational table since we can’t find primary key. b : It’s a relational table. c : not a relational table since it has two same rows d : not a table since it’s last column is non-atomic. e : not a table since the last column’s non-atomic(A,I). 8. What is the motivation for the entity integrity rule? Entity integrity ensures that entities (people, things, and events) are uniquely identified in a database. For auditing, security, and communication reasons, it is important that business entities be easily traceable. (From textbook)