Professional Documents
Culture Documents
A) Write A: MUST University Computer Engineering Depart. Database System CSE301
A) Write A: MUST University Computer Engineering Depart. Database System CSE301
B) A database for a banking system is used to control withdrawal, deposit and loan transactions with
customers, banks which use this system has many branches, each branch has a unique name,
address (unique) and phone .The system stores information about customers as cust_id (unique),
name, address, and phones. each customer has one credit identified by credit_no (unique),
amount and last_transaction_date(day, month ,hour), transaction_time. Customer can make any
type of transactions (withdrawal, deposit) from any branch of the bank. the system record
trans_no, trans_type, trans_date, trans_amount. system record the branch name where the
transaction occurred. Draw an ER diagram. Estimate any missing assumptions.
Question 2: -
Write the SQL code of the following Queries:
1) Display all the employees Data
2) Display the employee First name, last name, Salary and Department number.
3) Display all the projects names, locations and the department which is responsible about it.
4) If you know that the company policy is to pay an annual commission for each employee
which specific percent equals 10% of his/her annual salary. Display each employee full name
and his annual commission in an ANNUAL COMM column (alias).
5) Display the employees Id, name who earns more than 1000 LE monthly.
6) Display the employees Id, name who earns more than 10000 LE annually.
7) Display the names and salaries of the female employees
8) Display each department id, name which managed by a manager with id equals 968574.
A) Define each of these terms
1) Database integrity.
2) Database administrator.
3) Weak entity.
4) Cardinality of a relationship:
B) What are two advantages of encrypting data stored in the database?
3. Insert the following values into the products table (10 points):
code name price
PN01 Pen 5.00
PCL01 Pencil HB 2.75
PCL02 Pencil B 2.50
NB01 Notebook 10.00
4. Delete the ‘Pencil B’ Entry of the table.
5. Update the name of the ‘Pencil HB’ entry to be ‘Pencil’.
6. Show all entries with code that contains ‘PCL’.
Assume the database has another table, stores, with the following fields:
8. Show the address of all stores that has low stock (less than 10) of the ‘Notebook’ item.
Question 4: -
A) Read each statement below and label it as True or False.
1) The hierarchical model was the earliest major database approach.
2) The hierarchical model represents the database schema as a tree.
3) A network model database is most closely related to mathematical set theory.
4) An object-oriented database model is akin to a network database model.
5) A relational database approach has been the most efficient in performance from
the beginning.
6) An object-oriented database is today’s primary database approach
7) Normalization attempts to eliminate nulls stored in a database.
Figure 1