Sie sind auf Seite 1von 41

JUNE-JULY

On Library Management System

2010

Summer Training Report

SUBMITTED BY:

TABLE OF CONTENTS - II

CHAPTER
i 1 2

CONTENT
ABSTRACT ANALYSIS DESIGN 1. Level 0 DFD Diagram 2. Level 1 DFD Diagram 3. Level 2 DFD Diagram 4. Database Design

PAGE NO.
3 4 5 6 7 8 10 12 34 39 40

3 4 5 6

CODING OUTPUT WINDOWS CONCLUSION REFERENCE

ABSTRACT
The project focuses on the development skills of the user. The knowledge acquired proves to be helpful and effective, only if it is implemented. The implementation of the knowledge acquired is trough project and case studies based on real time scenarios. The LIBRARY MANAGEMENT SYSTEM undertaken as a project is based on relevant technologies .The projects are done in groups where the student learn to work in a team, manage project schedules ,follow the best coding standards and conventions and adhere to project documentation standards. Here in this project we use front end as VC++ and backend as ms-access. We store information about the books and the students who have taken the books. All these details are stored in the database by entering into VC++ and the details can be displayed from the database by writing the query in VC ++. This project involves several modules to carry out each action. We created database for storing the details in tables .We created table for MEMBER DETAILS, a table for storing BOOK DETAILS and another table for storing the details of the students who have taken the books namely MEMBER BOOK DETAILS. We can also store the details at run time, that is we can enter the student details by entering the details of the student separately at run time. Likewise the transaction details can also be entered at run time. We can either store in a database and see the details when required or see the details at run time by selecting the option display. Hence in the existing system for LIBRARY MANAGEMENT SYSTEM ,the performance evaluation system and the maintenance are done manually. The proposed system will maintain all the information in a standard database and will be able to generate reports as and when necessary. Accessing and the user has the right to search based on the above mentioned criteria.

1. ANALYSIS PHASE
In this Analysis phase we are analyzing the requirements what we want to do project. We have to collect the requirements needed to develop the project. For that we have to refer the books and websites for gathering the requirements. In this analysis phase, we have to design the project in mind how it has to be and what are all the operations that has to carry in the project and how it has to be interactive with the users and how it has to attract the customer. The project has to contain all the details about the members in the library and books in the library and the details the members who taken the books and this details has to store in the database for this type we have to analyze the problem and we have to develop the project. In this analysis phase we have to collect the details about the project such as

what are all operations that will make interactive and what are all the fields that has to be present n the database and the database must store the details of all the members and the book details and the members who taken the books. In this analysis phase only we will collect the information about the project. This is the first stage of the project. After this only we will start doing project that is the design of the project will carry after this stage. After that we will write the project coding and we will test the project. This phase will take the duration up to 1 to 2 weeks for completion of this analysis stage that is for collecting the requirements and it has to contain all the details about the project. In some projects it will take more time for completion of the analysis stage because it has to collect more requirements, it has to be depend upon the project it will take duration, hence for small type of projects we can easily complete the project within the short duration, for large projects it will take more duration for analysis stage and also for completion of the project. But for this project we can easily complete the project within the short duration because it is like a mini project and also we can easily complete the stage of analysis. If we completed the stage of analysis then it appears like we completed the 25% of the project within short duration.

2. DESIGN PHASE
In this design stage we are designing our project according to customer satisfaction or user satisfaction. In this design phase the user must understand the whole project by seeing the design of the project. After the completion of the analysis stage the user must design the project according to the collected requirements in the analysis stage. After the completion of the analysis stage the user must continue with the design stage. In this project the user

