Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.93 MB, 14 trang )
<span class="text_page_counter">Trang 1</span><div class="page_container" data-page="1">
<b>VIETNAM NATIONAL UNIVERSITY </b>
<b>UNIVERSITY OF SOCIAL SCIENCES AND HUMANITIES </b>
<b>FINAL EXAM </b>
<b>TOPIC: CREATE A DATABASE TO MANAGE A GAME CENTER </b>
<b>Lecturer: TS. NGUYEN HOANG LONG Student: Nguyen Thi Kim Ly</b>
<b>Student code: 20032748 </b>
<b> Class: K65 Information Management Email: </b>
<b>Hanoi – 2023 </b>
</div><span class="text_page_counter">Trang 2</span><div class="page_container" data-page="2"><b>VIETNAM NATIONAL UNIVERSITY </b>
<b>UNIVERSITY OF SOCIAL SCIENCES AND HUMANITIES </b>
<b>FINAL EXAM </b>
<b>TOPIC: CREATE A DATABASE TO MANAGE A GAME CENTER </b>
<b>Lecturer: TS. NGUYEN HOANG LONG Student: Nguyen Thi Kim Ly</b>
<b>Student code: 20032748 </b>
<b> Class: K65 Information Management Email: </b>
<b>Hanoi – 2023 </b>
</div><span class="text_page_counter">Trang 3</span><div class="page_container" data-page="3"><b>PROBLEM: ... 4 </b>
Step 1: Analyze requirements ... 4
Step 2: ERD relational model ... 7
Step 3: Design the logic diagram ... 7
Step 4: Create Table/ Insert data/ Queries ... 10
</div><span class="text_page_counter">Trang 4</span><div class="page_container" data-page="4"><b>PROBLEM: </b>
A game center has 6 different game areas, including areas, each game area is cared for and managed by a staff member.
Each staff is responsible for selling game cards and checking customer cards.
Customers need a card to enter the game area.
Promotion of 50% off card price for customers who are students. Card prices are only reduced when customers bring a valid student card when purchasing the card.
Many game cards can have the same bill. One game card can be played in all 6 areas.
The game areas are open from 9.am to 6.pm every day of the week, with no limit on how long a customer can play during the day and no limit on the number of cards a customer can purchase in the event of a customer lost card.
Each game card can be used for a period of 3 months from the date of purchase.
After 3 months from the date of card purchase, customers need to go to the gaming area to get another card and must pay a fee to get the card.
<b>Step 1: Analyze requirements </b>
• Gaming_area: gaming_area_id, gaming_area_name, start_time, end_time
• Staff: staff_id, staff_name, phone_number, gaming_area_id • Customer: customer_id, customer_name, phone_number,
student_card_id staff_, id
• Game_card: game_card_id , expiration_date, price, staff_id, customer_id
• Bill: bill_id, customer_id, game_card_id, is_apply_voucher, total_price • Each staff will belong to one gaming area.
• Staffs will sell many game cards to many different customers.
</div><span class="text_page_counter">Trang 5</span><div class="page_container" data-page="5">• A customer can purchase game cards multiple times. • One game card can be used in all 6 game areas in the center.
<b>Request </b> v The center has 6 game areas. v An area maintained by 1 staff v Staff is responsible for selling
game cards to customers and give a bill for customer (include check valid student_card_id if customer request a voucher for game card).
<b>What types of events should the </b>
</div><span class="text_page_counter">Trang 6</span><div class="page_container" data-page="6"><b>Request </b> v One game card can be played in 6 areas
v A customer can buy game cards multiple times (lose card). v Customer receive bill when buy
</div><span class="text_page_counter">Trang 7</span><div class="page_container" data-page="7"><b>Step 2: ERD relational model </b>
<b>Step 3: Design the logic diagram </b>
<b>Gaming_area </b>
<b>Field name Data types Constraints Description </b>
</div><span class="text_page_counter">Trang 8</span><div class="page_container" data-page="8"><b>Staff </b>
<b>Field name Data types Constraints Description </b>
(225)
Not null The name of staff
Phone_number VARCHAR (20) Unique The phone number of staff
<b>Customer </b>
<b>Field name Data types Constraints Description </b>
</div><span class="text_page_counter">Trang 9</span><div class="page_container" data-page="9"><b>Game_card </b>
<b>Field name Data type Constraints Description </b>
Experition_date DATE Not Null,
<b>Bill </b>
<b>Field name Data type Constraints Description </b>
Is_apply_voucher BOOLEAN Check Indicates if a bill
</div><span class="text_page_counter">Trang 10</span><div class="page_container" data-page="10"><b>Step 4: Create Table/ Insert data/ Queries </b>
• Create Table
</div><span class="text_page_counter">Trang 11</span><div class="page_container" data-page="11">• Insert Data
</div><span class="text_page_counter">Trang 14</span><div class="page_container" data-page="14">• Queries
</div>