-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
45edd52
commit 575c7fa
Showing
2 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
### Copy and Paste the following MYSQL commands to make a dummy database for this Project : | ||
|
||
|
||
create database onlinebookstore; | ||
create database if not exists onlinebookstore; | ||
|
||
use onlinebookstore; | ||
|
||
create table books(barcode varchar(100) primary key, name varchar(100), author varchar(100), price int, quantity int); | ||
create table if not exists books(barcode varchar(100) primary key, name varchar(100), author varchar(100), price int, quantity int); | ||
|
||
create table users(username varchar(100) primary key,password varchar(100), firstname varchar(100),lastname varchar(100),address text, phone varchar(100),mailid varchar(100),usertype int); | ||
create table if not exists users(username varchar(100) primary key,password varchar(100), firstname varchar(100),lastname varchar(100),address text, phone varchar(100),mailid varchar(100),usertype int); | ||
|
||
insert into books values('10101','Programming in C','James k Wick',500,5); | ||
insert into if not exists books values('10101','Programming in C','James k Wick',500,5); | ||
|
||
insert into books values('10102','Learn Java','Scott Mayers',150,13); | ||
insert into if not exists books values('10102','Learn Java','Scott Mayers',150,13); | ||
|
||
insert into books values('10103','Database Knowledge','Charles Pettzoid',124,360); | ||
insert into if not exists books values('10103','Database Knowledge','Charles Pettzoid',124,360); | ||
|
||
insert into books values('10104','Let us c++','Steve Macclen',90,111); | ||
insert into if not exists books values('10104','Let us c++','Steve Macclen',90,111); | ||
|
||
insert into books values('10105','Success Key','Shashi Raj',5000,15); | ||
insert into if not exists books values('10105','Success Key','Shashi Raj',5000,15); | ||
|
||
insert into users values('User','Password','First','User','My Home','42502216225','[email protected]',2); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters