0% found this document useful (0 votes)
52 views

Computer Project

Uploaded by

ashishkrraj7448
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
52 views

Computer Project

Uploaded by

ashishkrraj7448
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 28
ACADEMIC YEAR: 2023-24 PROJECT REPORT ON IBRARY MAN. MENT NAME CLASS ROLL NO SUBJECT BOARD ROLL NO : PROJECT GUIDE Sujal Kumar ATE: 51 COMPUTER SCIENCE : Mr. Rajiv Suman CERTIFICATE This is to certify that Sujal Kumar, a student of class XII has successfully completed the research on the project “LIBRARY MANAGEMENT" under the guidance of Mr. Rajiv Suman Sir during the year 2023-24 in partial fulfillment of Computer Practical Examination conducted by CBSE, New Delhi. | Signature of Internal Examiner Signature of External Examiner Acknowledgement Apart from my efforts, the success of any project depends largely on the encouragement and guidelines of many others. | take this opportunity to express my gratitude to the people who have been instrumental in the successful completion of this project. My sincere thanks to Mr. Rajiv Suman, master in-charge, a guide, mentor all the above a friend, who critically reviewed my project and helped in solving each and every problem, occurred during implementation of the project. | express my heartfelt gratitude to my parents for constant encouragement while carrying out this project. | gratefully acknowledge the contribution of the individuals who contributed to bringing this project up to this level, who continues to look after me despite my flaws. The guidance and support received from all the members who contributed to this project, was vital for the success of the project. | am grateful for their constant support and help. PROJECT ON LIBRARY MANAGEMENT 2023-24 INDEX Particulars Project Analysis Functions and Modules Detailed Description Source Code Outputs and Tables Bibliography Remarks PROJECT ANALYSIS Our application program is specially designed for the public library named & “READING COMMUNITY.” They lend books to readers who have subscribed with the library. We have tried to maximise the efficiency and strived for customer and user ease as well as satisfaction. We have thoroughly examined the needs of the library and after the analysis, we have constructed the program. We have used PYTHON and MYSQL as our platform to carry out this task. FUNCTIONS AND MODULES Modules: import mysql.connector: By importing this package, we are able to establish the connection between SQL and Python. FUNCTIONS: connect(): This function establishes connection between Python and MySQL cursor(): It is a special control structure that facilitates the row-by- row processing of records in the result set. The Syntax is: =.cursor() execute(): This function is used to execute the sql query and retrieve records using python. The syntax is: .execute() def(): A function is a block of code which only runs when it is called. fetchall(): This function will return all the rows from the result set in the form of a tuple containing the records. fetchone(): This Function will return one row from the result set in the form of a tuple containing the records. commit(): This function provides changes in the database physically. DETAILED DESCRIPTION “*) Our Project has 3 MySQL tables. These are: - 1.) Books 2.) Issue 3.) Return 1) The table Books contain the following columns: a) bname b) author c) bcode d) total e) subject 2.) The table Issue contain the following columns: a.) name b.) regno c.) bcode d.) issue_date 3.) The table Return contain the following columns: a.) name b.) regno c.) bcode d.) return_date SOURCE CODE For MySQL: create database library_app; use library_app; create table books (bname varchar(50), author varchar(50), bcode varchar(50), total int(50), subject varchar(50)); create table issue (name varchar(50), regno varchar(50), bcode int(50), issue_date varchar(50)); create table return (name varchar(50), regno varchar(50), bcode int(50), return_date varchar(50)); For Python: import mysql.connector as a con=a.connect(host='localhost',user='root',passwd='9586',data base='library_app') def addbook(): bn=input("Enter Book Name: ") input("Enter Author's Name: ") c=int(input("Enter Book Code: ")) t(input("Total Books: ")) s=input("Enter Subject: ") data=(bn,ba,c,t,s) sql='insert into books values(%s,%s,%s,%s,%s);" c=con.cursor() c.execute(sql,data) con.commit() print("\n\n\n\nBook Added Successfully..........\n\n\n\n") wait ae enter to continue.....\n\n\n\n\n\n') main def issueb(): n=input("Enter Student Name: ") r=int(input("Enter Reg No.:")) co=int(input("Enter Book Code: ")) d=input("Enter Date: ") a="insert into issue values(%s,%s,%s,%s);" data=(n,r,co,d) c=con.cursor() c.execute(a,data) con.commit() print("\n\n\n\nBook issued successfully to: ",n) wait = input('\n\n\nPress enter to continue.....\n\n\n\n\n\n') bookup(co,-1) main() def returnb(): n=input("Enter Student Name: ") r=int(input("Enter Reg No.:")) t(input("Enter Book Code: ")) d=input("Enter Date: ") a="insert into return_ values(%s,%s,%s,%s);"" data=(n,r,co,d) c=con.cursor() c.execute(a,data) con.commit() print("Book returned by: ",n) wait = input('\n\n\nPress enter to continue.....\n\n\n\n\n\n') bookup(co,1) main() def bookup(co,u): a="select total from books where bcode=%s;" data=(co,) c=con.cursor() c.execute(a,data) myresult=c.fetchone() t=myresult[O]+u sql="update books set total=%s where bcode=%s;" d=(t,co) c.execute(sql,d) con.commit() wait PUA nPress enter to continue.....\n\n\n\n\n\n') main| def dbook(): ac=int(input("Enter Book Code: ")) a="delete from books where bcode=%s;" data=(ac,) c=con.cursor() c.execute(a,data) con.commit() print("Book deleted successfully") wait = input("\n\n\nPress enter to continue.....\n\n\n\n\n\n\n\n\n\n\n\n') main() def dispbook(): a="select * from books;" c=con.cursor() c.execute(a) myresult=c.fetchall() fori in myresult: print("Book name: ",i[0]) print("Author: ",i[1]) print("Book code: ",i[2]) print("Total:",i[3]) print("Subject:",i[4]) print(‘\n\n') wait = input("\n\n\nPress enter to continue.....\n\n\n\n\n\n\n\n\n\n\n\n") main() def report_issued_books(): a="select * from issue;" c=con.cursor() c.execute(a) myresult=c.fetchall() fori in myresult: print(myresult) wait = input('\n\n\nPress enter to continue.....\n\n\n\n\n\n\n\n') main() def report_return_books(): a="select * from return_; c=con.cursor() c.execute(a) myresult=c.fetchall() for iin myresult: print(myresult) wait = input('\n\n\nPress enter to continue.....\n\n\n\n\n\n\n\n\n\n\n\n') main() def main(): print("™" LIBRARY MANAGEMENT APPLICATION 1. ADD BOOK 2. ISSUE OF BOOK 3. RETURN OF BOOK 4, DELETE BOOK 5. DISPLAY BOOKS 6. REPORT MENU 7. EXIT PROGRAM a) choice=input("Enter Task No: print(" \n\n\n\n\n\n\n' ) if(choice=='1'): addbook() elif(choice== 1B dispbook() elif(choice=='6'): print( REPORT MENU 1, ISSUED BOOKS 2. RETURNED BOOKS 3. GO BACK TO MAIN MENU \n\n\n "y choice=input("Enter Task No:......" print(’ Na\n\n\n\n\n\n’ ) sued |_books() report_return_books() elif choice=='3': e: print("Please try again........\n\n\n\n\n\n\n\n\n") main() elif{choice 7): print(‘\n\n\n\n\n\n\n\n\n\n\n\nThank you and have a great day ahead sees \0\n\n\n\n\n\n\n\n\n\n\n\n\n\n') else: print("Please try again........\n\n\n\n\n\n\n\n\n\n\n\n") main() main() OUTPUTS AND TABLES > OUTPUTS: 1.) Add a Book: 2.) Issue a Book: 3.) Return of Book: 4.) Delete a Book: 5.) Display Books: 6.) Report Menu: 7.) Exit Program: eon Srereig Perret Coe Postrat Drererery cee Ere porte} Dacca bry eT Seen Sonat peer ein Serr eesty oe So eC ee: cere a ee Pe es | Cae Prot ecoraecens eee rt SE era) ae eC} ren SCE aets U5 ort T262-26-68 ad tr ke] a4 rar A) Fé62-FB-TE aA fo Nt tA U4 i i a FeG2-Te-Te F262-TG-6F 54 +262-T6-8T Ceaaay oe as Pat Toye aaanuey ibe es] Uy Ferd oe] Udy Ud aera F202-Ta-Te rds ro ta 1) a Ly etd eer BT yy ae) feysyy BIBLIOGRAPHY ** To develop this project many references were used: 1. INFORMATICS PRACTICES Class XII: PREETI ARORA 2. https://www.google.com

You might also like