Sunteți pe pagina 1din 18

Library Management System Version: 1.

0
Detail Level Design Document Date: 15th August, 2008

Library Management System


Detail Level Design Document

Version 1.0

Dated: 15th August, 2008

Authors

K. Sridharan

Revision History
Date Version Description Author
15th August, 2008 1.0 First version Coding Team

Confidential MCA Mini Project Page 1


Library Management System Version: 1.0
Detail Level Design Document Date: 15th August, 2008

Table of Contents

1. Introduction .. 3
1.1 Reference .. 3
2. Programming platform 3
3. Database 3
4. Database tables 3
5. Classes 4
5.1 Class diagram . 4
5.2 Class design detail .5
6. Activity diagrams/State diagram ..7
6.1 Activity diagram of whole system 7
6.2 Activity diagram of each operation .8
6.2.1 Student class 8
6.2.2 Book class . 10
6.2.3 Transaction class 14
6.2.4 MyList class 16

Confidential MCA Mini Project Page 2


Library Management System Version: 1.0
Detail Level Design Document Date: 15th August, 2008

1. Introduction

This document provides a detailed design of the system. Please refer to the requirement
analysis document and high level design document for the overall view and high level
design of the system. This document concentrates on the detailed design of the system,
including database connection, programming platform, activities diagrams of whole
system and each operation of each class.

1.1 References

Requirements Document Version 1.0


High level design Document Version 1.0

2. Programming platform

The system will be written in Java language. Thus our software is system-
independent and can be run in both MS Windows and Unix system. During
development process we will use the MS Windows system.

3. Database

The database being used is the DB2 database system, and the connection to the
database is made by Javas JDBC interface. The tables will be created using SQL
statements; the runtime SQL will be sent to database and the query result will be
sent back to application by JDBC connection.

4. Database tables

T_Transaction
transctionID : VARCHAR(255)
T_Student studentID : VARCHAR(255)
studentID : VARCHAR(255) callNo : VARCHAR(255)
name : VARCHAR(255) <<Non-Identifying>> checkOutDate : TIMESTAMP <<Non-Identifying>> T_Book
street : VARCHAR(255) checkInDate : TIMESTAMP callNo : VARCHAR(255)
1 0..* fines : DOUBLE(64)
city : VARCHAR(255) ISBN : VARCHAR(255)
zipCode : VARCHAR(255) COL_0 : VARCHAR(255) title : VARCHAR(255)
state : VARCHAR(255) COL_1 : VARCHAR(255) 0..* 1 author : VARCHAR(255)
phoneNo : VARCHAR(255) status : VARCHAR(255)
lateFeeTotal : DOUBLE(64) <<PK>> PK_T_Transactio1()
<<FK>> FK_T_Transactio1() <<PK>> PK_T_Book2()
<<PK>> PK_T_Student0() <<FK>> FK_T_Transactio0()
<<Index>> TC_T_Transactio3()
<<Index>> TC_T_Transactio1()

T_MyList
callNo : VARCHAR(255)

<<PK>> PK_T_MyList3()

Confidential MCA Mini Project Page 3


Library Management System Version: 1.0
Detail Level Design Document Date: 15th August, 2008

5. Classes

5.1 Class Diagram

Student
studentID : String
Book name : String
callNo : String Transaction street : String
ISBN : String transctionID : String city : String
title : String studentID : String zipCode : String
author : String callNo : String state : String
status : String checkOutDate : Date phoneNo : String
checkInDate : Date lateFeeTotal : Double
1 n n 1
addBook() fines : Double borrowedBook : Integer
validate()
search() checkin() addStudent()
update() checkout() validateNewStudent()
delete() search()
update()
delete()

MyList
callNo : String

addToMyList()
deleteFromList()
viewList()

Confidential MCA Mini Project Page 4


Library Management System Version: 1.0
Detail Level Design Document Date: 15th August, 2008

5.2 Class Design Details

Student Class :

This class encapsulates all student related operations and details.

Student
studentID : String
name : String
street : String
city : String
zipCode : String
state : String
phoneNo : String
lateFeeTotal : Double
borrowedBook : Integer

addStudent(studentID, name, street, city, zipCode, state, phoneNo) : Boolean


validateNewStudent() : Integer
search(studentID, name) : Object
update(name, studentID, street, city, zipCode, state, phoneNo) : Boolean
delete(studentID) : Boolean

Book Class :

This class encapsulates all Book related operations and details.

Book
callNo : String
ISBN : String
title : String
author : String
status : String

addBook(callNo, ISBN, title, author) : Boolean


validate() : Integer
search(callNo, ISBN, title, author) : Object
update(callNo, ISBN, title, author) : Boolean
delete(callNo) : Boolean

Confidential MCA Mini Project Page 5


Library Management System Version: 1.0
Detail Level Design Document Date: 15th August, 2008

Transaction Class :

