Rutulpatel7077 / MobileStoreManagement

The Mobile Store Management (CRUD) built in JAVA with MySQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MobileStoreManagement

The Mobile Store Management built in JAVA

Changes You need to do.

Run This SQL CODE

DROP DATABASE IF EXISTS java;

CREATE DATABASE java;
USE java;

DROP TABLE IF EXISTS mobiles;
DROP TABLE IF EXISTS sales;
DROP TABLE IF EXISTS users;

SET SQL_SAFE_UPDATES=0;

create table mobiles 
(
    stockNumber INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    dateInstock DATE,
    dateOfSelling date,
    make VARCHAR(32),
    operatingSystem VARCHAR(32),
    model VARCHAR (32),
    color VARCHAR(32),
    imei LONG,
    ram INT,
    storageCapacity INT,
    website VARCHAR(32),
    imageFile VARCHAR(100),
    sold enum('false','true') default 'false',
    purchasePrice double,
    sellingPrice  double

);

create table users(
userId int auto_increment primary key,
admin boolean default 0,
firstName varchar(30),
lastName varchar(30),
phoneNumber varchar(13),
birthday date,
password varchar(255),
imageFile varchar(100)
);

ALTER table users add COLUMN salt BLOB;


create TABLE sales(
salesId INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
purchasePrice Double NOT NULL,
sellingPrice Double NOT NULL,
dateOfSelling DATE NOT NULL
);

Change and put your sql localhost credentials

Update ConnectionPassword.java in Views folder

Add your very first user in users table

Comment out line line 22 and uncomment line line 28 in MobileStoreManagement.java so that allow you to add user in table and then you can use everything regular

About

The Mobile Store Management (CRUD) built in JAVA with MySQL


Languages

Language:Java 57.7%Language:HTML 40.8%Language:CSS 1.6%