0% found this document useful (0 votes)
25 views2 pages

Assignment 1

The document outlines significant differences between file-processing systems and database management systems (DBMS), highlighting aspects such as data access coordination, data duplication, and user access. It also explains the concept of physical data independence, emphasizing its importance in allowing modifications to the physical schema without affecting application programs. Additionally, the document provides relational algebra expressions for various queries related to employee and bank databases.

Uploaded by

lwtwalter0711
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

Assignment 1

The document outlines significant differences between file-processing systems and database management systems (DBMS), highlighting aspects such as data access coordination, data duplication, and user access. It also explains the concept of physical data independence, emphasizing its importance in allowing modifications to the physical schema without affecting application programs. Additionally, the document provides relational algebra expressions for various queries related to employee and bank databases.

Uploaded by

lwtwalter0711
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SC022650 LI WENTAI

Assignment1 (Chap 1, Chap 2)

Chapter 1

1.7 List four significant differences between a file-processing system and a DBMS.

1. Both systems contain a collection of data and a set of programs which access
that data. A database management system coordinates both the physical and the
logical access to the data, whereas a fileprocessing system coordinates only the
physical access.
2. A database management system reduces the amount of data duplication by
ensuring that a physical piece of data is available to all programs authorized to
have access to it, whereas data written by one program in a file-processing system
may not be readable by another program.
3. A database management system is designed to allow flexible access to data (i.e.,
queries), whereas a file-processing system is designed to allow pre-determined
access to data (i.e., compiled programs).
4. A database management system is designed to coordinate multiple users
accessing the same data at the same time. A file-processing system is usually
designed to allow one or more programs to access different data files at the same
time. In a file-processing system, a file can be accessed by two programs
concurrently only if both programs have read-only access to the file.

1.8 Explain the concept of physical data independence and its importance in
database systems.

Physical data independence is the ability to modify the physical scheme without
making it necessary to rewrite application programs. Such modifications include
changing from unblocked to blocked record storage, or from sequential to random
access files. Such a modification might be adding a field to a record; an application
program’s view hides this change from the program.
2.14 Consider the employee database of Figure 2.17. Give an expression in the relational algebra to
express each of the following queries:
a. Find the ID and name of each employee who works for “BigBank”.
b. Find the ID, name, and city of residence of each employee who works for
“BigBank”.
c. Find the ID, name, street address, and city of residence of each employee
who works for “BigBank” and earns more than $10000.
d. Find the ID and name of each employee in this database who lives in the
same city as the company for which she or he works.

employee (ID,person_name, street, city)


works (ID, person_name, company_name, salary)
company (company_name, city)
Figure 2.17 Employee database.

a. ΠID,person_name(σcompany_name=BigBank(employee⋈works))
b. ΠID,person_name,city(σcompany_name=BigBank(employee⋈works))
b. ΠID,person_name,street,city(σ(company_name=BigBank)∧(salary>10000)(employee⋈works))
c.

ny.city)(employee⋈works))
ΠID,person_name(σ(employee.person_name=works.person_name)∧(works.person_name=company.person_name)∧(employee.city=compa

2.15 Consider the bank database of Figure 2.18. Give an expression in the relational
algebra for each of the following queries:
a. Find each loan number with a loan amount greater than $10000.
b. Find the ID of each depositor who has an account with a balance greater
than $6000.
c. Find the ID of each depositor who has an account with a balance greater
than $6000 at the “Uptown” branch.

branch(branch name, branch city, assets)


customer (ID, customer_name, customer_street, customer_city)
loan (loan_number, branch_name, amount)
borrower (ID, loan_number)
account (account_number, branch_name, balance)
depositor (ID, account_number)
Figure 2.18 Bank database.

b.ΠID(σbalance>6000 (depositor ⋈ depositor.account_number=account.account_number account))


a. Πloan_number(σamount>10000(loan))

c.ΠID(σ(balance>6000) Λ (branch_name=“Uptown”) (depositor ⋈ depositor.account_number=account.account_number


account))

You might also like