wiki:ERModel

Version 4 (modified by 231241, 3 days ago) ( diff )

--

Entity-Relationship Model v.02

A full-page width image in PNG format of the latest version of the diagram (ERModel_vNN.png)

Entities

List all entities and relationships with the following information for each of them

Entity/relationship name: one paragraph of explanation, what does the entity/relationship represent, why it is needed, why is it modeled the way it is

Candidate keys: If you have multiple candidates for the primary key, list them and explain which one you chose as the primary key and why you chose it as the primary key

List of entity attributes, for each of them: the data type (numeric/text/date/…) and whether there are any restrictions in the input form/format (required/optional, special format, value interval, …)

NAME OF ENTITY/RELATIONSHIP

DESCREPTION OF THE ENTITY/RELATIONSHIP

  • 1.User:
    • user_id (bigint) - primary key
    • email (text)
    • username (bigint)
    • password (bigint)
    • date_created (date)
  • 2.Admin:
    • type (text)
    • employee_id (bigint)
  • 3.Consumer:
    • telephone_number (text)
    • shipping_address (text)
    • points_collected (bigint)
  • 4.Wishlist:
    • wishlist_id (bigint) - primary key
  • 5.WishlistItem:
    • wishlist_id (bigint) - foreign key(Wishlist)
    • product_id (bigint) - foreign key(Product)
    • added_at (date)
  • 6.Product:
    • product_id (bigint) - primary key
    • format (enum)
    • price (bigint)
    • description (text)
    • stock (bigint)
  • 7.Release:
    • release_id (bigint) - primary key
    • title (text)
    • record_label (text)
    • genre (text)
    • release_date (date)
    • cover_photo (text)
  • 8.Album:
  • 9.Single:
    • duration (text)
  • 10.Artist:
    • artist_id (bigint) - primary key
    • artist_name(text)
    • description(text)
    • photo (text)
  • 11.Song:
    • song_id(bigint) - primary key
    • song_name(text)
    • featured_artist (text)
    • duration (text)
  • 12.OrderItem:
    • order_id (bigint) - foreign key(Order)
    • product_id (bigint) - foreign key(Product)
    • price_at_purchase (bigint)
    • quantity (bigint)
  • 13.Order:
    • order_id (bigint) - primary key
    • 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
  • 11.refers (Wishlist ↔ Product, M:N) Every Product can be a WishlistItem.

List all entities and relationships with the following information for each of them

Entity/relationship name: one paragraph of explanation, what does the entity/relationship represent, why it is needed, why is it modeled the way it is

Candidate keys: If you have multiple candidates for the primary key, list them and explain which one you chose as the primary key and why you chose it as the primary key

List of entity attributes, for each of them: the data type (numeric/text/date/…) and whether there are any restrictions in the input form/format (required/optional, special format, value interval, …)

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)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.