You are on page 1of 4

for alluser..................

CREATE TABLE `alluser` (


`username` VARCHAR( 15 ) NOT NULL ,
`password` VARCHAR( 15 ) NOT NULL ,
`type` VARCHAR( 15 ) NOT NULL ,
PRIMARY KEY ( `username` )
) ENGINE = innodb;
for user....................
CREATE TABLE `user` (
`username` VARCHAR( 20 ) NOT NULL ,
`email` VARCHAR( 50 ) NOT NULL ,
`mobile` VARCHAR( 10 ) NOT NULL ,
`fname` VARCHAR( 20 ) NOT NULL ,
`lname` VARCHAR( 15 ) NOT NULL ,
`country` VARCHAR( 20 ) NOT NULL ,
`state` VARCHAR( 20 ) NOT NULL ,
`city` VARCHAR( 20 ) NOT NULL ,
`zip` VARCHAR( 8 ) NOT NULL ,
`gender` VARCHAR( 6 ) NOT NULL ,
`dob` VARCHAR( 10 ) NOT NULL ,
`updat` VARCHAR( 10 ) NOT NULL ,
`uptime` VARCHAR( 11 ) NOT NULL ,
PRIMARY KEY ( `username` )
) ENGINE = innodb;
for doctor.....................
CREATE TABLE `doctor` (
`username` VARCHAR( 20 ) NOT NULL ,
`email` VARCHAR( 50 ) NOT NULL ,
`mobile` VARCHAR( 10 ) NOT NULL ,
`fname` VARCHAR( 20 ) NOT NULL ,
`lname` VARCHAR( 20 ) NOT NULL ,
`country` VARCHAR( 20 ) NOT NULL ,
`state` VARCHAR( 20 ) NOT NULL ,
`city` VARCHAR( 20 ) NOT NULL ,
`zip` VARCHAR( 8 ) NOT NULL ,
`gender` VARCHAR( 6 ) NOT NULL ,
`dob` VARCHAR( 10 ) NOT NULL ,
`prname` VARCHAR( 25 ) NOT NULL ,
`exp` VARCHAR( 4 ) NOT NULL ,
`pspl` VARCHAR( 50 ) NOT NULL ,
`expin` VARCHAR( 100 ) NOT NULL ,
`sp1` VARCHAR( 50 ) NOT NULL ,
`sp2` VARCHAR( 50 ) NOT NULL ,
`sp3` VARCHAR( 50 ) NOT NULL ,
`sp4` VARCHAR( 50 ) NOT NULL ,
`updat` VARCHAR( 10 ) NOT NULL ,
`uptime` VARCHAR( 11 ) NOT NULL ,
`language` VARCHAR( 100 ) NOT NULL ,
`status` VARCHAR( 15 ) NOT NULL ,
PRIMARY KEY ( `username` ) ,
UNIQUE (
`email`
)
) ENGINE = innodb;
for hospital.............

CREATE TABLE `hospital` (


`username` VARCHAR( 20 ) NOT NULL ,
`email` VARCHAR( 50 ) NOT NULL ,
`mobile` VARCHAR( 10 ) NOT NULL ,
`fname` VARCHAR( 20 ) NOT NULL ,
`lname` VARCHAR( 20 ) NOT NULL ,
`country` VARCHAR( 20 ) NOT NULL ,
`state` VARCHAR( 20 ) NOT NULL ,
`city` VARCHAR( 20 ) NOT NULL ,
`zip` VARCHAR( 8 ) NOT NULL ,
`bname` VARCHAR( 70 ) NOT NULL ,
`land` VARCHAR( 13 ) NOT NULL ,
`updat` VARCHAR( 10 ) NOT NULL ,
`uptime` VARCHAR( 11 ) NOT NULL ,
`btyp` VARCHAR( 15 ) NOT NULL ,
PRIMARY KEY ( `username` ) ,
UNIQUE (
`email`
)
) ENGINE = innodb;

CREATE TABLE patient(


REFID int NOT NULL AUTO_INCREMENT ,
PRIMARY KEY ( REFID ) ,
pname varchar( 30 ) ,
email varchar( 50 ) ,
mobile varchar( 15 ) ,
age int,
sex varchar( 6 ) ,
paddress varchar( 200 ) ,
reason varchar( 200 ) ,
doctor varchar( 20 ) ,
place int,
apptdate varchar( 10 ),
altdate varchar( 35 ),
date varchar( 10 ),
time varchar( 11 )
);

