Database Management System
CSE · Quiz · Spring 26
Paper 2 of 8By Md. Ferdous Foysal Hridoy (2)Switch
Paper 2 of 8
Read the questions as text
Read off the PDF by AI, so it may have mistakes. The PDF is the original.
Quiz 1
A Smart Online Grocery Delivery System manages customers, stores, products, orders, riders, payments, and feedback in a single platform.
When a customer registers, the system assigns a unique CustomerID. For each customer, the system stores full name, email, date of birth, gender, and at least one phone number (some customers may have multiple phone numbers). The system also stores the customer's delivery address consisting of house number, road, area, city, and postal code.
The platform partners with grocery stores. Each store has a unique StoreID. For each store, the system stores store name, store type (super shop/pharmacy/mini-mart), location, and contact number. A store may exist in the system even if it currently has no active orders.
Each store lists products. Each product has a unique ProductCode and belongs to exactly one store. For each product, the system stores product name, category, unit price, stock quantity, and availability status. A product cannot exist without a store.
Customers place orders. Each order has a unique OrderID and order date-time. A customer may place many orders, but each order belongs to exactly one customer. An order must include at least one product. For each ordered product, the system stores quantity and the unit price at the time of order.
The system supports discount coupons. Each coupon has a unique CouponCode, discount type (flat/percent), discount value, and expiry date. A coupon may be applied to many orders, but an order may apply at most one coupon (some orders use no coupon).
The platform employs riders (delivery persons). Each rider has a unique RiderID. For each rider, the system stores full name, phone number, vehicle type, and driving license number. A rider may deliver many orders, but each order is delivered by only one rider. Some orders may be pending, cancelled, or delivered. For each order, the system stores order status, delivery time (if delivered), and customer rating for delivery (optional).
The system handles payments. Each payment has a unique PaymentID. For each payment, the system stores payment date-time, amount, payment method (cash/card/mobile banking), and payment status (paid/failed/pending). A payment cannot exist unless the related order exists, but an order may exist without a payment (cash on delivery or pending).
Customers can also submit store feedback. Each feedback has a unique FeedbackID, feedback date, rating, and comment. Feedback cannot exist unless both the customer and the store exist. A customer may give feedback to the same store multiple times on different dates.