must create the database to store the details of members, books, and reports tables based upon collection of table requirements collected in the design stage. In this tables, one field has been given as primary key in the design of tables because it wont allow the duplicate values of members or it wont accept the same id number for different members. For Book Details table also one primary key has been allocated for neglecting the same values for the field Book number and another table was created that is for storing the details of transaction that has been carried out, in that database it doesnt have any keys in that because it can contain the details many users can take the book with same account number. After creation of tables the user must design the project that is it can also represent the design in the form of Data Flow Diagrams. In the Data Flow diagrams it contains the levels that is it has to be represented in Level 0 DFD, Level 1 DFD, Level 2 DFD, so that we can represent the Data flow diagrams in that format up to number of DFDs required in the project. The user must design or draw the DFD diagrams based upon the project what it will do, what are the operations that was carrying in the project it will represent the DFD diagrams in the one by one operation that was carrying in the project. The user must understand the project what are all the operations in the project that was going to do or carrying out by seeing the DFD Diagrams. In that format the user must draw the DFD diagram. The DFD diagram that must contain all the details of the project.

2.1 LEVEL 0 DFD DIAGRAM: In Level 0 DFD diagram, it will display the menus of the project that is what are all we can do in the project. From that we can select the option what we are going to do. Based upon the condition it display the next screen for the selected operation. LEVEL O DFD DIAGRAM

SEARCHING THE BOOK

DISPLAYING THE BOOK DETAILS

SEARCHING STUDENT DETAIL LIBRARY MANAGE MENT SYSTEM

DISPLAYING THE STUDENTS DETAILS

ENTERING THE BOOK DETAILS

STORING THE BOOK DETAILS

ENTERING STUDENT DETAILS

STORING THE STUDENT DETAILS

STUDENTBOOK ENTRY

STORING THE STUDENTBOOK DETAILS

2.2 LEVEL 1 DFD DIAGRAM: In Level 1 DFD diagram it takes the input details and store the details in the database. It takes the details separately for each table and store details separately in each table.

2.2.1 TO STORE THE DETAILS OF MEMBERS:

NAME

MEM NO STORING THE DETAILS IN THE DATABASE TAKING INPUT DETAILS OF MEMBER MEMBER

ADDRESS

DOB

2.2.2 TO STORE THE DETAILS OF BOOKS:

STOCK

BOOK NAME

BOOK NO STORING THE DETAILS IN THE DATABASE TAKING INPUT DETAILS OF BOOKS

AUTHOR

EDITION PUBLISHER

2.2.3 TO STORE THE DETAILS OF TRANSACTIONS

MEMNO

DATE OF RETURN

BOOK NAME

BOOK NO STORES THE DETAILS IN THE DATABASE TAKING DETAILS OF TRANSA CTIONS

AUTHOR

EDITION MEMBER NAME DATE OF ISSUE

2.3 LEVEL 2 DFD DIAGRAM: In Level 2 DFD diagram it displays the selected details or the details of all books present in the library and the details of selected members or all the members who are having the membership in the library and the transaction details of members who have taken books. 2.3.1 TO DISPLAY THE MEMBER DETAILS:

NAME

MEM NO DISPLAYING THE DETAILS FROM THE DATABASE DISPLAYI NG OUTPUT DETAILS OF MEMBER

ADDRESS

DOB

2.3.2 TO DISPLAY THE DETAILS OF BOOKS:

STOCK

BOOK NAME

BOOK NO DISPLAYING THE DETAILS FROM THE DATABASE DISPLAY ING DETAILS OF BOOKS

AUTHOR

EDITION PUBLISHER

2.3.3 TO DISPLAY THE DETAILS OF TRANSACTIONS

MEMNO

DATE OF RETURN

BOOK NAME

BOOK NO DISPLAYING THE DETAILS FROM THE DATABASE DISPLAYI NG DETAILS OF REPORTS

AUTHOR

EDITION MEMBER NAME DATE OF ISSUE

2.4 DATABASE DESIGN:

MS-ACCESS DATABASE: LIBRARY. MDB


2.4.1 BOOKDETAILS TABLE

FIELD NAME BOOKNO BOOKNAME AUTHOR EDITION PUBLISHER STOCK

DATATYPE Text Text Text Text Text Text

SIZE 50 50 50 50 50 50

2.4.2 MEMBER DETAILS TABLE

FIELD NAME MEMNO NAME ADRESS DOB

DATATYPE Text Text Text Date/Time

SIZE 50 50 50 8

10