This class encapsulates a single transaction, and maps a student to a book which has been checked out. All
associated details of a transaction are also stored in this class (late fees, checkin, checkout dates).

Transaction
transctionID : String
studentID : String
callNo : String
checkOutDate : Date
checkInDate : Date
fines : Double

checkin(callNo) : Boolean
checkout(studentID, callNo) : Boolean

MyListClass :

This class encapsulates the usecases related to maintaing a temporary subset of user selected books
during a search operation.

MyList
callNo : String

addToMyList(callNo) : Boolean
deleteFromList(callNo) : Boolean
viewList() : Object

Confidential MCA Mini Project Page 6


Library Management System Version: 1.0
Detail Level Design Document Date: 15th August, 2008

6. Activity diagrams/State diagrams

6.1 State diagram of whole system

Totally 12 windows.
All states except "Display Exit Info"
can go back to Main Menu.

Help
Get Help Content
Enter Book Info Add a book Main Menu
14
1 Add a student
do/ Insert a student into DB
Enter Student Info
7
Reset Search students do/ Insert student into DB
Search books
Exit

View Mylist
Enter Search Info
Enter Search Info
11
2 Update/Delete
Search
Display
Back
Exit Info
Display MyList
5 Display Results
New Search 12
exit/ Send from List message Check In/Out
entry/ Search students in DB

Search
Add to list View Detail / UpdateDelete

Update,Delete
Add to list Display Book Detail
4 Check In/Out
Back Update Detail
do/ Update, Delete 60
do/ Update,Delete
View Detail
Display Results
3
Check In/Out
entry/ Search books in DB
Check In/Out

Enter books. student Info


13
do/ Check In, Check Out

Confidential MCA Mini Project Page 7


Library Management System Version: 1.0
Detail Level Design Document Date: 15th August, 2008

6.2 Activity diagram of each operation

6.2.1 Student class

AddStudent : add a new student

validateStudent [ exists ] return error


message

[ not exists ]

add the student record to return success


Student table message

DeleteStudent : delete an existing student

validateStudent [ not exists ] return error


message

[ exists ]

delete the student record return success


to Student table message

UpdateStudent : update information of existing student

Update the student record in


the Student table

Confidential MCA Mini Project Page 8


Library Management System Version: 1.0
Detail Level Design Document Date: 15th August, 2008

SearchStudent : search students

Query the student record


in Student table

return Resultset

ValidateStudent : validate student

Query the student in Student


table according to studentID

Return [ not empty ] Return true


Resultset

[ empty ]

Return false

Confidential MCA Mini Project Page 9


Library Management System Version: 1.0
Detail Level Design Document Date: 15th August, 2008

6.2.2 Book class

addBook: Add a new book in database

Check Book record


in database

yes Return "Book already


exist
exist" message

no

Insert book record


in database

return success
message

Confidential MCA Mini Project Page 10


Library Management System Version: 1.0
Detail Level Design Document Date: 15th August, 2008

exist: Check if the book record already exist in database.

Search Book record


in database

no return not exist


found record?
message

yes

return exist
message

Confidential MCA Mini Project Page 11


Library Management System Version: 1.0
Detail Level Design Document Date: 15th August, 2008

searchBook: Search books in database

search book record


in database

return
resultset

updateBook: modify book info

update record in
database

return success
message

Confidential MCA Mini Project Page 12


Library Management System Version: 1.0
Detail Level Design Document Date: 15th August, 2008

deleteBook: Delete a book in database

check
existence

no
exist?

yes

delete the
record return fail
message

return success
message

Confidential MCA Mini Project Page 13


Library Management System Version: 1.0
Detail Level Design Document Date: 15th August, 2008

6.2.3 Transaction class

checkIn() : check in one book

SQL Statement
(Update.....)

Exception? Yes
Print "error
message"
No

return true return false

Confidential MCA Mini Project Page 14


Library Management System Version: 1.0
Detail Level Design Document Date: 15th August, 2008

checkOut() : check out one book

SQL Statement
(Update.....)

Exception? Yes
Print "error
message"
No

return true return false

Confidential MCA Mini Project Page 15


Library Management System Version: 1.0
Detail Level Design Document Date: 15th August, 2008

6.2.4 MyList class

addTolist() : add one book to mylist

SQL Statement
(Insert.....)

Exception? Yes
Print "error
message"
No

return true return false

Confidential MCA Mini Project Page 16


Library Management System Version: 1.0
Detail Level Design Document Date: 15th August, 2008

deleteFromList() : delete one book from mylist

SQL Statement
(Delete.....)

Exception? Yes
Print "error
message"
No

return true return false

Confidential MCA Mini Project Page 17


Library Management System Version: 1.0
Detail Level Design Document Date: 15th August, 2008

Mylist.viewList() : retrieve books in mylist

SQL Statement
(Select....)

Exception? Yes
Print "error
message"
No

return true return false

Confidential MCA Mini Project Page 18

S-ar putea să vă placă și