Here is a sample relational schema design for a travel booking system
CUSTOMER (customer_id PK, name, email, phone)
BOOKING (booking_id PK, customer_id FK, trip_id FK
booking_date, booking_status, number_of_passengers, total_price )
TRIP ( trip_id PK, destination_id FK, accommodation_id FK,
departure_date, return_date, trip_name, description, itinerary )
DESTINATION ( destination_id PK, country, city, region)
ACCOMMODATION (accommodation_id PK, hotel_name, address, room_type, star_rating )
PAYMENT (payment_id PK, booking_id FK, payment_date, float amount, payment_method)
PK = Primary Key, FK = Foreign Key
Write SQL Statements for following use-cases:
1. List all customers who have booked travel to 'London'
2. List destinations with 4-star accommodations
3. List customers who have booked their travel using payment method "Credit Card" and whose amount is more than 100,000
Explain the steps in Relation Database Schema Design with a brief explanation of activities in each step.
A Project relational algebra operator removes duplicates while returning results
Identify problems in the given relational schema design and how will you fix them?
Write the problems you have identified and then Write down your new schema design. (Just the table names and attributes is fine)
Restaurant Name | Franchise Name | Franchise Head Quarter | Timing | Phone No. | Location | Owner | Dish Name | Dish Type (Breakfast / Lunch / dinner) | Payment Accepted (Cash / Online) |
It is not possible to convert a E-R Diagram or model to a relational schema, without normalization.
In relational schema design, explain the anomalies caused by redundant data with a good example of each.
A Lossless join and Dependency Preserving Decomposition means...
A Candidate key is a Subset of Super key
Color dels pantalons del profe