Mark As Completed Discussion

Cellphone shop database

This would be a kind of an online-shop database, specialized for cellphones and accessories.

The products sold will be different models of cellphones, earphones, phone cases, chargers, and any other type of cellphone accessories. The user can purchase a product, and therefore will receive an invoice for the purchase. The users should be registered in the system, thus should have a separate table for them.

The database should have data like the following:

  • User data: name, surname, date of birth, email, address, phone number
  • Products: category, model, color, name, year, brand, items available, price
  • Product specs: CPU, screen, battery, RAM memory, internal storage, slots, etc..
  • Invoices: date of purchase, userId, productId, price, payment type, shipping address, etc. Query examples:
  1. Find all the Samsung phones, cheaper than $799 with RAM memory of 4GB.

  2. Find all the phones with a 6-inch screen that have been released after 2019.

The data should be structured like in the following simplified ER diagram:

Cellphone shop database