Computer laboratory inventory system

laboratory inventory system thesis and laboratory equipment inventory system
Dr.MattWood Profile Pic
Dr.MattWood,United States,Teacher
Published Date:25-07-2017
Your Website URL(Optional)
Master’s Thesis 2014 Laboratory Inventory System Design and Implementation Candidate: Dona Nathasha Nakandalage Telemark University College Faculty of Technology Kjølnes ring 56 3918 Porsgrunn 1 Introduction This chapter explains the tasks given for the master thesis titled, “Design and Implementation of Laboratory Inventory System” in spring semester at Telemark University College 2014. It also includes the tasks description and background with aim and scope of the work. Furthermore, it includes an explanation of different chapters in the report. 1.1 Task Description and Task Background See Appendix 1 for task description and background given by the supervisor. 1.2 Aim and Scope of the Work This section explains the aim of the thesis with describing necessity of such a system and specifies the scope of each task. Presently an enormous amount of lab equipment (some equipment are very expensive) have been used by students and staff from Faculty of Technology, Telemark University college during their day to day study/teaching activities like research and developments, lab assignments, projects, thesis and lectures. The records of lab equipment (borrower name, reason for borrowing, borrowed date, student number/staff number) are maintained in a written form by lab administrators or owners of the equipment. This takes lots of time of both lab administrators and borrowers as borrower has to go to the office of lab administrator and has to write the details in a form when borrowing or returning the equipment. In the meantime it is the responsibility of lab administrator to find the appropriate form when borrowing or returning equipment, to check deadlines of each record, to maintain the records (may be at the end of each semester to check whether all the equipment are available in the lab or not), to get corrective actions when missing/damaging equipment. Therefore it is obvious that it is a long, time consuming process and the existing system is not so efficient. “Design and Implementation of Laboratory Inventory System” comes as a better solution with many flexible and convenient features, allowing lab administrators and users to maximize efficiency while reducing time wastage. It gives detailed information about users and equipment with vendor and salesman details and will keep track of available equipment and 10issued equipment. It will definitely minimize errors and will be a very good replacement to existing repetitive manual process. 1.2.1 Why Lab Inventory System Several benefits of Lab Inventory System over the manual process can be listed as follows: • Reduce errors and eliminate long and repetitive manual processing • Improved efficiency and effectiveness in administration and management of records • More economical as it minimizes the time usage • Easy to take corrective actions in a timelier manner • Easy access to equipment details as it has search functionality • Increased productivity The whole thesis has been divided into five main tasks as follows: Task 1 The very first task is to design a database for Lab Inventory System using SQL server and ERWin software applications. The database should include tables for storing information about different lab equipment and equipment categories, handling reservations and loans, storing user information, login details and access level information. Moreover, the database should be designed according to database concepts and rules to reduce data redundancy. Task 2 Task two is to design and implement a “LabelWriter” application for printing out barcode labels that can be attached to different equipment and user identity card. This is a standalone application, so that lab administrators can install and configure it in their personal computers. “LabelWriter” application allows searching users or equipment through a web service, selecting an appropriate users or equipment and printing a label with a barcode and other specific data. This allows selecting a default label template or to upload and use their own label template. DYMO Label Writer should be connected and drivers should be installed in the computer for printing labels. Task 3 In task three, a web application has been created for managing and tracking lab equipment data. This allows creating/updating/deleting user profiles, reserving lab equipment, borrowing or returning equipment, granting different access levels, registering/modifying equipment, 11displaying equipment details, searching equipment with name or vendor name or filtered search with equipment categories. This is an online web site, so that each and every registered user can access it from everywhere. Task 4 Task four is to design and implement a smartphone application for easy management of the lab equipment. But design and implementation of “Loan/Return Equipment” application is more important and useful to enhance the functionalities of whole Lab Inventory System than smartphone application, “Loan/Return Equipment” application has been implemented although it was not in the initial task description. “Loan/Return Equipment” application is a standalone application that can be installed and configured in each and every lab with a barcode reader, so that the users can borrow or return equipment with few clicks. It allows scanning equipment and user barcodes and storing records in the database while ensuring minimum time usage. Task 5 Task five is to deliver a written report (thesis report). 1.3 The structure of the report The report is divided into four main parts with nine different chapters to simplify the structure of the report. Each part consists of one or more chapters. The nine chapters in the report contain the following: Chapter 1: Introduction The introduction chapter describes the objectives of the thesis, scope of each and every task and the structure of the report. Chapter 2: Programming Concepts This chapter describes OOP concepts, pros and cons of OOP and theory behind web services. It also details the study carried out to familiarize with Visual Studio and its tools with their features. Chapter 3: Database Design Concepts Chapter three describes the concepts behind database designing, database models and features and functionalities of database design tools. 12Chapter 4: Analysis This chapter details system overview, user categories and functional requirements of “Lab Inventory System” website, “Loan/Return Equipment” application and “LabelWriter” application with Use Case diagrams. Chapter 5: Design Design chapter describes detailed system description, system architecture and database design with database diagram and class diagram. Chapter 6: Implementation This chapter discusses implementation of Lab Inventory System with technical information of the system. Chapter 7: Testing Chapter seven describes testing methods used for Lab Inventory System and bug tracking with TFS during implementation and testing phases. Chapter 8: Deployment This chapter describes deployment methods and steps used for “Lab Inventory System” website, web service, “Loan/Return Equipment” application and “LabelWriter” application. Chapter 9: Conclusion and Future Works The last section is the conclusion. It also gives suggestions for improvements of the system and proposals for future work. 13 Part 2: Theory and Background Part 2 contains “Programming Concepts” and “Database Design Concepts” chapters. It details concepts and theories behind programming and database design with software development tools. 142 Programming Concepts Programming is the process of designing/writing computer applications. Thousands of programming languages have been designed/used with a specific purpose. Even though each programming language has their unique features or syntax, there are certain concepts common to all languages. There are different types of programming styles such as structured programming, object oriented programming, etc. In structured programming, blocks of programming statements (code) are executed one after another. Control statements change which blocks of code is executed next. In object oriented programming, data are contained in objects and is accessed using methods specific to the type of the object. There is no single “flow” of the program as objects can freely interact with one another by passing messages. Figure 2-1 Lab Inventory System This chapter mainly focuses on OOP concepts and pros and cons of OOP. Further it describes the fundamental theory behind web services. As shown in Figure 2-1, “Lab Inventory System” website and web service are implemented using ASP.NET and “LabelWriter” and “Loan/Return Equipment” applications are implemented using WinFroms in Visual Studio. Therefore a detailed study has been carried out to understand and familiarize with the latest version of Visual Studio, ASP.NET and WinForms. 2.1 Object Oriented Programming Concepts OOP is a programming methodology based on objects which is concerned to develop application on real time, so more emphasis is given on data unlike the other programming styles like structured or functional. The concept of having objects makes OOP more organized, reusable and speedy. Today most of the programming languages support OOP. Most of them have enhanced features to make OOP more easy and maintainable. 15Object An object consists of attributes and methods. Attributes define the properties of the object while methods define its behavior. In OOP, object is considered as an instance of a class. Considering Lab Inventory System, “Equipment” and “Customer” can be considered as objects and “Equipment Name” and “Customer Name” can be considered as their attributes. Class A class is simply a representation of a type of object. Using the blueprint analogy, a class is a blueprint of an object, and an object is a building made from that blueprint 1. It consists of a name, attributes and methods. Encapsulation, inheritance and polymorphism are the main fundamental concepts in OOP. 2.1.1 Encapsulation Encapsulation normally refers to information hiding or treating a group of related properties, methods, and other members as a single unit or object 1. Hence encapsulation guarantees integrity of object data and uses methods to access information as shown in Figure 2-2. Figure 2-2 Encapsulation 2 Encapsulation can be achieved using “private”, “public” and “protected” access modifiers. “public” – access is not restricted “private” – access limited to members of same class “protected” – access limited to members of same class or descendants 162.1.2 Inheritance Inheritance describes the ability to create new classes based on an existing class. So the object can inherit properties from another object while defining common codes only one place with 1 enhancing maintainability of the software . Figure 2-3 shows an example of inheritance. According to the Figure 2-3 “Customer” is the parent class. Both “Student” and “Staff” inherit all the fields and methods of the parent class “Customer”. Hence inheritance guarantees code reusability. Figure 2-3 An example of Inheritance 2.1.3 Polymorphism Polymorphism is the ability to take more than one forms depending on data type or class, so that multiple classes can be used interchangeably, even though each class implements the same properties or methods in different ways. Hence polymorphism guarantees maintainability of the software. Interface introduces polymorphism. It contains only definition of methods, properties and events, so the class that implements the interface, has the implementation or declaration to achieve polymorphism. 2.1.4 Advantages of Object Oriented Programming • Easy to maintain and extend existing code • Enhanced code reusability • Object hiding can be achieved 1 Referred from “Object-Oriented Analysis, Design, and Programming using UML and C” lecture notes 2012 made by Nils Olav at Telemark University College 17• Improved reliability and flexibility, as objects can be dynamically called and accessed, new objects may be created at any time • Faster development, as reusing software modules lowers the time usage • Cost effectiveness, as reusing software modules lowers the cost of development 2.1.5 Disadvantages of Object Oriented Programming • Need extra time and effort for planning • Not suitable for all types of problems • OOP programs are generally larger and slower than normal programs 2.2 Web Services A web service is implemented to handle interactions between both “LabelWriter” and “Loan/Return Equipment” applications and database as shown in Figure 2-4. Figure 2-4 “LabelWriter” and “Loan/Return Equipment” applications interact with DB through web service Web service is a software system designed to connect to other software applications. An application can publish its function or message to the rest of the world using web services. Web services use XML to code/decode data. Other applications can interact with web service using SOAP messages. Web services offer many benefits over other types of such systems. • Interoperability – This is the most important benefit of web services. Web Services allow different applications to interact with each other and share data and services among themselves. For example VB or .NET application can communicate with java web services and vice versa. • Low cost communication as web services use SOAP over HTTP protocol. • Reusability • Usability – Other applications have the freedom to choose the web service they need. 18Figure 2-5 shows a logical view of web services architecture which is based on three primary roles, service requester, service provider and service registry. Providers of the web services are known as service providers, users of the web services are known as clients or service requester. The essential part of web services is the interact relationship between a service provider and a service requester. These three roles interact using publish, find and bind operations. The service provider publishes the service description in a service registry. The service requester finds the service description in a service registry and uses the information in the description to bind to a service. The service registry provides a centralized location for storing service descriptions. They will become interface to a huge world of data and query services. UDDI, a platform independent, XML based registry is an example of service registry. Figure 2-5 Web Services Architecture 3 2.3 Visual Studio 2013 As per the task description, Lab inventory System is implemented using Visual Studio 2013. Visual Studio is a comprehensive collection of tools and services to help developers to create a wide variety of apps, both for the Microsoft platform and beyond 4. It was developed by Microsoft. Microsoft has released several versions of Visual Studio as Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio 2012 and the latest version is Visual 19Studio 2013. It is also available in several editions as Visual Studio Express, Visual Studio Professional and Visual Studio Ultimate and is used to develop standalone applications, mobile applications, web sites, web applications and web services. Visual Studio uses Microsoft software development platforms such as Windows API, Windows Forms, Windows Presentation Foundation, Windows Store and Microsoft Silverlight. It can produce both native code and managed code. It supports different programming languages such as C, C++,, and F. It also supports XML/XSLT, HTML/XHTML, JavaScript and CSS. Code editor in Visual Studio supports syntax highlighting and code completion (using IntelliSense) as well as code refactoring. The integrated debugger works both as a source- level debugger and a machine-level debugger and allows stepping through the application line by line while executing. Visual Studio includes designers for windows applications, web applications and mobile applications. 2.3.1 Windows Forms “LabelWriter” and “Loan/Return Equipment” applications are implemented using Windows Forms (WinForms). WinForms is the graphical application programming interface included as a part of Microsoft Visual Studio. It can display data, handle user input and deploy applications easily and with enhanced security. In Windows Forms, a form is a visual surface which displays information to the user. A control is a user interface element that displays data or accepts data input. A form can be enhanced with controls to create the appropriate user interface while adding code to manipulate data. WinForms contains variety of controls such as TextBoxes, Radio Buttons, Buttons, ComboBoxes, GridViews, etc. It supports creating custom controls as well. It has rich user interface components to interact with high end applications like Microsoft Office. 2.3.2 ASP.NET “Lab Inventory System” website and web service are implemented using ASP.NET. ASP.NET is a server-side web application framework developed by Microsoft. It is mainly designed for developing dynamic web sites, web applications and web services and is included as part of Visual Studio. ASP.NET takes the best from Active Server Pages as well as the rich services and features provided by the CLR 5. The result is a robust, scalable, and 20fast web development experience with great flexibility and little coding 5. As it is built on CLR, it allows user to use any supported .NET language. ASP.NET web pages are known as web forms. They are the main building blocks for application development. Web forms contain two components, the visual portion (the ASPX file which contains HTML), and the code behind the form, which resides in a separate class file. They are very similar to Windows Forms, so can enhance user interface by adding controls. As indicated in Figure 2-6, ASP.NET web applications are published in IIS, so that the published websites can be accessed through web browsers. Figure 2-6 Web Forms are part of ASP.NET 5 2.3.3 Team Foundation Server (TFS) TFS is used for source code control and bug tracking of Lab Inventory System. It is the application life cycle management hub for Visual Studio 6. It is a Microsoft product which provides facilities to manage repositories, build process, testing infrastructure, lab deployment and reporting while enabling all stakeholders to participate in the development process using a single solution. It helps developers to connect, collaborate and deliver solutions on time while managing heterogeneous projects. Therefore it is created to get more out of development teams with faster software delivery. 21TFS can be used as a back end to numerous integrated development environments but is designed to provide the most benefit by serving as the back end to Microsoft Visual Studio or Eclipse (on Windows and non-Windows platforms) 7. Figure 2-7 shows the whole usage of TFS. Team members on different platforms can collaborate by using TFS as it covers the whole life cycle of the product/software. Figure 2-7 Usage of TFS 7 223 Database Design Concepts Database is a collection of logically related records (or data). It may consist of enormous number of data. Hence it is really important to manage and organize data within the database. Database Management Systems (DBMSs) are software applications that use to interact with database and the user by giving capability of managing data. It allows tagging, retrieving and manipulating data efficiently and quickly while ensuring the security and unauthorized access. SQL Server is one of the well-known DBMS used today. Lab Inventory System uses a database for storing and managing records of loans and reservations, equipment details and user details. It uses basic database interactions such as insert, select, delete and update in different scenarios (for example when registering equipment or user, displaying equipment details, modifying and deleting equipment or user details, inserting loans and reservations). Figure 3-1 shows database interactions of Lab Inventory System. Figure 3-1 Database Interactions (Insert/Update/Delete/Select) of Lab Inventory System Database model defines the logical structure of the database. Although there are several database models like “Network model”, “Flat Model”, “Hierarchy model” and “Tree model”, “Relational database model” is the most popular database model today because of its efficient and simple data handling. This chapter details the concepts and methodologies related to database design and database models. As per the task description, the database and scripts of Lab Inventory System should be implemented using SQL Server. Hence a detailed study is carried out to understand and familiarize with the latest version of SQL Server and its tools. 233.1 Relational Database Model The idea behind relational data model comes with organizing and storing data in tables. Relations, attributes and domains are the three main key terms used in relational database 2 model . Tables of information is called relations, while attributes refer to the columns of the table and the domain is the set of values the attributes are allowed to take 8. A database column can be defined as a primary key or a foreign key. Primary key is used to identify unique records while foreign key field describes some relationships between tables. One-to- one relationships associate one record in one table with a single record in the other table. One- to-many relationships associate one record in one table with many records in the other table. Figure 3-2 and Figure 3-3 show an example of a table design and a table structure respectively. It is always a good practice to reduce data redundancy (repetition of data) when designing tables to enhance the efficiency of the database. Figure 3-2 Table Design 2 Referred from “Industrial Information Technology” lecture notes 2013 made by Nils Olav at Telemark University College 24 Figure 3-3 Structure of the table 3.2 Database Diagram Database design diagram is a graphical representation of set of entities (tables) and their relationships among each other. Before designing the database diagram, it is necessary to understand the requirements, make assumptions, identify the entities, attributes, data types, limitations and their relationships. Software applications like SQL server, Microsoft Visio and ERWin provide easy and user friendly design package for drawing database diagrams. 3.2.1 ERWin ERWin is a software application for designing databases and it is used to design database diagram of Lab Inventory System. Figure 3-4 Features of ERWin 9 It provides a collaborative data modeling environment to manage enterprise data through an intuitive, graphical interface 10. Figure 3-4 shows supported features of ERWin. 253.3 SQL Server 2012 SQL Server which is developed by Microsoft is the most popular DBMS today. Microsoft has released several versions of SQL Server as SQL Server 2005, SQL Server 2008, SQL Server 2012 and etc. Its main functionality is storing and retrieving data in a secure manner as requested by other applications. T-SQL is the proprietary query language in SQL Server. Microsoft has released several SQL Server editions targeting different user groups such as Web, Express, Enterprise and Standard. 3.3.1 Data Retrieval and Manipulation in SQL Server In a database, data is stored as a collection of tables with typed columns. SQL Server supports different data types such as Integer, Float, Decimal, Char (including character strings), Varchar (variable length character strings), binary, Text and etc. It supports user defined composite types as well. Queries are used for data retrieval operations. The standard SQL commands such as SELECT, INSERT, UPDATE and DELETE are used for basic data manipulation operations. SELECT statement retrieves data from one or more tables. INSERT adds rows to an existing table while UPDATE modifies existing rows in a table. DELETE statement removes existing rows from the tables. SQL Server also allows stored procedures to be defined. A stored procedure is a group of SQL statements that form a logical unit and perform a particular task, and they are used to encapsulate a set of operations or queries to execute on a database server 11. Stored procedures are more quick and efficient than queries as they are complied once and stored in executable form. Hence it requires low memory requirements. Stored procedures improves scalability (increase scalability by isolating application processing on the server), maintainability (can reuse in different applications) and security (users can be granted permission to execute a stored procedure even if they do not have permission to execute the procedure's statements directly 12). Other than that it reduces network traffic with single call execution. 3.3.2 Concurrency and Locking Concurrency refers to allowing multiple users to use same database simultaneously while ensuring data integrity when accessing shared data (for example when several users update same data or try to read data that is in the process of being changed by another user). It is one 26of the main feature that differentiate database from other data sources like spreadsheets. SQL Server provides two modes of concurrency control as pessimistic concurrency and optimistic concurrency. Pessimistic concurrency is controlling concurrent access by using locks. Optimistic concurrency control mechanism allows a new version of a row to be created whenever the row is updated, as opposed to overwriting the row. 3.3.3 SQL Server Management Studio SQL Server Management Studio is a GUI tool included with SQL Server 2005 and later for configuring, managing, and administering all components within Microsoft SQL Server. It includes both script editors and graphical tools that work with objects and features of the SQL server 13. 27 Part 3: Analysis and Design Part 3 contains “Analysis” and “Design” chapters. It details system overview, functional requirements with Use Case diagrams, system architecture and design with database and class diagrams. 28