DATABASE MANAGEMENT SYSTEM
ASSIGNMENT 1 ARUNA K-19E011
1. NAME OF THE APPLICATION:
Organ Donation and Procurement Network Management System
2. SMALL DESCRIPTION OF THE APPLICATION (IDENTIFY AT LEAST 5 ENTITIES)
Organ transplantation is a medical procedure in which an organ is
removed from one
body and placed in the body of a recipient, to replace a damaged or missing
organ. The donor and recipient may be at the same location, or organs may
be transported from a donor site to another location.
The Organ Donation and Procurement Network Management System is a
database management system that uses database technology to construct,
maintain and manipulate various kinds of data about a person’s donation
or procurement of a particular organ. It maintains a comprehensive
medical history and other critical information like blood group,
age, etc of every person in the database design. In short, it maintains a
database containing statistical information regarding network of organ
donation and procurement of different countries.
3. SCHEMA DIAGRAM
USER_DETAILS
USER_ID USER_NAME DOB PHONE_NUMBER Medical_History Medical_Insurance Address
DONOR
DONOR_ID DONOR_NAME BLOOD_GROUP USER_ID REASON_OF_DONATION
ORGAN_DONATED
PATIENT
USER_ID PATIENT_ID PATIENT_NAME REASON_OF_PROCUREMENT ORGAN_PROCURED
ORGAN AVAILABLE
Organ_ID Organ Name Donor_ID
ORGANIZATION
Organization ID Organization Location Government approved Phone Number
Name organization or not
DOCTOR
Doctor ID Doctor Name Phone Number
ORAGNIZATION HEAD
Head Name Date of Joining Term Length
4. ER DIAGRAM
5. CREATION OF TABLE WITH PRIMARY, FOREIGN KEY, NOT NULL, UNIQUE,
DEFAULT CONSTRAINT
TABLE USER_DETAILS
TABLE DONOR
TABLE PATIENT
6.INSERT MINIMUM OF THREE ROWS IN EACH TABLE
Table 1: USER_DETAILS
TABLE 2: DONOR
TABLE 3: Patient
7. EXECUTE ATLEAST 7 SIMPLE QUERIES
1. SELECT QUERY
To fetch records from the database.
SYNTAX: SELECT * from table_name ;
2.TRUNCATE QUERY
To truncate or remove records of a table but not the structure.
SYNTAX: TRUNCATE TABLE table_name ;
5. UPDATE QUERY
To update records of a table.
SYNTAX:
UPDATE table_name
SET column_1 = 'value1', column_2 = 'value2'
WHERE primary key = 1;
4.DELETE QUERY
To delete records of a table
SYNTAX: DELETE from table_name WHERE conditions;
5.DROP QUERY
To drop a table or a view
Syntax: DROP TABLE table_name;
6.ALTER QUERY
To add, modify, delete or drop columns of a table.
Here a new column PATIENT_ADDRESS is added to the table
PATIENT
7.GROUP BY CLAUSE
To group the rows by values in multiple columns.
SYNTAX:
SELECT expressions
FROM table_name
GROUP BY columns;
8.ORDER BY CLAUSE
SYNTAX:
SELECT expressions
FROM table_name
WHERE conditions
ORDER BY expression;