| Version 9 (modified by , 3 days ago) ( diff ) |
|---|
Entity-Relationship Model v.03
Entities
DESCREPTION OF THE ENTITY/RELATIONSHIP
- Attributes:
- NAME_OF_ATTRIBUTE (TYPE, Required/Optional) - DESCREPTION
1.User:
- Candidate Keys
- user_id (bigint) - primary key
- Attirbutes
- email (text)
- username (bigint)
- password (bigint)
- date_created (date)
2.Admin:
- Candidate Keys
- Attributes:
- type (text)
- employee_id (bigint)
3.Consumer
- Candidate Keys
- Attributes:
- telephone_number (text)
- shipping_address (text)
- points_collected (bigint)
4.Wishlist:
- Candidate Keys
- wishlist_id (bigint) - primary key
5.WishlistItem:
- Candidate Keys
- wishlist_id (bigint) - foreign key(Wishlist)
- product_id (bigint) - foreign key(Product)
- Attributes:
- added_at (date)
6.Product:
- Candidate Keys
- product_id (bigint) - primary key
- Attributes:
- format (enum)
- price (bigint)
- description (text)
- stock (bigint)
7.Release:
- Candidate Keys
- release_id (bigint) - primary key
- Attributes:
- title (text)
- record_label (text)
- genre (text)
- release_date (date)
- cover_photo (text)
8.Album:
- Candidate Keys
9.Single:
- Candidate Keys
- duration (text)
10.Artist:
- Candidate Keys
- artist_id (bigint) - primary key
- Attributes:
- artist_name(text)
- description(text)
- photo (text)
11.Song:
- Candidate Keys
- song_id(bigint) - primary key
- Attributes:
- song_name(text)
- featured_artist (text)
- duration (text)
12.OrderItem:
- Candidate Keys
- order_id (bigint) - foreign key(Order)
- product_id (bigint) - foreign key(Product)
- Attributes:
- price_at_purchase (bigint)
- quantity (bigint)
13.Order
- Candidate Keys
- order_id (bigint) - primary key
- Attributes:
- payment_method (enum)
- purchase_date (date)
- points (bigint)
Relationships
- 1.contains (Album ↔ Song, M:N) Each Album contains Songs, while the same Song can be in multiple albums.
- 2.has (Release ↔ Artist, M:N) Each Artist has multiple releases.
- 3.version of (Release ↔ Product, 1:N) Each Release can be a different Product.
- 6.creates (Order ↔ User, N:1) Each User can create multiple Orders.
- 7.creates (Admin ↔ Product, 1:N) Each Admin can create multiple Products.
- 8.modifies (Admin ↔ Product, M:N) Each Admin can modify multiple Products.
- 9.has (Consumer ↔ Wishlist, 1:1) Each Consumer can have a Wishlist
- 10.has (Wishlist ↔ WishlistItem, 1:N) Each Wishlist can contain multiple WishlistItems.
- 11.refers (Wishlist ↔ Product, M:N) Every Product can be a WishlistItem.
Entity-Relationship Model History
List of each version, with a one-sentence explanation of the changes in each version, i.e. what was corrected in that version compared to the previous one. If you made the correction at the request of the teacher/assistant based on a ticket posted in the system, you can link to the ticket instead of an explanation.
Attachments (6)
- ERModel_v01.xml (47.7 KB ) - added by 2 days ago.
- ERModel_v01.png (185.9 KB ) - added by 2 days ago.
- ERModel_v02.png (176.6 KB ) - added by 2 days ago.
- ERModel_v02.xml (46.5 KB ) - added by 2 days ago.
- ERModel_v03.png (171.6 KB ) - added by 28 hours ago.
- ERModel_v03.xml (53.4 KB ) - added by 28 hours ago.
Download all attachments as: .zip
Note:
See TracWiki
for help on using the wiki.

