Exercises - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Exercises

Description:

We want to store in Table CUSTOMERS the set of customers of a DVD rental shop. ... to store, in a separate Table called DVD, the list of DVDs rented by each ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 20
Provided by: 4cU
Category:
Tags: dvd | exercises | rental

less

Transcript and Presenter's Notes

Title: Exercises


1
Exercises
  • Introduction to DatabasesDatabase Management
    Systems (DBMS)Relational Data Model
  • Module CS6003
  • Lecturer Roberto Rossi
  • Feb - 2008

2
Exercises
  • A DBMS is
  • an information system
  • a computerized system
  • a set of data
  • none of the former answers

3
Exercises
  • Raw data stay
  • at the bottom of the value scale
  • at the top of the value scale
  • above processed data in the value scale
  • none of the former answers

4
Exercises
  • A DBMS user
  • designs the DB
  • requires knowledge of the data model employed by
    the DBMS
  • manages data stored in a DBMS
  • none of the former answers

5
Exercises
  • A DB is
  • a collection of data
  • a software application
  • a file
  • none of the former answers

6
Exercises
  • In order to execute operations in a DBMS we need
    to
  • write a software application
  • write instructions in a language supported by the
    DBMS
  • always contact the DBMS administrator
  • none of the former answers

7
Exercises
  • Why do we share data in companies
  • to increase redundancy
  • to reduce redundancy
  • to find inconsistencies
  • none of the former answers

8
Exercises
  • From users viewpoint a DB is a collection of
    data that models
  • the real world
  • a portion of the reality of interest
  • raw data
  • none of the former answers

9
Exercises
  • a data model is
  • a collection of concepts used to describe data
  • a hierarchical model
  • an object model
  • none of the former answers

10
Exercises
  • The model shown in the picture is
  • Hierarchical
  • Network
  • Relational
  • none of the former

Ferrari
Todt
Shumacher
Barrichello
11
Exercises
  • In a relational model Tables represent
  • relations
  • objects
  • attributes
  • none of the former answers

12
Exercises
  • D1 a,b,c, D2 1,2 D1 x D2
  • (a,1),(b,1),(b,2),(c,1),(c,2)
  • (a,1),(a,2),(b,1),(c,1),(c,2)
  • (a,1),(a,2),(b,1),(b,2),(c,1),(c,2)
  • none of the former answers

13
Exercises
  • The part of the table indicated by the arrow is
  • The schema of the relation
  • The instance of the relation
  • The header of the relation
  • None of the former answers

League
14
Exercises
  • What is t?
  • an attribute
  • an instance
  • a tuple
  • none of the former answers

League
t
15
Exercises
  • key constraints
  • forbid that distinct tuples take the same value
    on one or more attributes
  • state that distinct tuples take the same value on
    one or more attributes
  • state which distinct tuples take the same value
    on one or more attributes
  • none of the former answers

16
Exercises
  • the set of all the attributes of the schema is
    always
  • a superkey of R(X)
  • a key of R(X)
  • a tuple of R(X)
  • none of the former answer

17
Exercise (complex)
  • Design a simple relational DB with two tables
    modeling the following reality of interest
  • We want to store in Table CUSTOMERS the set of
    customers of a DVD rental shop. Each customer is
    identified by a unique ID, for each customer we
    store Name, Surname and Date of Birth.
  • We also want to store, in a separate Table called
    DVD, the list of DVDs rented by each user.
    Therefore in such a table we will memorize the
    Name of the movie, the Date in which it was
    rented, and the Customer that rented it.
  • Once the DB is modeled indicate which attribute
    is a valid PRIMARY KEY for Table CUSTOMERS and
    which attribute is a FOREIGN KEY in Table DVD

18
Exercise (complex)
CUSTOMERS
DVD
19
Exercise (complex)
CUSTOMERS
DVD
Write a Comment
User Comments (0)
About PowerShow.com