Database introduction Assignment, Exercises of Database Management Systems (DBMS)

DataBase introduction Assignment

Typology: Exercises

2016/2017

Uploaded on 12/20/2017

khaled999
khaled999 🇺🇸

4

(2)

2 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
INTRODUCTION TO
DATABASE (IT244)
ASSIGNMENT 1
(LAST DATE TO
SUBMIT: 20/02/2016)
Q1: Consider the below schema for a library database and write relational algebra expressions for the
following queries [1.5 Marks]
1. Give all authors’ names born after 1940. [0.25 Point]
π authornames(σ birthyears >1940(Product))
2. Give the names of libraries in Sydney. [0.25 Point]
π libname(σ city= Sydney (Branch))
3. Give the cities where each book is held. [0.25 Point]
π city,book.isbn(σ Branch.libname = Instock.libname and Instock.isbn = Book.isbn
(Branch*Instock*Book))
2
1. Author ( authorname, citizenship, birthyear)
2. Book (isbn, title, authorname)
3. Topic (isbn, subject)
4. Branch (libname, city)
pf3
pf4

Partial preview of the text

Download Database introduction Assignment and more Exercises Database Management Systems (DBMS) in PDF only on Docsity!

INTRODUCTION TO

DATABASE (IT244)

ASSIGNMENT 1

(LAST DATE TO

SUBMIT: 20/02/2016)

Q1: Consider the below schema for a library database and write relational algebra expressions for the

following queries [1.5 Marks]

1. Give all authors’ names born after 1940. [0.25 Point]

π authornames (σ birthyears >1940 (Product))

2. Give the names of libraries in Sydney. [0.25 Point]

π libname (σ city= Sydney (Branch))

3. Give the cities where each book is held. [0.25 Point]

π city,book.isbn (σ Branch.libname = Instock.libname and Instock.isbn = Book.isbn

(BranchInstockBook))

1. Author ( authorname, citizenship, birthyear)

2. Book (isbn, title, authorname)

3. Topic (isbn, subject)

4. Branch (libname, city)

4. Give the title of each book on the topic of either alcohol or drugs. [0.25 Point]

π title of book (σ subject= alcohol OR subject =drugs (Book *Topic))

5. Give the title and author of each book of which at least two copies are held in a branch located in

Melbourne. [0.50 Point]

π title,author (σ quantity>=2 and city= Melbourne. (Book InstockBranch))

Q2. What are the responsibilities of a DBA? If we assume that the DBA is never interested in running

his or her own queries, does the DBA still need to understand query optimization? Why? [1.5 Marks]

The responsibility of the DBA is include:

1-Schema definition: the person (DBA)is make main the database schema through implement set of

data definition in DDL.

2- storage body and define the access method

3- Schema and physical-organization modification: The DBA execute changes on the schema and

physical organization to invert all the needs changing of the organization or change the

organization physical to progress performance.

4- Granting of authorization for data access.: the DBA can organize any part of data base allow to

users can access by agree to give various kinds of authorization and keep the information in

private system structure that the DB system confer whenever try anyone access to the data in

system.

5- Routine maintenance.:^ the activities of Routine maintenance like support Periodically Up the

DB to prevent loss data, and making sure if free disk space enough and control chances of work

on DB and making sure the performance.

because the DBA needs to understand the query optimization untill if he or she not intersted in running

because some of these responsibilities are linked to query optimization and if the DBA not undersatnd

the performanceof the queries on wide range athen can not make good decisions

Q3: What are the drawbacks of using file system over database management system?

Schema Diagram for University Database.

NO, can not use the s_id a primary key of the advisor relation because may be two or many rows

(tuples) for one student, congruent to 2 or many advisors ,

then, should be the primary key are s_id and i_id