Your SlideShare is downloading. ×
hw1a.doc
hw1a.doc
hw1a.doc
hw1a.doc
hw1a.doc
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

hw1a.doc

150

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
150
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Graduate DB - Assignment # 1 - answers PART I – INTRODUCTION 1) List four advantages of having a Centralized Database Management System instead of having separate file processing systems that do not share data. a) Easier data management b) Development of applications access one data store c) Reporting is easier d) Data backup is easier 2) Who first proposed the relational Model ? EFCodd 3) Name two data models that preceded the Relational Model ? network and hierarchical 4) Name one advantage and one disadvantage of the Relational Model over the OODBMS Model ? Advantage relational model is more standard, there is a lot of code/databases done in relational model easier to find a knowledgeable employee that understands relational model. Disandvantage Relational is not object oriented so there is needed to map OO program structures to relational table. Relational model is not well suited to handle complex data types such as multimedia, sub-types 5) What is the difference between Database and DBMS ? Database holds the data, DBMS manages the database Does the .MDB file in MS-Access contain the Database or the DBMS ? the Database 6) What is metadata ? Data that describes the data. The data dictionary. 7) A Conceptual View of the Database is the Database as seen by the end-user, A Logical View of the Database is Data tied to a specific model, but Independent of any implementation. A Physical view is data tied to a specific hardware/software. a) When we say that social security number consists of nine numeric characters, is it a Conceptual, Logical or Physical or the data ? Conceptual b) When we say that social security number will be stored as long int, is it a Conceptual, Logical or Physical or the data ? Physical 8) List two popular personal DBMS MS Access, FilemakerPro 9) List two popular open source DBMS MySql and Postgres 10) List three popular enterprise DBMS Oracle, DB2, and SqlServer 11) List the three biggest DBMS vendors. IBM, Oracle, and Microsoft 12) Who is the leading DBMS vendor for PDAs and Mobile Devices? Sybase/iAnywhere. iAnywhere is Sybase's subsidiary for dealing with mobile devices. Question will not be on the test.
  • 2. PART II – RELATIONAL ALGEBRA 1) Show the table/data that results from the following operations a) Employees where did = ‘d2’ Eid Name Did 005 Lucas d2 006 Larissa d2 b) Student [name] Name Becky John Lucas Larissa Vanessa c) R1 = Employee [eid, name] Result = Student Minus R1 Eid Name 002 Becky 007 Vanessa d) Employee Join Department Eid Name Did Dname 001 Mary d1 Marketing 003 John d1 Marketing 005 Lucas d2 Accounting 006 Larissa d2 Accounting e) Student Multiply BY Department Eid Name Did Dname 002 Becky d1 Marketing 002 Becky d2 Accounting 003 John d1 Marketing 003 John d2 Accounting 005 Lucas d1 Marketing 005 Lucas d2 Accounting 006 Larissa d1 Marketing 006 Larissa d2 Accounting 007 Vanessa d1 Marketing 007 Vanessa d2 Accounting
  • 3. f) R1 = Employee [eid, name] Result = Student Union R1 Eid Name 001 Mary 002 Becky 003 John 005 Lucas 006 Larissa 007 Vanessa g) R1 = Employee [eid, name] Result = Student Intersect R1 Eid Name 003 John 005 Lucas 006 Larissa 2) In Relational Algebra, solve the following problems a) List name of students who are also employees Book notation: ∏name(Student) ∩ ∏name(Employee) Professor notation: R1 = Student [name] R2 = Employee[name] R3 = R1 Intersect R2 b) List name of employees who are not students Book notation: ∏name(Employee) - ∏name(Student) Professor notation: R1 = Student [name] R2 = Employee[name] R3 = R1 MINUS R2 c) List the name of each employee and the corresponding department name that they work Book Notation: ( ∏name(Employee)) |><| (∏Dname(Department)) **Implemented as a Natural Join. Professor notation: R1 = Department Join Employees R2 = R1 [Name, dname] 3) This Relational Algebra operation requires two tables as input and the two tables must have one common column a) RESTRICTION b) JOIN c) DIVISION d) CARTESIAN PRODUCT (MULTIPLICATION) e) PROJECTION
  • 4. 4) This Relational Algebra operation requires two tables as input where one table has two columns and the other table has one column. a) RESTRICTION b) JOIN c) DIVISION d) CARTESIAN PRODUCT (MULTIPLICATION) e) PROJECTION 5) These Relational Algebra operations requires two tables as input with exactly the same attributes a) JOIN, CARTESIAN PRODUCT (MULTIPLICATION), DIVISION b) PROJECT, RESTRICTION, UNION c) UNION, INTERSECTION, MINUS d) UPDATE, INSERT, DELETE e) PROJECTION 6) The SQL code SELECT cid, cname FROM customers; implements which Relational Algebra Operation ? a) RESTRICTION b) JOIN c) DIVISION d) CARTESIAN PRODUCT (MULTIPLICATION) e) PROJECTION 7) The SQL code SELECT * from customers, orders; implements which Relational Algebra Operation ? a) RESTRICTION b) JOIN c) DIVISION d) CARTESIAN PRODUCT (MULTIPLICATION) e) PROJECTION 8) Omitting the WHERE clause from a IN A SELECT, DELETE or UPDATE statement has which of the following effects ? a) Generate a syntax error b) SELECT, DELETE or UPDATE the current row c) Causes all rows to be SELECTED, DELETED or UPDATED d) causes the first row to be SELECTED, DELETED or UPDATED
  • 5. 9) The SQL code SELECT * FROM customers, orders WHERE customers.cid=orders.cid; implements which Relational Algebra Operation ? a) RESTRICTION b) JOIN c) DIVISION d) CARTESIAN PRODUCT (MULTIPLICATION) e) PROJECTION 10) The SQL code SELECT * FROM customers WHERE city = 'Knoxville’ implements which Relational Algebra Operation ? a) RESTRICTION b) JOIN c) DIVISION d) CARTESIAN PRODUCT (MULTIPLICATION) e) PROJECTION

×