Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program that connects to the database for the business below: For my Database Design Project, I've chosen a fictional business named GadgetGrove Electronics,
Write a program that connects to the database for the business below:
For my Database Design Project, I've chosen a fictional business named "GadgetGrove Electronics," a retail store specializing in the latest tech gadgets and electronic devices. The business aims to provide customers with a seamless shopping experience and personalized recommendations based on their preferences. GadgetGrove Electronics maintains a diverse product inventory, ranging from smartphones and laptops to smart home devices.
Scenario: GadgetGrove Electronics employs a database system to manage its extensive product catalog, customer information, and inventory. The database plays a crucial role in tracking sales, analyzing customer preferences, and optimizing stock levels. Customers can create accounts to receive personalized recommendations and track their purchase history.
Business Rules:
Each product in the inventory must have a unique identification code.
Customers must register with valid contact information to create an account.
Products can have multiple variants eg different colors or storage capacities
The database must track the quantity of each product in stock.
Discounts and promotions are applied based on customer loyalty and purchase history.
Customers can add products to their shopping cart and proceed to checkout.
The system must record sales transactions, including date, time, and purchased items.
Suppliers are tracked in the database, including contact details and supplied products.
Staff members have unique login credentials for accessing the system.
The system generates reports on popular products, sales trends, and stock levels.
Entities and Relationships:
Product Entity: Attributes include product ID name, price, and variant.
Customer Entity: Attributes include customer ID name, contact information, and purchase history.
Inventory Entity: Attributes include product ID quantity in stock, and reorder status.
Transaction Entity: Attributes include transaction ID date, time, and purchased items.
Supplier Entity: Attributes include supplier ID name, contact information, and supplied products.
Staff Entity: Attributes include staff ID name, and login credentials.
Relationships:
OnetoMany relationship between Product and Inventory One product can have multiple inventory entries
OnetoMany relationship between Customer and Transaction One customer can have multiple transactions
ManytoMany relationship between Product and Transaction One transaction can involve multiple products, and one product can be part of multiple transactions
OnetoMany relationship between Supplier and Product One supplier can provide multiple products
OnetoMany relationship between Staff and Transaction One staff member can handle multiple transactions
This database design will facilitate efficient operations for GadgetGrove Electronics and enhance the overall customer experience.e program will be a text menu based application that allows someone to manipulate and access the data in your database. Your program should meet the following criteria.
menu options for Adding, Updating, and Removing data
Each menu should lead to a submenu where you will specify the table to add, update, or delete from
You should prompt for the information needed to perform the add, update, or delete.
You should not take direct entry of sql from the user.
transaction menu option that executes multiple sql statements example adding an invoice to SaleCo
At least menu options that retrieve data from the database.
All programs should have the header documentation listed above as well as inline comments throughout the code.
To submit your assignment:
Submit your source code file cpp
Your sqlite db file for your business
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started