To create a ER Diagram for Bank management system or College management system using ERD Plus tool and generate the relational model with schema.
CREATE TABLE Doctors
(
Name INT NOT NULL,
Address INT NOT NULL,
PRIMARY KEY (Name),
UNIQUE (Address)
);
CREATE TABLE Patients
(
Type INT NOT NULL,
Details INT NOT NULL,
PRIMARY KEY (Type)
);
CREATE TABLE Tests
(
Type INT NOT NULL,
Description INT NOT NULL,
PRIMARY KEY (Type)
);
CREATE TABLE Doctors_Specialization
(
Specialization INT NOT NULL,
Name INT NOT NULL,
PRIMARY KEY (Specialization, Name),
FOREIGN KEY (Name) REFERENCES Doctors(Name)
);
CREATE TABLE Doctors_Qualification
(
Qualification INT NOT NULL,
Name INT NOT NULL,
PRIMARY KEY (Qualification, Name),
FOREIGN KEY (Name) REFERENCES Doctors(Name)
);
Thus the ER diagram was drawn and relational diagram, SQL DDL staements are generated using ERD plus tool.