-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFile01.sql
More file actions
61 lines (47 loc) · 1.02 KB
/
Copy pathFile01.sql
File metadata and controls
61 lines (47 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Create table patient(
P_id int(4) PRIMARY KEY,
name varchar(30),
addr varchar(30),
phno bigint,
email varchar(30)
);
create table available_blood(
bag_id int primary key,
donor_id int,
expiryDate date,
processDate date,
type varchar(5),
Foreign key (donor_id) references donor(donor_id));
create table employee(
e_id int primary key not null,
e_name varchar(20),
e_post varchar(20),
age int,
e_sex char,
joining_date date,
address varchar(20));
create table donor(
donor_id int primary key,
donor_name varchar(20),
donor_email varchar(20),
donor_adress varchar(20),
age int,
sex char);
create table blood_details(
bloodtest_id int,
donor_id int,
blood_group varchar(5),
hb_count int,
date_of_donation date
foreign key(donor_id) references donor(donor_id));
create table Transfusion(
TransfusionNo int not null Primary key,
Quantity int,
BagId int,
DateOfTransfusion Date);
Create table PatientDetails(
P_id int not null,
bloodgrp varchar(3),
history varchar(30),
nameof_doc varchar(30),
FOREIGN KEY (P_id) REFERENCES patient(P_id) );