| Version 11 (modified by , 2 days ago) ( diff ) |
|---|
Relational Design
Notation:
- Primary keys - underlined with bold lettering
- Foreign keys - marked with a * after the key name
- Required attributes - bold lettering
Tables
- USER (user_id, username, email, password, date_created, shipping_address, telephone_number)
- ADMIN (user_id*[USER], type, discount_percentage)
- CONSUMER (user_id*[USER], points_collected)
- WISHLIST (wishlist_id, user_id*[USER])
- WISHLIST_ITEM (wishlist_id, product_id[PRODUCT], added_at)
- PRODUCT (product_id, release_id*[RELEASE], price, format, description, stock)
- RELEASE (release_id, title, release_date, genre, cover_photo, record_label)
- ALBUM (release_id*[RELEASE])
- SINGLE (release_id*[RELEASE], duration)
- SONG (song_id, song_name, duration)
- ORDER (order_id, user_id*[USER], purchase_date, status, payment_method, points_earned, points_used)
- ORDER_ITEM (order_id*[ORDER], product_id*[PRODUCT], quantity, price_at_purchase)
- ARTIST (artist_id, artist_name, photo, description)
- MODIFICATION (modification_id, user_id*[ADMIN], date_modified, type_of_modification, discount)
- MODIFICATION_PRODUCT (modification_id*[MODIFICATION], product_id*[PRODUCT])
- RELEASE_ARTIST (release_id*[RELEASE], artist_id*[ARTIST])
- ALBUM_SONG (album_id*[ALBUM], song_id*[SONG])
- SONG_ARTIST (song_id*[SONG], artist_id*[ARTIST])
DDL script for creating the database schema and objects:
DML script for filling tables with data:
Relational Diagram
Attachments (9)
- ddl-v1.sql (5.6 KB ) - added by 9 days ago.
- dml-v1.sql (9.7 KB ) - added by 9 days ago.
- relational_schema.png (54.8 KB ) - added by 9 days ago.
- ddl-v2.sql (6.0 KB ) - added by 7 days ago.
- dml-v2.sql (9.8 KB ) - added by 7 days ago.
- relation-v2.png (56.9 KB ) - added by 7 days ago.
- ddl-v3.sql (5.9 KB ) - added by 37 hours ago.
- dml-v3.sql (9.8 KB ) - added by 37 hours ago.
- relation-v3.png (58.9 KB ) - added by 37 hours ago.
Download all attachments as: .zip
Note:
See TracWiki
for help on using the wiki.

