You are on page 1of 10

Nama : Muhammad Alfarezy Cannavaro

Kelas : INFORMATIKA B’20


NIM : 2009106055

TUGAS PRACTICE BASIS DATA


Business Rules
Section 1 Lesson 4 – Section 2 Lesson 3
Section 1 Lesson 4
No Case Scenario Business Rules Constraint
1 LibBook is a successful digital library that 1.Members Will 1.Members can belong to one
rents CDs and provides access to Internet Pay membership
of the three types of
for browsing their repository of articles fees
and magazines. With the growing membership
business, LibBook needs to enhance their (Student,Individual,Corporate)
information system to support proposed
changes to the business. LibBook attracts 2. Student
new members easily and the number of membership is 2. Type of membership can
members is growing rapidly. The free. Individual be changed only if
membership base is not stable, however, and Corporate sufficient justification is
which is a cause for concern. The main memberships provided
idea is to introduce the concept of incur a fee
membership at LibBook. Members will pay
a membership fee and initially, there will
be three types of membership (corporate,
student, individual) although more may be
introduced later. Student membership is
free. Corporate and Faculty memberships
incur a fee but entitle the member to
privileges. The type of membership can be
changed only if sufficient justification is
provided.

2 Star Care hospital is a multi-specialty 1.The hospital 1.Every doctor registered


hospital that caters to needs of different ensures that the with this hospital is assigned
patients. Every doctor registered with doctors associated a unique ID that starts with
this hospital is assigned a unique ID with them have a the letter "DC"
that starts with the letter "DC". The minimum of seven
years of working
hospital ensures that the doctors experience
associated with them have a minimum
of seven years of working experience. 2.When a patient 2.Every patient is required
Every patient is required to register arrives, a unique to register with the hospital
with the hospital on their first visit. patient number on their first visit
When a patient arrives, a unique starting with the
patient number starting with the letters letters "PT" is
"PT" is assigned to him/her. assigned to
him/her
Section 2 Lesson 1

1) Identify the possible tables and associated fields from the given scenario:
Book.com is an online virtual store on the Internet where customers can browse the
catalog and select products of interest.
a. Every book has a title, ISBN, year and price. The store also keeps the author and
publisher for any book.
Answer :
Possible tables and associated fields :
Column Name Data Types
Book_ID VARCHAR2
Book_Name VARCHAR2
Price NUMBER
Author_ID VARCHAR2
Publisher_ID VARCHAR2

b. For authors, the database keeps the name, address and the URL of their homepage.
Answer :
Possible tables and associated fields :
Column Name Data Types
Author_ID VARCHAR2
Author_Name VARCHAR2
Author_Address VARCHAR2
Author_URL VARCHAR
c. For publishers, the database keeps the name, address, phone number and the URL
of their website.
Answer :
Possible tables and associated fields :
Column Name Data Types
Publisher_ID VARCHAR2
Publisher_Name VARCHAR2
Publisher_Address VARCHAR2
Publisher_URL VARCHAR
Publisher_Phone_Number NUMBER

d. The store has several warehouses, each of which has a code, address and phone
number.
Answer :
Possible tables and associated fields :
Column Name Data Types
Warehouse_Code NUMBER
Warehouse_Address VARCHAR2
Warehouse_Phone NUMBER

e. The warehouse stocks several books. A book may be stocked at multiple


warehouses.
Answer :
Possible tables and associated fields :
Column Name Data Types
Warehouse_Code NUMBER
Warehouse_Book_Stock NUMBER
f. The database records the number of copies of a book stocked at various warehouses.
Answer :
Possible tables and associated fields :
Column Name Data Types
Warehouse_Code NUMBER
Book_ID VARCHAR2
Book_Quantity NUMBER

g. The bookstore keeps the name, address, email-id, and phone number of its
customers.
Answer :
Possible tables and associated fields :
Column Name Data Types
Customer_Name VARCHAR2
Customer_Address VARCHAR2
Customer_Email VARCHAR2
Phone NUMBER
Customer_ID VARCHAR2

h. A customer owns several shopping carts. A shopping cart is identified by a


Shopping_Cart_ID and contains several books.
Answer :
Possible tables and associated fields :
Column Name Data Types
Shopping_Cart_ID NUMBER
Book_ID VARCHAR2
Date DATE
Quantity NUMBER
i. Some shopping carts may contain more than one copy of same book. The database
records the number of copies of each book in any shopping cart.
Answer :
Possible tables and associated fields :
Column Name Data Types
Order_ID NUMBER
Customer_ID VARCHAR2
Shipping_Type VARCHAR2
Date_of_Purchase DATE
Shopping_Cart_ID NUMBER

j. At that time, more information will be needed to complete the transaction. Usually,
the customer will be asked to fill or select a billing address, a shipping address, a
shipping option, and payment information such as credit card number. An email
notification is sent to the customer as soon as the order is placed.
Answer :
Possible tables and associated fields :
Column Name Data Types
Credit_Card_Number VARCHAR2
Credit_Card_Type VARCHAR2
Expiry_Date DATE

2) ABC Ltd plans to computerize its sales ordering and stock control system. A feasibility
study has strongly suggested that a relational database system be installed. The details
of ABC's sales and stock control are as follows:
a. Customers send in orders for goods. Each order may contain requests for variable
quantities of one or more products from ABC's range. ABC keeps a stock file
showing for each product the product details and the preferred supplier, the quantity
in stock, the reorder level and other details.
b. ABC delivers those products that it has in stock in response to the customer order
and an invoice is produced for the dispatched items. Any items that were not in
stock are placed on a back order list and these items are usually re-ordered from the
preferred supplier. Occasionally items are ordered from alternative sources.
c. In response to the invoices that are sent out to ABC's customers, the customers send
in payments. Sometimes a payment will be for one invoice, sometimes for part of
an invoice and sometimes for several invoices and part-invoices.
d. Identify the tables and associated fields from the above scenario.
Answer :
Possible tables and associated fields based on the scenario:
1) Table Name : Customers
Column Name Data Types
Customer_ID VARCHAR2
Customer_Name VARCHAR2
Street_Address VARCHAR2
City VARCHAR2
Phone_Number VARCHAR2

2) Table Name : Orders


Column Name Data Types
Order_ID NUMBER
Customer_ID NUMBER
Product VARCHAR2
Quantity NUMBER
Preferred_Supplier VARCHAR2

3) Table Name : Payments


Column Name Data Types
Amount VARCHAR2
Payment_Type VARCHAR2
Customer_ID NUMBER

4) Table Name : Backorderlists


Column Name Data Types
Order_Name VARCHAR2
Quantity VARCHAR2
5) Table Name : Stock Files
Column Name Data Types
Product_Details VARCHAR2
Preferred_Supplier VARCHAR2
Quantity_in_stock NUMBER
Reorder_Level VARCHAR2
Other_Details VARCHAR2

6) Table Name : Suppliers


Column Name Data Types
Supplier_ID NUMBER
Supplier_Name VARCHAR2
Address VARCHAR2
Section 2 Lesson 2
1.Provide five reasons for creating a conceptual data model.
Answer:
1.Describe Information the company needs.
2.Facilitates discussion.
3.Prevents mistakes and misunderstanding.
4.Forms ideal situation documentation.
5.Forms sound basic for physical database design.

2.List two examples of conceptual models and physical models.

Answer:

 Example for Conceptual Model


*Example For Physical Model

d pesan t
hp varchar{1024)
isi varchar{1024)
status varchar{1024)
Section 2 Lesson 3
1.Identify and create the entities for school management system

2.Add the Appropriate attributes as well as optionally (*, °) to all entities of the academic database.

You might also like