CREATE TABLE searchcity(


id int NOT NULL AUTO_INCREMENT ,
PRIMARY KEY ( id ) ,
username varchar( 30 ) ,
city varchar( 20 ) ,
typ varchar( 15 )
);
CREATE TABLE speciality (
specialities VARCHAR( 100 ) NOT NULL ,
UNIQUE ( specialities )
);
ORACLE DATABASE............................................................
********************************************************************************
******************************************************************

create table city(city varchar(20));


CREATE SEQUENCE seq_searchcity MINVALUE 1 START WITH 1 INCREMENT BY 1 CACHE 10
insert into searchcity (id, city) values(seq_searchcity.nextval, '');
insert into searchcity (id, username, typ) values(seq_searchcity.nextval, 'kjgsd
fs', 'ouhuerg');
SELECT distinct city FROM searchcity WHERE typ='doctor' OR typ='' ORDER BY city;
SELECT distinct city FROM searchcity WHERE typ='nursinghome' OR typ='hospital' O
R typ='clinic' OR typ='' ORDER BY city;
SELECT distinct city FROM searchcity WHERE typ='medicallab' OR typ='' ORDER BY c
ity;
................................................................................
....................................................................
CREATE TABLE specialty(specialty VARCHAR(100) UNIQUE);
select * from specialty;
................................................................................
....................................................................
create table alluser(username varchar(30) PRIMARY KEY, password varchar(20), typ
varchar(15), varified int, hspwd varchar(8), removed int);
................................................................................
...................................................................
create table hospital(username varchar(30) PRIMARY KEY, email varchar(50), mobil
e varchar(10), fname varchar(20), lname varchar(20), country varchar(30), state
varchar(20), city varchar(20), zip varchar(11), bname varchar(70), land varchar(
20), updat varchar(10), uptime varchar(11), btyp varchar(15), removed int);
................................................................................
...................................................................
create table doctor(username varchar(30) PRIMARY KEY, email varchar(50), mobile
varchar(10), fname varchar(20), lname varchar(20), country varchar(30), state va
rchar(20), city varchar(20), zip varchar(11), gender varchar(6),dob varchar(10),
prname varchar(30),exp varchar(4),pspl varchar(50),expin varchar(100),sp1 varcha
r(50),sp2 varchar(50),sp3 varchar(50), sp4 varchar(50), updat varchar(10), uptim
e varchar(11), language varchar(100), status varchar(15), removed int);
................................................................................
....................................................................
create table generaluser (username varchar(30) PRIMARY KEY, email varchar(50), m
obile varchar(10), fname varchar(20), lname varchar(20), country varchar(30), st
ate varchar(20), city varchar(20), zip varchar(11), gender varchar(6),dob varcha
r(10), updat varchar(10), uptime varchar(11), language varchar(100), status varc
har(15), removed int);
................................................................................
....................................................................
create table patient (REFID int PRIMARY KEY, pname varchar(30), email varchar(50
), mobile varchar(10), age int, sex varchar(6), paddress varchar(200), reason va
rchar(200), doctor varchar(30), place int, apptdate varchar(10), altdate varchar
(35), updat varchar(10), uptime varchar(11), canceled int, appointment int, hspw
d varchar(8), confirmed int);
................................................................................
....................................................................
create table location (ID int PRIMARY KEY, username varchar(30), country varchar
(30), state varchar(20), city varchar(20), loc varchar(100), atime varchar(15),
pno int, d1 int, d2 int, d3 int, d4 int, d5 int, d6 int, d7 int, madt varchar(60
), eadt varchar(100), mudt varchar(60), udt varchar(100), removed int);
................................................................................
....................................................................
create table feedback (id int PRIMARY KEY, name varchar(40), email varchar(50),
mobile varchar(10), address varchar(200), message varchar(500), fdate varchar(10
), ftime varchar(11));
................................................................................
....................................................................

................................................................................
....................................................................
create table notice (id int PRIMARY KEY, username varchar(30), ntyp varchar(50),
ref int, loc int, ldate varchar(10), headings varchar(1000), message varchar(10
00), ndate varchar(10), ntime varchar(11));