0% found this document useful (0 votes)
14 views

Database Level IV practical exam (2)

Uploaded by

Eyachew Tewabe
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Database Level IV practical exam (2)

Uploaded by

Eyachew Tewabe
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Database Level IV exam

Suppose you are a database administrator in an ABC trader’s company and assigned to create a
database that manages Customer and orders information.

1. Create the following Customer and order information on Microsoft Excel by using table as it is
indicated below and save it by the name ABC trader’s DB.

id company First Last Job title Order id Order status


name name date
C001 Company hana berhe owner O00 4/25/2006 new
a
C002 Company antene getachew owner O001 4/25/2006 new
b
C003 Company thomas alebache Representative O002 6/23/2006 closed
c
C004 Company cheriu legese manager O003 6/5/2006 closed
d
C005 Company maritu abebe owner O004 6/5/2006 closed
e
C006 Company freweyni petros manager O005 6/5/2006 closed
f
C007 Company meriem ahmed owner O006 6/8/2006 closed
g
C008 Company elizabet andargea representative O007 6/5/2006 closed
h
C009 Company senait mekonen Purchasing O008 6/7/2006 closed
i manager
C010 Company rosa werku Purchasing O009 5/24/2006 new
j manager

Database Level IV
exam
Suppose you are a
database
administrator in an
ABCtrader’s
company and
assigned to create a
database that
manages
Customer and orders
information.
1. Create the
following Customer
and order information
on
Microsoft Excel by
using table as it is
indicated below and
save it by the name
ABCtrader’s_DB.
2. Import the above table which is created in Excel to a Microsoft Access database and save it as
ABCtrader’s_DB2.

3. Normalize the imported table ABCtrader’s_DB2 in its Appropriate Normal Form and save the derived
tables by any name you like.

4. Create a relationship for the normalized tables and save it by the name ABC trader’s DB relationship

Project2: Generating a report from a Database. Time allotted (1:15hr) The main tasks of the project:

Open Microsoft query analyzer

Write a SQL statement, run and save it.

Competencies covered

ICT DBA4 05 0811Apply Object-Oriented Programming Language Skills

ICT DBA4 06 0811Use Advanced Structured Query Language

ICT DBA4 08 0811Perform Database System Test


Note that : You should use the Diagrams in Enterprise Manager of SQL server to view a diagram of the
pubs database, to see what the relationships are between the tables used in the queries below, so that
you know what fields to join on.

1. Open the Pubs database in Enterprise Manager.

2. Open the Query Analyzer, and ensure that it is open in the Pubs database.

3. Run queries to find out the following information.

Task 1. Suppose you are a database administrator of the Pub company. The company needs the
list of titles showing the publisher and author (or authors) for each title .Write

A SQL statement that generates the list having the fields title id,title, author_id, author_fname,
author_lname from the Pub database. Execute and save the query by the name Auth_title

Task 2. Suppose you are a database administrator of the Pub company. Write a SQL statement using
the Pub database that add the Publishers table to the Auth_title query. Execute and save the query by
the name Pub_ Auth_title.

Task 3. The list of Stores with their discounts is demanded by customers of the Pub company.
Write a SQL statement that generates this list of stores that also shows any discounts each store has. If
a store does not have a discount, the store should still appear in the list (tables to use are stores and
discounts). Execute and save the query by the name store_dsnt

Task 4. Using Aggregate Functions and Group By, Write a SQL statement to

Task 4.1. Get a list of all the different types there are for Titles

Task 4.2. Find out how many book Titles there are for each type (hint – use Count)

Task 4.3. Find the minimum and maximum Title price in each type

Task 4.4. Find the total value of the sales for each Title. (hint – the price for a Title is in the titles table,
the sales table holds all the orders and each order has a quantity; this query will use a join and an
aggregate function and group by)

Project 3: Appling Security on Microsoft SQL Server. Time allotted (1:00 hr)

The main tasks of the project:

Changing the authentication method of the server

Creating a login and database user account

Creating a role
Giving a privilege to a role

Perform the following administrative tasks on the MS-SQL server using Enterprise Manager.

Task 1. Configure the authentication method of the server to be Mixed Mode (SQL Server and Windows)

Task 2. Create SQL login account by name zazu and password 1234.

Task 3. In the Pub database, create a user called zazu by the login account zazu that is already created
on question #2.

Task 4. In the Pub database, create a role called ICT and add the user zazu in this role.

Task 5. Allow SELECT permission for the role ICT on the Publisher table.

Task 6. Deny Delete, update permission for the role ICT on the Publisher table.

You might also like