0% found this document useful (0 votes)
131 views4 pages

Dbase Systems Exam

This document contains 9 questions regarding database systems and SQL. The questions cover topics such as the differences between databases and database management systems, relational and flat file systems, data models, data definition language, data manipulation language, database security, transactions, and using SQL to query and modify database tables. Multiple questions involve writing SQL queries to retrieve, insert, update, and delete data from sample database tables provided in the questions.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
131 views4 pages

Dbase Systems Exam

This document contains 9 questions regarding database systems and SQL. The questions cover topics such as the differences between databases and database management systems, relational and flat file systems, data models, data definition language, data manipulation language, database security, transactions, and using SQL to query and modify database tables. Multiple questions involve writing SQL queries to retrieve, insert, update, and delete data from sample database tables provided in the questions.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

Database systems sample

questions
1. a. Differentiate between a Database and a Database Management system giving two
examples in each case 5 marks
b. What are the advantages of Relational Database management System over flat file
systems? 15 marks
a. What is a data model? 5 marks
b. Describe E-R data model with annotated diagrams 15 marks.
2. Write short notes on the following: 5 marks @
a. Instances and Schemes
b. Data Independence
c. Physical data independence
d. Logical data independence
3. Giving examples explain the meaning of the following terms: 5 marks @
a. Data Definition Language (DDL)
b. Data Manipulation Language (DML)
c. Data Control Language (DCL)
d. Transaction Control Language (TCL)
4. a. What is the difference between Database Manager and Database Administrator
5 marks
b. Explain the roles of a Database Administrator? 15 marks
5. a. Explain the use of the following constraints: 3marks @
i. Primary key
ii. Foreign key
iii. Check
iv. NOT NULL
b. Explain the use of the following key words in SQL: 2 marks @
i. DISTINCT
ii. DESCRIBE
iii. IN
iv. BETWEEN

6. a. The following queries will execute will execute successfully:


 Select last_name, Salary, 12*salary+100000 from Employees
 Select last_name, Salary, 12*(salary+100) from Employees
Explain the difference in the out put of the above queries and if salary was equal to
600000 what figure would be displayed in salary column for each of the above
queries? 10 marks
b. Explain fully the out put of the query below
SELECT last_name, job_id, salary from employees
WHERE job_id=
(SELECT job_id
FROM employees
WHERE employee_id=141)
AND salary>
(SELECT salary
FROM employees
WHERE employee_id=143); 10 marks
7. Study the table below and answer the questions that follow.

EMPLOYEE_ID FIRST_NAME LAST_NAME PHONE_NUMBER HIRE_DATE SALARY COMMISSION_PCT


101 Neena Kochhar 515.123.4568 21-Sep-89 17000
102 Lex De Haan 515.123.4569 13-Jan-93 17000
201 Michael Hartstein 515.123.5555 17-Feb-96 13000
114 Den Raphaely 515.127.4561 7-Dec-94 11000
145 John Russell 011.44.1344.429268 1-Oct-96 14000 0.4
146 Karen Partners 011.44.1344.467268 5-Jan-97 13500 0.3
147 Alberto Errazuriz 011.44.1344.429278 10-Mar-97 12000 0.3
148 Gerald Cambrault 011.44.1344.619268 15-Oct-99 11000 0.3
149 Eleni Zlotkey 011.44.1344.429018 29-Jan-00 10500 0.2

a. Write a query that would return the details of all employees who earn a salary
above the average salary
5 marks
b. Write a query that would return all employees who do not earn Commission. 3
marks
c. Write a query that would return only employee first _names and last_names
concatenated together with their salaries multiplied by 12 and the salary column
renamed “annual salary” 8 marks
d. Write a query that would create the structure of the table above and name it
“Employees” 4 marks

8. a. Database security is classified into System security and Database security.


Explain the meaning of each.
5 marks
b. Write a syntax using SQL for performing the following: 3 marks @
i. Creating a user
ii. Creating a “role”
iii. Granting system privileges
iv. Changing a pass word for a user
v. Granting object privileges
9. a. What does the term “Transaction” mean in SQL? 4 marks
b. The table below represents Departments that are found in a particular
Company.
DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID
10 Administration 200
20 Marketing 201
30 Purchasing 114
40 Human Resources 203
50 Shipping 121
60 IT 103
70 Public Relations 204
80 Sales 145
90 Executive 100
100 Finance 108
110 Accounting 205

i. Write a query that will add arrow DEPARTMENT_ID=200,


DEPARTMENT_NAME=”Disability”, MANAGER_ID=300 4marks
ii. Write a query to change the name of the department with department_id = 90
to “Senior Manager” 4 marks
iii. Write a query to Delete the details of the “FINANCE” department from the table
above 4 marks
iv. Write two queries one that would delete all the data from the table above and
another for removing the above table from the database 4 marks

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy