Need a c++ program to connect to this database and perform add, search, remove, display operations.
Need a c++ program to connect to this
-- students
create table students
(
student_id int,
name varchar(50),
dob date,
phone int,
email varchar(50),
address text,
year_level int,
section varchar(2),
primary key(student_id)
);
-- staff
create table staff(
staff_id int,
name varchar(50),
address text,
phone int,
email varchar(50),
position varchar(20),
salary int,
primary key(staff_id)
);
-- book_subject
create table
(
subject_id int primary key,
subject varchar(50)
);
-- books
create table books(
book_id int,
title varchar(50),
published_year int,
isbn int,
cost int,
subject_id int,
primary key(book_id),
foreign key(subject_id) references book_subject(subject_id)
);
-- book_issue
create table book_issue
(
issue_id int,
issue_date date,
staff_id intjumb,
student_id int,
book_id int,
return_date da primary key(issue_id),
foreign key(staff_id) references staff(staff_id),
foreign key(student_id) references students(student_id),
foreign key(book_id) references books(book_id)
);
Step by step
Solved in 2 steps