2.4.3 TRANSACTION DETAILS TABLE

FIELD NAME MEMNO BOOKNO BOOKNAME NAME AUTHOR DATEOFBOOKISSUE DATEOFBOOKRETURN EDITION

DATATYPE Text Text Text Text Text Date/Time Date/Time Text

SIZE 50 50 50 50 50 8 8 50

11

3. CODING:
#include<iostream.h> # include<stdio.h> # include<conio.h> # include<dos.h> # include<string.h> # include<math.h> #import "c:\Program Files\Common Files\System\ADO\msado15.dll" \ no_namespace rename("EOF", "EndOfFile") char name[50],aname[50]; int accno; int ed; int rk; int rw; int stock; void selectcase(); void memdetails(); void bookdetails(); void transactiondetails(); void addnewbook(); void issuebook(); void menu(); void memmenu(); void bookmenu(); void reportmenu();

12

void exit(); void back();

void addnewmember(); void deletemember(); //TO ADD NEW MEMBER DETAILS TO THE DATABASE void addnewmember() { //clrscr(); char name[20]; char temp[60]=" "; char memno[10]; char address[10]; char dob[10]; cout<<"ENTER THE MEMBER NUMBER:"; cin>>memno; cout<<"ENTER THE MEMBER NAME:"; cin>>name; cout<<"ENTER THE ADDRESS:"; cin>>address; cout<<"ENTER THE DATE OF BIRTH:"; cin>>dob; CoInitialize(NULL); try {

13

strcat(temp,"INSERT INTO MEMDETAILS VALUES(' "); strcat(temp,memno); strcat(temp,"','"); strcat(temp,name); strcat(temp,"','"); strcat(temp,address);

strcat(temp,"','"); strcat(temp,dob); strcat(temp,"');"); _RecordsetPtr pRst("ADODB.Recordset"); _bstr_t strCnn("DRIVER={Microsoft Access Driver (*.mdb)};UID=admin;DBQ=LIBRARY.mdb"); pRst->Open(temp,strCnn,adOpenKeyset,adLockOptimistic,adCmdText); pRst->MoveFirst(); while (!pRst->EndOfFile) { pRst->MoveNext(); } pRst->Close(); } catch (_com_error &e) { cout<<(char*) e.Description(); }

14

cout<<endl<<"THE MEMBER DETAILS WAS STORED IN A DATABASE SUCCESSFULLY"<<endl; selectcase(); }

//TO ADD NEW BOOK TO THE DATABASE void addnewbook() { //clrscr(); char name[20]; char temp[80]=" "; char bookno[10];

char aname[10]; char ed[10]; char pub[10]; char stock[10]; cout<<"ENTER THE BOOK NAME:"; cin>>name; cout<<"ENTER THE ACCOUNT NUMBER:"; cin>>bookno; cout<<"ENTER THE AUTHOR NAME:"; cin>>aname; cout<<"ENTER THE EDITION OF BOOK:";

15

cin>>ed; cout<<"ENTER PUBLISHER NAME:"; cin>>pub; cout<<"ENTER THE STOCK:"; cin>>stock; CoInitialize(NULL); try { strcat(temp,"INSERT INTO BOOKDETAILS VALUES(' "); strcat(temp,bookno); strcat(temp,"','"); strcat(temp,name); strcat(temp,"','"); strcat(temp,aname); strcat(temp,"','"); strcat(temp,ed); strcat(temp,"','");

strcat(temp,pub); strcat(temp,"','"); strcat(temp,stock); strcat(temp,"');"); _RecordsetPtr pRst("ADODB.Recordset"); _bstr_t strCnn("DRIVER={Microsoft Access Driver (*.mdb)};UID=admin;DBQ=LIBRARY.mdb"); 16

pRst->Open(temp,strCnn,adOpenKeyset,adLockOptimistic,adCmdText); pRst->MoveFirst(); while (!pRst->EndOfFile) { pRst->MoveNext(); } pRst->Close(); } catch (_com_error &e) { cout<<(char*) e.Description(); } cout<<endl<<"THE BOOK DETAILS WAS STORED IN A DATABASE SUCCESSFULLY"<<endl; selectcase(); } //TO ISSUE LIBRARY BOOK TO THE STUDENT void issuebook() { char temp[100]=" "; char no[10]; char bno[10];

