You are on page 1of 18

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

Library Management System Detail Level Design Document


Version 1.0

Thursday Team Dated: 23th April 2002 Authors Zhouxuan Teng zt0873@albany.edu (Leader) Zhaohui Yang Jie Tang jamesyzh@yahoo.com cnjasontang@yahoo.com

Revision History
Date 22th April 2002 Version 1.0 First version Description Author Coding Team

Confidential

CSI 518 : Thursday Team

Page 1

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

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

CSI 518 : Thursday Team

Page 2

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

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 Ver 1.1

High level design Document Ver 1.1

2.

Programming platform The system will be written in Java language. Thus our software is systemindependent 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

Confidential

CSI 518 : Thursday Team

Page 3

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

T_Student studentID : VARCHAR(255) name : VARCHAR(255) street : VARCHAR(255) city : VARCHAR(255) zipCode : VARCHAR(255) state : VARCHAR(255) phoneNo : VARCHAR(255) lateFeeTotal : DOUBLE(64) <<PK>> PK_T_Student0()

<<Non-Identifying>> 1
1

0..*

T_Transaction transctionID : VARCHAR(255) studentID : VARCHAR(255) callNo : VARCHAR(255) checkOutDate : TIMESTAMP checkInDate : TIMESTAMP fines : DOUBLE(64) COL_0 : VARCHAR(255) COL_1 : VARCHAR(255) <<PK>> PK_T_Transactio1() <<FK>> FK_T_Transactio1() <<FK>> FK_T_Transactio0() <<Index>> TC_T_Transactio3() <<Index>> TC_T_Transactio1()

<<Non-Identifying>>

0..*

T_Book callNo : VARCHAR(255) ISBN : VARCHAR(255) title : VARCHAR(255) author : VARCHAR(255) status : VARCHAR(255) <<PK>> PK_T_Book2()

T_MyList callNo : VARCHAR(255) <<PK>> PK_T_MyList3()

5.
5.1

Classes

Class Diagram
Student studentID : String name : String street : String city : String zipCode : String state : String phoneNo : String lateFeeTotal : Double borrowedBook : Integer addStudent() validateNewStudent() search() update() delete()

Book callNo : String ISBN : String title : String author : String status : String addBook() validate() search() update() delete() 1 n

Transaction t rans ctionID : String student ID : String callNo : String checkOutDat e : Dat e checkInDate : Date n fines : Double checkin() checkout()

MyList callNo : String addToMyList() delet eFromList() viewList()

Confidential

CSI 518 : Thursday Team

Page 4

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

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

CSI 518 : Thursday Team

Page 5

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

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

CSI 518 : Thursday Team

Page 6

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

6. 6.1

Activity diagrams/State diagrams State diagram of whole system

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

Get Help Enter Book Info 14 do/ Insert a student into DB Reset Search books View Mylist Update/Delete Display Exit Info Display MyList 5 exit/ Send from List message Check In/Out Ex it Enter Search Info 11 Search Back Add a book Main Menu 1 Add a student

Enter S tudent In fo 7 Search students do/ Insert student into DB

Enter Search Info 2

New Search

Display Results 12 entry/ Search students in DB

Search Add to list View Detail / UpdateDelete Update,Delete Check In/Out Update Detai l 60 do/ Update,Delete

Add to list Back View Detail

Display Book Det ail 4 do / Update, Delete

Display Results 3 entry/ Search books in DB

Check In/Out Check In/Out Enter books. student Info 13 do/ Check In, Check Out

Confidential

CSI 518 : Thursday Team

Page 7

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

6.2 6.2.1

Activity diagram of each operation Student class

AddStudent : add a new student

validat eStudent

[ exists ]

return error message

[ not exist s ]

add the student record to Student table

return success message

DeleteStudent : delete an existing student

validat eStudent

[ not exist s ]

return error message

[ exists ]

delete t he student record to Student table

return success message

UpdateStudent : update information of existing student

Update the student record in the Student table

Confidential

CSI 518 : Thursday Team

Page 8

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

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 Resultset

[ not empty ]

Return true

[ empty ] Return false

Confidential

CSI 518 : Thursday Team

Page 9

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

6.2.2

Book class

addBook: Add a new book in database

Check Book record in database

exist

yes

Return "Book already exist" message

no Insert book record in database

return success message

exist: Check if the book record already exist in database. Confidential CSI 518 : Thursday Team Page 10

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

Search Book record in database

found record?

no

return not exist message

yes return exist message

searchBook: Search books in database Confidential CSI 518 : Thursday Team Page 11

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

search book record in database

return resultset

updateBook: modify book info

update record in database

return success message

deleteBook: Delete a book in database Confidential CSI 518 : Thursday Team Page 12

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

check existence

exist? yes

no

delete the record

return fail message

return success message

Confidential

CSI 518 : Thursday Team

Page 13

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

6.2.3

Transaction class

checkIn() : check in one book

SQL Statement (Update.....)

Exception? No return true

Yes

Print "error message" ret urn false

Confidential

CSI 518 : Thursday Team

Page 14

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

checkOut() : check out one book

SQL Statement (Update.....)

Exception? No return true

Yes

Print "error message" ret urn false

Confidential

CSI 518 : Thursday Team

Page 15

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

6.2.4

MyList class

addTolist() : add one book to mylist

SQL Statement (Insert.....)

Exception? No return true

Yes

Print "error message" ret urn false

Confidential

CSI 518 : Thursday Team

Page 16

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

deleteFromList() : delete one book from mylist

SQL Statement (Delete.....)

Exception? No return true

Yes

Print "error message" ret urn false

Confidential

CSI 518 : Thursday Team

Page 17

Library Management System Detail Level Design Document

Version: 1.0 Date: 23-Apr-2002

Mylist.viewList() : retrieve books in mylist

SQL Statement (Select....)

Exception? No return true

Yes

Print "error message" ret urn false

Confidential

CSI 518 : Thursday Team

Page 18

You might also like