Question
Pl help me Build a database project using these sql queries and also use phpstorm for making process.php, form.php , connection.php And you can also
Pl help me Build a database project using these sql queries and also use phpstorm for making process.php, form.php , connection.php And you can also make some changes to these SQL queries
CREATE TABLE Hospital ( -> hos_id INT PRIMARY KEY, -> hos_type VARCHAR(255), -> hos_dsc VARCHAR(255), -> hos_place VARCHAR(255) -> );
CREATE TABLE Medicine ( -> mdcn_id INT PRIMARY KEY, -> hos_id INT, -> mdcn_dsc VARCHAR(255), -> mdcn_type VARCHAR(255), -> FOREIGN KEY (hos_id) REFERENCES Hospital(hos_id) -> );
CREATE TABLE User ( -> user_id INT PRIMARY KEY, -> hos_id INT, -> user_login VARCHAR(255), -> user_pass VARCHAR(255), -> FOREIGN KEY (hos_id) REFERENCES Hospital(hos_id) -> );
CREATE TABLE Doctor ( -> doc_id INT PRIMARY KEY, -> hos_id INT, -> user_id INT, -> doc_add VARCHAR(255), -> doc_name VARCHAR(255), -> doc_mob INT, -> doc_email VARCHAR(255), -> doc_pass VARCHAR(255), -> FOREIGN KEY (hos_id) REFERENCES Hospital(hos_id), -> FOREIGN KEY (user_id) REFERENCES User(user_id) -> );
CREATE TABLE Patient ( -> pat_id INT PRIMARY KEY, -> hos_id INT, -> doc_id INT, -> user_id INT, -> pat_name VARCHAR(255), -> pat_email VARCHAR(255), -> pat_add VARCHAR(255), -> FOREIGN KEY (hos_id) REFERENCES Hospital(hos_id), -> FOREIGN KEY (doc_id) REFERENCES Doctor(doc_id), -> FOREIGN KEY (user_id) REFERENCES User(user_id) -> );
CREATE TABLE Cahier ( -> csh_id INT PRIMARY KEY, -> pat_id INT, -> csh_name VARCHAR(255), -> csh_email VARCHAR(255), -> csh_add VARCHAR(255), -> FOREIGN KEY (pat_id) REFERENCES Patient(pat_id) -> );
CREATE TABLE Prescription ( -> pers_id INT PRIMARY KEY, -> doc_id INT, -> pat_id INT, -> mdcn_id INT, -> pers_date DATE, -> FOREIGN KEY (doc_id) REFERENCES Doctor(doc_id), -> FOREIGN KEY (pat_id) REFERENCES Patient(pat_id), -> FOREIGN KEY (mdcn_id) REFERENCES Medicine(mdcn_id) -> );
CREATE TABLE Surgery ( -> sur_id INT PRIMARY KEY, -> hos_id INT, -> doc_id INT, -> pat_id INT, -> sur_date DATE, -> sur_time TIME, -> sur_dsc VARCHAR(255), -> FOREIGN KEY (hos_id) REFERENCES Hospital(hos_id), -> FOREIGN KEY (doc_id) REFERENCES Doctor(doc_id), -> FOREIGN KEY (pat_id) REFERENCES Patient(pat_id) -> );
CREATE TABLE Appointment ( -> apt_id INT PRIMARY KEY, -> doc_id INT, -> pat_id INT, -> apt_date DATE, -> apt_time TIME,FOREIGN KEY (doc_id) REFERENCES Doctor(doc_id), -> FOREIGN KEY (pat_id) REFERENCES Patient(pat_id) -> );
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started