| 6 | | This phase presents the logical and physical design of the database based on the ER model from Phase P1. |
| 7 | | The ER model was transformed into a relational schema using partial transformation. |
| 8 | | All entities and relationships were mapped into relational tables with clearly defined primary keys, foreign keys, and constraints. |
| 9 | | The schema reflects the updated ER model, including the 1:1 relationship between Wedding and Church, without a separate Church_booking entity. |
| | 6 | In this phase, the ER model from Phase P1 was transformed into a relational schema using partial transformation. |
| | 7 | All entities and relationships were mapped into relational tables with defined primary keys, foreign keys, and integrity constraints. |
| | 8 | The schema is aligned with the updated ER model, including the 1:1 relationship between Wedding and Church (implemented through a UNIQUE foreign key in Church). |
| 13 | | User(user_id PK, first_name, last_name, email UNIQUE, phone_number, gender, birthday) |
| 14 | | Wedding(wedding_id PK, date, budget, notes, user_id FK) |
| 15 | | Event(event_id PK, event_type, date, start_time, end_time, status, wedding_id FK) |
| 16 | | Guest(guest_id PK, first_name, last_name, email, wedding_id FK) |
| 17 | | Event_RSVP(response_id PK, status, response_date, guest_id FK, event_id FK) |
| | 12 | |
| | 13 | User(user_id PK, first_name, last_name, email UNIQUE, phone_number, gender, birthday) |
| | 14 | Wedding(wedding_id PK, date, budget, notes, user_id FK) |
| | 15 | Church(church_id PK, name, location, contact, wedding_id FK UNIQUE) |
| | 16 | Priest(priest_id PK, name, contact, church_id FK) |
| | 17 | Venue_Type(type_id PK, type_name) |
| | 18 | Venue(venue_id PK, name, location, city, address, capacity, menu, phone_number, price_per_guest, type_id FK) |
| | 19 | Venue_Booking(booking_id PK, date, start_time, end_time, status, price, venue_id FK, wedding_id FK) |
| | 20 | Photographer(photographer_id PK, name, email, phone_number, price_per_hour) |
| | 21 | Photographer_Booking(booking_id PK, date, start_time, end_time, status, photographer_id FK, wedding_id FK) |
| | 22 | Band(band_id PK, band_name, genre, equipment, phone_number, price_per_hour) |
| | 23 | Band_Booking(booking_id PK, date, start_time, end_time, status, band_id FK, wedding_id FK) |
| | 24 | Event(event_id PK, event_type, date, start_time, end_time, status, wedding_id FK) |
| | 25 | Guest(guest_id PK, first_name, last_name, email, wedding_id FK) |
| | 26 | Event_RSVP(response_id PK, status, response_date, guest_id FK, event_id FK) |
| 19 | | Venue(venue_id PK, name, location, city, address, capacity, menu, phone_number, price_per_guest, type_id FK) |
| 20 | | Venue_Type(type_id PK, type_name) |
| 21 | | Venue_booking(booking_id PK, date, start_time, end_time, status, price, venue_id FK, wedding_id FK) |
| 22 | | Photographer(photographer_id PK, name, email, phone_number, price_per_hour) |
| 23 | | Photographer_booking(booking_id PK, date, start_time, end_time, status, photographer_id FK, wedding_id FK) |
| 24 | | Band(band_id PK, band_name, genre, equipment, phone_number, price_per_hour) |
| 25 | | Band_booking(booking_id PK, date, start_time, end_time, status, band_id FK, wedding_id FK) |
| 26 | | Church(church_id PK, name, location, contact, wedding_id FK UNIQUE) |
| 27 | | Priest(priest_id PK, name, contact, church_id FK) |