char date[10]; char edate[10]; char author[10]; 17

char edition[10]; char name[50],bname[50]; cout<<"ENTER THE MEMNO:"; cin>>no; cout<<"ENTER THE BOOK ACCOUNT NO:"; cin>>bno; cout<<"ENTER THE BOOK NAME:"; cin>>bname; cout<<"ENTER THE NAME:"; cin>>name; cout<<"ENTER AUTHOR NAME:"; cin>>author; cout<<"ENTER THE DATE OF ISSUSE:"; cin>>date; cout<<"ENTER THE DATE OF RETURN:"; cin>>edate; cout<<"ENTER EDITION OF BOOK:"; cin>>edition; CoInitialize(NULL); try { strcat(temp,"INSERT INTO TRANSACTIONDETAILS VALUES(' "); strcat(temp,no); strcat(temp,"','"); strcat(temp,bno);

18

strcat(temp,"','"); strcat(temp,bname); strcat(temp,"','"); strcat(temp,name); strcat(temp,"','"); strcat(temp,author); strcat(temp,"','"); strcat(temp,date); strcat(temp,"','"); strcat(temp,edate); strcat(temp,"','"); strcat(temp,edition); strcat(temp,"');"); _RecordsetPtr pRst("ADODB.Recordset"); _bstr_t strCnn("DRIVER={Microsoft Access Driver (*.mdb)};UID=admin;DBQ=LIBRARY.mdb"); pRst->Open(temp,strCnn,adOpenKeyset,adLockOptimistic,adCmdText); pRst->MoveFirst(); while (!pRst->EndOfFile) { pRst->MoveNext(); } } catch (_com_error &e) { cout<<(char*) e.Description(); 19 pRst->Close();

}cout<<endl<<"THE TRANSACTION DETAILS WAS STORED IN A DATABASE SUCCESSFULLY"<<endl; selectcase(); }

//TO DISPLAY THE MAIN SCREEN void menu() { int a; cout<<endl<<endl<<endl<<"\t\tLIBRARY MANAGEMENT"<<endl; cout<<endl; cout<<"1.MEMBERS"<<endl; cout<<"2.BOOKS"<<endl; cout<<"3.REPORTS"<<endl; //cout<<"HELP"<<endl; cout<<"4.EXIT"<<endl; cout<<endl; cout<<"ENTER YOUR CHOICE:"; cin>>a; switch(a) { case 1: memmenu(); break; case 2: bookmenu(); 20

break; case 3: reportmenu(); break; case 4: exit(); break;

default: cout<<"ENTER CORRECT CHOICE:"; break; } getch(); } //TO DISPLAY THE MEMBER DETAILS MENU void memmenu() { int b; cout<<endl; cout<<"1.ADD NEW MEMBER"<<endl;

cout<<"2.DELETE THE MEMBER"<<endl; cout<<"3.BACK"<<endl; cout<<endl; cout<<"Enter your choice:";

21

cin>>b; switch(b) { case 1: addnewmember(); break; case 2: deletemember(); break; case 3: back();

break; default: cout<<"Enter correct choice:"; break; } getch(); } //TO DISPLAY THE BOOK DETAILS MENU IN THE SCREEN void bookmenu() { int b; cout<<endl; cout<<"1.ADD NEW BOOKS"<<endl;

22

cout<<"2.ISSUE BOOK"<<endl; // cout<<"BOOK DETAILS"<<endl; cout<<"3.BACK"<<endl; cout<<endl; cout<<"Enter your choice:"; cin>>b; switch(b) { case 1: addnewbook(); break; case 2: issuebook(); break; case 3:

back break;

();

default: cout<<"Enter correct choice:"; break; } getch(); } //TO SELECT WHICH OPERATION HAS TO DO

23

