Friday 6 December 2013

Modeling the Library



The week before I left my hometown to get back to Islamabad, my old school principle insisted me on paying a visit to my old school. I couldn’t refuse her. So there was I standing at the very place where my life began. It was a chilly Friday afternoon and the students had left for their homes at noon.  I was roaming from one empty classroom to another, bumping into teachers and exchanging greetings. Every nook and corner that I visited reminded me of my old friends and all the memories started playing like a movie in front of my eyes.
I stepped into our library. And just how a typical SE analyst would react, my instant reaction to the manual library management was ‘Damn! You still perform all the functions manually?’ The librarian turned back to respond, “Yes Ma’am!” recognized me and smiled warmly to welcome me. I walked ahead, exchanged few greetings and quickly resumed our discussion on the topic. When asked, he told me that the school library still records information about the books, the library members and transactions such as issuing and returning books in ledgers and registers.  Like other manual information systems, this system faces many data-related issues such as data redundancy, delayed retrieval of data, data corruption and inefficiency. As the number of members is increasing, maintaining manual records has become a difficult task for him. Searching for a particular record is equally difficult and time consuming. For instance, when he needs to know about the status of a book (whether it is issued or not), he has to manually traverse all the records one by one to find if that book has been issued/returned/not issued. Moreover, manually producing the reports for the issued books, the books in the library, members, or accounts becomes cumbersome because there are hundreds and thousands of records to go through.

This is one instance of the manual systems that you’ll encounter in your SE field and that you’ll have to find solutions for. To help us understand the functionality of such a system, analyse it and find software solutions for it, we take help of system modelling! One of the major components of the System Specification Stage of SDLC is the system modeling. Now the name sufficiently explains what it is about, modeling the system is the process of developing abstract views of an existing system or a proposed system. How about we find software solutions for my old school’s library system through system modeling? If you are interested, let’s go ahead!


Choosing a Model Type


To model our existing library system, we need to choose the model type that will help us clarify what the existing system does and use it as a basis for discussing the existing system’s strengths and weaknesses. This will lead us to understand the requirements for the new system. 




Each of these model types can be implemented using different UML diagram types. Don’t know what UML diagrams are? Don’t worry, we’ll explain. UML stands for Unified Modeling Language. <definition>
When you want to illustrate the operational context of a system, system boundaries are established to define what is inside and what is outside the system.


However, context models simply show the other systems in the environment, not how the system being developed is used in that environment. Process models reveal how the system being developed is used in broader business processes. These can be defined using UML activity diagrams.
In the interactive models, we can model either the system-to-system interaction or the component interaction using Use cases and sequence diagrams. Each use case represents a discrete task that involves external interaction with a system. Actors in a use case are people or other systems involved in those interactions. For example, the Use Cases for our Library Management system are Add a New Member, Edit Member details, Add a New Book, Edit Book details,  Issue a Book, Return a Book and Pay Fine.






Similarly, Sequence diagrams are part of the UML and are used to model the interactions between the actors and the objects within a system. (Learn more about Use Cases here and Sequence diagrams here)

In Structural modeling, you can use Class diagrams. Suppose we have decided to build an object-oriented system for our library. This system will consist of a number of classes such as Books and Members. The class Book shown below stores the attributes of all the books available in the library and the functions that can be performed.

The class diagram will show all the classes in a system and the associations between these classes. Lastly, State diagrams can be used to define Behavioral models. These are models of the dynamic behavior of a system as it is executing. They show how the system reacts to internal and external events.
So now, you have seen how many different ways are available to you to model a system using UML.
Planning the Proposed System
From activity diagrams to use cases, all the UML diagrams are easy to use and help you understand the working of a system and come up with the requirements for the new system.. In our existing system, the librarian recorded the details about the books and the library members and transactions such as issuing and returning books in ledgers and registers.  Using the system modelling, we concluded that our proposed system can be an object-oriented system.
Every new member fills a standardized form and gives his personal information such as his full name, address, contact number, CNIC number to the librarian. The librarian updates the database with the new member’s details using a member class instance and issues him a membership card and a member_ID. Similarly, Every new book purchased for the library is given a Book_ID and its details such Book Title, Author Name, Publisher, SSDN etc are recorded in a Books Relation using the Book Class instances. Whenever a member wishes to issue a book , the issue_book function is called. It checks the Members Relation to ensure that he has returned the previously issued book.

Final Words
See how easy it was?  For drill, you can study these UML diagrams further and come up with the rest of the functional requirements of the proposed Library Mgt System yourself.

What we learnt today:
  •  What is System modeling?
  •  What is Unified Modeling Language (UML)?
  • How does system modelling help the analyst to understand the functionality of the system?



No comments:

Post a Comment