Start by understanding that a Web Application is just a dressing up “Delivery Mechanism” for a Business Domain.
Business Domain is: the BOX into which we put all the Stuff that makes our Business Work:
RULES
Algorithms
Data
Instructions
Business and Customer Records
The business domain we will implement:
Business Domain: Online Bookstore
Business Processes:
Book Inventory Management Process Group
Description:
Manage the inventory of books, including adding new books, updating existing book details, and removing books that are no longer available.
Processes: Inventory Management Process Group
Add New Book: Enter details such as title, author, genre, and price.
Update Book Details: Modify information of existing books in the inventory.
Delete Book: Remove books that are no longer available for sale.
Customer Management Process Group
Description: Manage customer information, including registration, login, and profile updates.
Processes:
Customer Registration: New customers sign up with personal information and login credentials.
Customer Login: Existing customers log in to access their account.
Update Customer Profile: Customers update their personal information and preferences.
Order Processing
Description: Order Process Group:
Handle the placement, tracking, and management of customer orders.
Processes:
Place Order: Customers select books and complete the purchase process.
Order Tracking: Customers and staff track the status of orders from placement to delivery.
Order History: Customers view their past orders and reorder if desired.
Payment Processing Process Group
Description: Manage payment transactions for book purchases.
Processes:
Initiate Payment: Customers enter payment details and complete the purchase.
Payment Confirmation: Confirm and record successful payment transactions.
Refund Process: Handle customer refunds and adjustments for canceled orders.
Review and Rating Management Process Group
Description:
Allow customers to provide feedback on books they have purchased and read.
Processes:
Submit Review: Customers write and submit reviews for books.
Rate Book: Customers provide a rating (e.g., 1 to 5 stars) for books.
View Reviews and Ratings: Display reviews and ratings for books to help other customers make informed decisions.
Database Schema
Table: customers
CREATE TABLE customers (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
email TEXT NOT NULL UNIQUE,
password TEXT NOT NULL
);
This is our dbbrowserforSqlite generated DDL:
CREATE TABLE "customers" (
"id" INTEGER,
"name" TEXT NOT NULL,
"email" TEXT NOT NULL UNIQUE,
"password" TEXT NOT NULL,
PRIMARY KEY("id" AUTOINCREMENT)
);
Table: books
CREATE TABLE books (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
author TEXT NOT NULL,
genre TEXT NOT NULL,
price REAL NOT NULL
);
Table: orders
CREATE TABLE orders (
id INTEGER PRIMARY KEY AUTOINCREMENT,
customer_id INTEGER,
order_date TEXT NOT NULL,
status TEXT NOT NULL,
FOREIGN KEY(customer_id) REFERENCES customers(id)
);