void toselectcase() { char y; cout<<endl<<"To continue press any key : "; cin>>y; cout<<endl; if (y='y') { menu(); } else { void exit(); } } //TO GO BACK TO THE PREVIOUS SCREEN void selectcase() { char y;

cout<<endl<<"To continue press any key:"; cin>>y; cout<<endl; if (y='y')

24

{ menu(); } else { void back();

} } //MAIN FUNCTION void main() { menu(); } //TO DELETE MEMBER void deletemember() { //lrscr(); cout<<"ENTER THE BOOK NAME:"; cin>>name; cout<<"ENTER THE ACCOUT NUMBER:"; cin>>accno; cout<<"ENTER THE AUTHOR NAME:"; cin>>aname;

25

cout<<"ENTER THE EDITION OF BOOK:"; cin>>ed; cout<<"ENTER THE RACK NUMBER OF BOOK:"; cin>>rk; cout<<"ENTER THE ROW NUMBER OF BOOK:"; cin>>rw; cout<<"ENTER THE STOCK:"; cin>>stock; { CoInitialize(NULL); try { _RecordsetPtr pRst("ADODB.Recordset"); _bstr_t strCnn("DRIVER={Microsoft Access Driver (*.mdb)};UID=admin;DBQ=LIBRARY.mdb"); pRst->MoveFirst(); while (!pRst->EndOfFile) { cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("NAME")->GetValue())<<" "; cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("VTNO")->GetValue())<<endl; pRst->MoveNext(); } pRst->Close(); } catch (_com_error &e) { cout<<(char*) e.Description(); } 26

::CoUninitialize(); }

selectcase();} /TO DISPLAY THE REPORT MENU void reportmenu() { cout<<endl; int c; cout<<"1.MEMBER DETAILS"<<endl; cout<<"2.BOOK DETAILS"<<endl; cout<<"3.TRANSACTION DETAILS"<<endl; cout<<"4.BACK"<<endl<<endl; cout<<"ENTER YOUR CHOICE:"; cin>>c; switch(c) { case 1: memdetails(); break; case 2: bookdetails(); break; case 3: transactiondetails();

27

break; case 4: back(); break; default: cout<<"ENTER CORRECT CHOICE:"; break; } getch(); } //TO EXIT FROM THE PROGRAM void exit() { exit(); } //TO GO BACK TO THE PREVIOUS SCREEN void back() { cout<<endl; cout<<endl; menu(); } //TO DISPLAY MEMBER DETAILS ON THE SCREEN void memdetails() {

28

{ CoInitialize(NULL); try { _RecordsetPtr pRst("ADODB.Recordset"); _bstr_t strCnn("DRIVER={Microsoft Access Driver (*.mdb)};UID=admin;DBQ=LIBRARY.mdb");

pRst->Open("SELECT * FROM MEMDETAILS ;", strCnn, adOpenStatic, adLockReadOnly, adCmdText);

cout<<endl; cout<<"MEMNO cout<<""<<endl; pRst->MoveFirst(); while (!pRst->EndOfFile) { cout<<endl; cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("MEMNO")-> GetValue())<<" cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("NAME")->GetValue())<<" "; "; "; NAME ADDRESS DOB "<<endl;

cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("ADDRESS")->GetValue())<<" cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("DOB")->GetValue())<<" cout<<"\t"; pRst->MoveNext(); } pRst->Close(); } ";

29

catch (_com_error &e) { cout<<(char*) e.Description(); } } cout<<endl; selectcase(); }

//TO DISPLAY BOOK DETAILS ON THE SCREEN void bookdetails() { { CoInitialize(NULL); try { _RecordsetPtr pRst("ADODB.Recordset"); _bstr_t strCnn("DRIVER={Microsoft Access Driver (*.mdb)};UID=admin;DBQ=LIBRARY.mdb"); pRst->Open("SELECT * FROM BOOKDETAILS ;", strCnn, adOpenStatic, adLockReadOnly, adCmdText); cout<<endl; cout<<"BOOKNO BOOKNAME AUTHOR EDITION PUBLISHER STOCK "<<endl;

