0% found this document useful (0 votes)
7 views1 page

All Table Syntax

The document outlines the creation and insertion of data into five tables: books, students, issued_books, digital_resources, and library_staff. Each table includes various fields such as IDs, titles, authors, publication years, and contact information. The data reflects a library system with details on books, students borrowing them, digital resources available, and library staff information.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

All Table Syntax

The document outlines the creation and insertion of data into five tables: books, students, issued_books, digital_resources, and library_staff. Each table includes various fields such as IDs, titles, authors, publication years, and contact information. The data reflects a library system with details on books, students borrowing them, digital resources available, and library staff information.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Table~1: create table books(book_id int(15),title varchar(255),author

varchar(100),published_year int(4),available_copies int(50));


insert into books value(12,'atomic habits','james clear',2018,13),
(03,'the psycology of money','morgan housel',2020,07),(09,'too good to be
true','prajakta koli',2021,19),(02,'a man called ove','fredrik backman',2013,20);

Table~2: create table students(student_id int(15),name varchar(10),roll_no


varchar(10),course varchar(50),contact int(15));
insert into students
value(03,'Dashanxi','a24cse003','btech(cse)',8866683747),
(37,'krisha','a24cse037','bca',8511451908),
(29,'kalp','a24cse029','bca',9313799190),
(12,'aryan','a24cse012','btech(cse)',7359563504);

Table~3: create table issued_books(issue_id int(10),student_id int(10),book_id


int(10),issue_date DATE,due_date DATE,return_status ENUM('Returned','NOT
Returned'));
insert into issued_books value(121,03,12,'2024-07-15','2024-08-03','NOT
Returned'),(129,37,09,'2024-06-10','2024-09-23','Returned'),(135,29,03,'2023-04-
01','2024-04-19','Returned'),(140,12,02,'2023-01-09','2023-12-27','NOT Returned');

Table~4: create table digital_resources(resource_id int(5),title


varchar(255),author varchar(100),publication_year int(5),file_format
ENUM('pdf','docx','mp3','epub'),file_size_MB DECIMAL(5,2),upload_date
DATE,uploaded_by varchar(100),access_type ENUM('Public','Restricted'));
insert into digital_resources value(01,'atomic habits','james
clear',2018,'pdf','5.2','2019-06-07','calon jerry','Public'),(02,'the psycology of
money','morgan housel',2020,'docx','3.9','2020-11-13','helly deyona','Public'),
(03,'too good to be true','prajakta koli',2021,'mp3','16.3','2023-05-28','jack
glan','Restricted'),(04,'a man called ove','fredrik
backman',2013,'epub','9.7','2016-12-25','selby finley','Public');

Table~5: create table library_staff(staff_id int(5),name


varchar(100),designation ENUM('librarian','clerk','technician'),contact
varchar(10),join_date DATE,salary DECIMAL(6,2),shift_timing
ENUM('morning','evening'));
insert into library_staff
value(01,'Vishalbhai','librarian','7843219609','2022-06-01','25000.89','morning'),
(02,'Varshaben','librarian','9517438446','2023-11-19','22750.45','evening'),
(03,'Ketanbhai','clerk','7854126901','2023-04-10','30270.00','evening'),
(04,'Yashbhai','technician','9638520073','2022-11-23','20650.28','morning');

You might also like