 	PRIMARY KEY (accountId)
 );
 
-CREATE TABLE category (
-	categoryId      		INT UNSIGNED AUTO_INCREMENT NOT NULL,
-	categoryName  			VARCHAR(20) NOT NULL,
-	PRIMARY KEY (categoryId)
+CREATE TABLE purchase (
+	purchaseId     					INT UNSIGNED AUTO_INCREMENT NOT NULL,
+	purchaseBuyerId  					INT UNSIGNED NOT NULL,
+	purchasePayPalTransactionId	INT UNSIGNED NOT NULL,
+	purchaseCreateDate 				DATETIME NOT NULL,
+	INDEX (purchaseBuyerId),
+	FOREIGN KEY (purchaseBuyerId) REFERENCES account(accountId),
+	PRIMARY KEY (purchaseId)
+);
+
+CREATE TABLE product (
+	productId      		INT UNSIGNED AUTO_INCREMENT NOT NULL,
+	productAccountId  	INT UNSIGNED NOT NULL,
+	productImageId 		INT UNSIGNED,
+	productAdminFee 		DECIMAL UNSIGNED NOT NULL,
+	productDescription   VARCHAR(255) NOT NULL,
+	productPrice			DECIMAL UNSIGNED NOT NULL,
+	productShipping   	DECIMAL UNSIGNED NOT NULL,
+	productSold				BOOLEAN DEFAULT 0,
+	productTitle			VARCHAR(50) NOT NULL,
+	INDEX (productAccountId),
+	INDEX (productImageId),
+	FOREIGN KEY (productAccountId) REFERENCES account(accountId),
+	FOREIGN KEY (productImageId) REFERENCES image(imageId),
+	PRIMARY KEY (productId)
 );
 
 CREATE TABLE feedback (

	FOREIGN KEY (feedbackProductId) REFERENCES product(productId),
	FOREIGN KEY (feedbackSellerId) REFERENCES account(accountId),
	PRIMARY KEY (feedbackId)
);

CREATE TABLE image (
	imageId     			INT UNSIGNED AUTO_INCREMENT NOT NULL,
	imageFileName  		VARCHAR(64) NOT NULL,
	imageType				VARCHAR(5) NOT NULL,
	UNIQUE (imageFileName),
	PRIMARY KEY (imageId)
);

CREATE TABLE message (

DROP TABLE IF EXISTS productPurchase;
DROP TABLE IF EXISTS productCategory;
DROP TABLE IF EXISTS message;
DROP TABLE IF EXISTS feedback;
DROP TABLE IF EXISTS product;
DROP TABLE IF EXISTS purchase;
DROP TABLE IF EXISTS account;
DROP TABLE IF EXISTS image;
DROP TABLE IF EXISTS category;

CREATE TABLE category (
	categoryId      		INT UNSIGNED AUTO_INCREMENT NOT NULL,
	categoryName  			VARCHAR(50) NOT NULL,
	PRIMARY KEY (categoryId)
);

CREATE TABLE image (
	imageId     			INT UNSIGNED AUTO_INCREMENT NOT NULL,
	imageFileName  		VARCHAR(128) NOT NULL,
	imageType				VARCHAR(10) NOT NULL,
	UNIQUE (imageFileName),
	PRIMARY KEY (imageId)
);

CREATE TABLE account (
	accountId      		INT UNSIGNED AUTO_INCREMENT NOT NULL,