pRst->MoveFirst(); while (!pRst->EndOfFile) { cout<<endl; 30

cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("BOOKNO")->GetValue())<<" "; cout<<"\t"; cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("BOOKNAME")->GetValue())<<" "; cout<<"\t"; cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("AUTHOR")->GetValue())<<" "; cout<<"\t"; cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("EDITION")>GetValue())<<" "; cout<<"\t"; cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("PUBLISHER")->GetValue())<<" cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("STOCK")->GetValue())<<" " <<endl; ; //cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("ROWNO")->GetValue())<<" "<<endl; pRst->MoveNext(); //cout<<endl; } pRst->Close(); } catch (_com_error &e) { cout<<(char*) e.Description(); } ::CoUninitialize(); cout<<endl; selectcase(); 31 ";

} }

//TO DISPLAY THE DETAILS OF STUDENTS TAKEN BOOKS FROM THE LIBRARY void transactiondetails() { CoInitialize(NULL); try { _RecordsetPtr pRst("ADODB.Recordset");

_bstr_t strCnn("DRIVER={Microsoft Access Driver (*.mdb)};UID=admin;DBQ=LIBRARY.mdb"); pRst->Open("SELECT * FROM TRANSACTIONDETAILS ;", strCnn, adOpenStatic, adLockReadOnly, adCmdText); cout<<"MEMNO BNO BOOKNAME NAME AUTHOR DATEOFISSUE DATEOFRETURN EDITION"<<endl; pRst->MoveFirst(); while (!pRst->EndOfFile) { cout<<endl; cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("MEMNO")->GetValue())<<" "; cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("BOOKNO")>GetValue())<<" "; cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("BOOKNAME")>GetValue())<<" "; cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("NAME")->GetValue())<<" "; cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("AUTHOR")>GetValue())<<" ";

cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("DATEOFBOOKISSUE")-> GetValue())<<" ";

32

cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("DATEOFBOOKRETURN")> GetValue())<<" "; cout<<(char*) ((_bstr_t) pRst->GetFields()->GetItem("EDITION")->GetValue())<<" "<<endl; pRst->MoveNext(); } pRst->Close(); } catch (_com_error &e) { } selectcase(); } cout<<(char*) e.Description();

33

4. OUTPUT WINDOWS
//MAIN MENU

//MEMBER MENU AND ADDING A NEW MEMBER

//TO GO BACK TO THE MAIN MENU

34

//TO STORE THE DETAILS OF NEW BOOK

35

// TO ISSUE BOOK TO THE MEMBER

// DISPLAYING MEMBER DETAILS

36

// TO DISPLAY THE BOOK DETAILS

// TO DISPLAY THE TRANSACTION DETAILS

37

// TO EXIT THE PROGRAM

38

5. CONCLUSION:

In this we learned more about doing library management in C++ and connecting Database to it. This project needs to refer more books and search websites for doing this project. This makes an additional knowledge for us in C++ and Visual C++. In this Project we connected the database to visual c++ and we learned how to connect the database with c++ this makes an additional knowledge for us by knowing the details.

39

REFERENCE

The following are the books references that have been studied in the duration of making of this project.

OOP WITH C++ BY BALAGURUSAMY SYSTEM ANALYSIS AND DESIGN BY V.RAJARAMAN SOFTWARE ENGINEERING BY K.K. AGRAWAL

WEB REFRENCES www.microsoft.com

40

ACKNOWLEDGEMENT

With profound respect and gratitude, I take the opportunity to convey my thanks to complete the training here. I do extend my heartfelt thanks to Ms. ___________ for providing me this opportunity to be a part of this esteemed organization. I am extremely grateful to all the technical staff of ____ for their co-operation and guidance that has helped me a lot during the course of training. I have learnt a lot working under them and I will always be indebted of them for this value addition in me. I would also like to thank the training incharge of _____________ and all the faculty members of Information Technology Department for their effort of constant co- operation, which have been a significant factor in the accomplishment of my industrial training.

ASHA

41

Das könnte Ihnen auch gefallen