You are on page 1of 4

Part 1

1. Identify the record relationship between the following pairs of entities (If you
write a few examples of data, it makes it easier to answer, check/show the
relationship in both direction)
 Many-to-many relationship in Student Course selection, a student may have taken one course as
well as a course can have many students enrolled into it. For Example: Students can register only
one course also they are able to register many courses at a time. On the other side, a specific
course have many students registered in it.
 One-to-many, In this case a student can have membership of different clubs at a time. A club
contain many members. For example, a student can be a member of more than one clubs.
 One-to-many, a customer can have many invoices of many products, but a product cannot have
more than one owner. For Example, a customer buys some goods and invoice is generate for
those goods. There can be more than one invoice for goods purchased by one customer.

2. Assume ORACLE can do whatever a good DBMS is supposed to do. Compare


Access, Excel and Oracle, and recommend one for a small company. (Hint: Use
your definition/functions of DBMS, write the criteria, and compare.)
The criteria Oracle Excel Access
(functions of a
DBMS)
Data storage Automatic Storage It saves data in the It uses the
management Management (ASM) provides, it form of spreadsheets, Microsoft Jet
simplify the management of work sheets. Data is Database Engine
database data file, control files store in the form of and comes as a
as well as make a log of files. text, Numbers etc. part of the
It uses quires to edit, Delete or It has a simple process Microsoft Office
add data. for editing, adding or suite of
removing data. application.
It performs the
function of a
database and
provide as easy to
navigate screen.
Data transformation It performs data Excel released a new It stores data in
and presentation transformation and add-in transformation Data warehouse
presentation using data data by Example. using ETL
mapping. Data Mapping This add-in will allow to (Extraction,
provides a pathway to data and quickly Transform and
then a read ode can be standardizing time, Loading).
generated to actually transform dates, names, postal
the data. addresses and email
addresses etc.
Provide an example to
excel and your task will
complete
automatically.
Transaction In Oracle, A transaction begins Excel can perform basic MS-Access
management with one statement and ends steps like; Apply cell environment does
when it is committed. borders, Apply cell not allow any
It can either use a COMMIT or a shading, Use AutoSum object
ROLLBACK statement. to add your data, modification.
It can also be commit or roll Create a simple it turns
back using a DDL Statement. formula etc. automatically into
a kind of exclusive
mode.
To make it stabe
It uses VBA
module. It
processes a given
file in order to
load its records in
a table in the
database.
Database access It uses C, C++, Java, COBOL, Microsoft Excel it uses Microsoft Access.
languages and PL/SQL, and Visual Basic. VBA It uses Microsoft
application Applications for database are: VBA.
programming  Oracle Universal Visual Basic 6.0
interfaces Installer (OUI) ... (VB6)
 Database Configuration
Assistant (DBCA) ...
 Database Upgrade
Assistant. ...
 Oracle Net Manager. ...
 Oracle Enterprise
Manager

Backup and Recovery Manager as well as To recover a workbook No definitive


recovery user-managed backup and of excel, It just solution to avert
management recovery. These tools are used required to go to data loss.
in Oracle to recover and backup recent files and recover Should back-up
the data. from them. on time to
Recovery Manager (RMAN) is prevent the data
an Oracle utility, which is used loss.
to back up, restore, and
recover database files.
Multiuser access Users and applications can In Excel, Setting of a file It consist of two
control connect to Oracle Database in can be changed to only type of users;
these distinct ways (and more): used by user, it can Users and
 As a database user also lock users to Administrators.
 As a Kerberos user perform chages in data User can just see
 As an LDAP user set. the record or add
 As an application user the records.
Administrator can
add, Modify or
remove any
record.
3. Write a few examples of data for understanding, and then write the SQL
Statements to retrieve data for the following queries. (You don't have to use
Access, just write the statements here)
a. Show all the information about SELECT * FROM Customer
customers
b. Show all purchase Information select customer.Name
from Customer customer
join ( select ID_cust
from Goods_Purchase
group by ID_cust
having count(distinct Goods_No) = (select
count(*) from Goods)
) d on customer.ID_cust = d.ID_cust

c. Show the Name and address of all SELECT customer.address


customers who live in S.F. Customer.Name,Customer.city
FROM table(Customer)
WHERE customer.city=S.F;
d. Show all the information for the SELECT * FROM Customer
members who are in 510 area code WHERE add_code=510;
e. Show the Product ID's and the amount SELECT Goods_ID, cust_account
for customer whose phone is: "555 1234" FROM Customer
WHERE phone=555 1234;
f. Show all the Products that Salesman Joe select * from goods where name='Joe Brown' and
Brown sold; his code is: JB code='JB'
g. Show the information for customers who SELECT * FROM Customer
have purchased more that $5000 (so far) WHERE purchase=5000;
h. Show the phone numbers of the best select phone_no from customer where
customers (define it as having Year to year_to_date>15000
Date of more than $15,000)

Part2
1. What are entities?
There are three entities of this data set.

 Order
 Buyer
 Product
2. Identify the attributes for each entity, and the Primary key for each entity (write
attributes under each entity.

Buyer Product Order

Id Product Name Sold to

Name Code Date

Address Color Price

Phone no. Description

3. Write a dictionary for each entity.


For Buyer

Table Column Data Type


Buyer Id Int
Buyer Name nvarchar(50)
Buyer Address nvarchar(50)
Buyer Phone int
For Product

Table Column Data Type


Product Product Name Nvarchar(50)
Product Code Int
Product Color Nvarchar(50)
Product Description nvarchar
For Order

Table Column Data Type


Order Sold to Nvarchar(50)
Order Date Date
order Price int

You might also like