Submitted To:-
Mrs. Monika Soni Maam Department of Computer Science & Engineering Marudhar Engineering College, Bikaner
ACKNOWLEDGEMENT
I have taken efforts in this project. However, it would not have been possible without the kind support and help of many individuals and organizations. I would like to extend my sincere thanks to all of them. I would like to express my deepest appreciation to Marudhar Engineering College , Bikaner for every support and opportunities provided time to time. I am highly indebted to Acme Embedded Technologies Pvt. Ltd. , Bikaner for its guidance and constant supervision as well as for providing necessary information regarding the project & also for their support in completing the project.
I would like to express my gratitude towards My Parents & Mr. Manish Shandilya (Director of Acmeet Group) for their kind co-operation and encouragement which help me in completion of this project.
My thanks and appreciations also go to my colleague in developing the project and people who have willingly helped me out with their abilities.
CERTIFICATION
PREFACE
To develop a project in any language means to combine required features of the language, in a well planned, systematic way so as to develop an application after the analysis of requirement, so that it will be commercially helpful. In terms of its ultimate objectives it gives an experience of realistic application. The aim of this project is to be realistic and efficient, by using Java programming language. The project was aimed to achieve full fledge user friendliness with GUI support and to be easily understandable as possible. We have tried a lot to achieve all the characteristics of good application.
ORGANIZATION PROFILE
Acme Embedded Technologies Pvt. Ltd. - A Website & Software development company in INDIA which offers website design, web solutions business and also quality web design. Main focus is to satisfy clients with high quality services. Expert in all types of projects from large IT projects to web based projects to internet pluses. Clientele gain great web services and web solution within the time and at reasonable rates. High quality services help customers to achieve their tactical targets very soon.
Custom Web Programming (J2EE, PHP, ASP.NET) Website Design (Web, Graphics, Logo) Web Hosting Software Development Training (C , C++ , Java , Advance Java , PHP/MySQL , C#.net , Asp.net , Salesforce , Oracle , OCJP etc.)
CONTENTS
S No. 1 2
Contents Abstract Of A Project Java Overview Java History Java Feature Difference Between Java and C/C++ Java Virtual Machine
Java Swing Introduction Swing Component Java Database Connectivity Introduction Jdbc Architecture o o Two Tire Architecture Three Tire Architecture Components of JDBC JDBC Driver Connectivity Steps o o o o Loading a Database Driver Creating a JDBC Connection Creating a jdbc statement object Executing a statement Database Connection Closing JDBC connection
13-14
15 15-16 17 17
17
18
18
19 20
Overview of project Objective Scope Product Feature Product Skeleton System Design o o o o o Input Design Output Design Database Design Data Flow Diagram Entity Relationship Diagram Software testing Integration Testing Snap Shots
29 29-30 31-36
Tables
37-39
Conclusion
40
Bibliography
41
MEANING OF A PROJECT The meaning of project is to give physical existence to creative brain idea and thought. Project is a great source to develop technical and project oriented skills in fields for a student as a base for a kick start in the Technical World. During the programming of the project student goes through different problems and experience. A student gets a change to climb on the roof of practical knowledge to economize to go at the fields. A very important aim of this world PROJECT consist of seven alphabets each of them has separate meaning.
P for PLANNING If Planning is good, then an impressive half work is done. R for RELAIABLE SOURCE Practice and theoretical material & able guidance and assistance is achieved from different sources to promote the function of planned area.
O for OVERALL EXPENSES Overall expenses to provide final design to any project is also considerable. Their expenses are analyzed for each concepts and method of working on the computer.
J for JOINT EFFORTS Joint efforts are much necessary for programming and result of any project. Many times some problems as books etc., are solved for external sources.
E for ECONOMIC TIME FEASIBILITY It is important that the planned scheme is economic time feasible. It is must to estimate completion of the project.
C for CONSTRUCTION After analyzing the project work is done to give logical existence of planned scheme. T for TESTING Testing of program is done before submitting the project after resting the gadget is ok for use.
SYSTEM SPECIFICATION:
HARDWARE SPECIFICATION o o o o o o o o o o o o o Processor Clock Speed System Bus RAM HDD : : : : : Intel Corei3 2.40 GHz 32-bit 4 GB 500 GB
SOFTWARE SPECIFICATION OS Front End Mid End Back End Time Human resource(min.) Project leader Programmer : : : : : : : : MS WINDOWS 7 Premium JAVA JDBC_ODBC_DRIVER MS-ACCESS 45 days (Approx) one one one
DESCRIPTION:
LIBRARY MANAGEMENT SYSTEM is a software application to maintain the record related to Book Purchase, Book Search, Catalogue, Book Issue, Book Returns, Fine Collection, and all necessary requirements for the Library to manage day to day operations. The software Library Management System has four main modules: Insertion to Database Module User friendly input screen. Extracting from Database module Attractive Output Screen. Output module borrowed book list & Available book list. Search Facility system search for books and members.
JAVA HISTORY:
Java is a programming language originally developed by James Gosling at Sun Microsystems (which has since merged into Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities than either C or C++. Java applications are typically compiled to byte code (class file) that can run on any Java Virtual Machine (JVM) regardless of computer architecture. Java is a general-purpose, concurrent, class-based, object-oriented language that is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "Write Once,Run Anywhere" (WORA), meaning that code that runs on one platform does not need to be recompiled to run on another. Java is as of 2013 one of the most popular programming languages in use, particularly for client-server web applications, with a reported 10 million users.
JAVA FEATURE:
PLATFORM INDEPENDENT: The concept of Write-Once,Run-Anywhere (known as the Platform independent) is one of the important key feature of java language that makes java as the most powerful language. Not even a single language is idle to this feature but java is more closer to this feature. The programs written on one platform can run on any platform provided the platform must have the JVM. SIMPLE: There are various features that makes the Java as a simple language. Programs are easy to write and debug because Java does not use the pointers explicitly. It is much harder to write the Java programs that can crash the system but we can not say about the other programming languages. Java provides the bug free system due to the strong memory management. It also has the automatic memory allocation and deallocation system
OBJECT ORIENTED: To be an Object Oriented language, any language must follow at least the four characteristics.
Inheritance : It is the process of creating the new classes and using the behavior of the existing classes by extending them just to reuse the existing code and adding the additional features as needed.
Encapsulation: It is the mechanism of combining the information and providing the abstraction.
Polymorphism: As the name suggest one name multiple form, Polymorphism is the way of providing the different functionality by the functions having the
Dynamic binding : Sometimes we don't have the knowledge of objects about their specific types while writing our code. It is the way of providing the maximum functionality to a program about the specific type at runtime. Everything in Java is object, even the primitive data types can also be converted into object by using the wrapper class.
ROBUST:
Java has the strong memory allocation and automatic garbage collection mechanism. It provides the powerful exception handling and type checking mechanism as compare to other programming languages. Compiler checks the program whether there any error and interpreter checks any run time error and makes the system secure from crash. All of the above features makes the Java language robust.
DISTRIBUTED:
The widely used protocols like HTTP and FTP are developed in Java. Internet programmers can call functions on these protocols and can get access the files from any remote machine on the internet rather than writing codes on their local system.
PORTABLE:
The feature Write-Once,Run-Anywhere makes the Java language portable provided that the system must have interpreter for the JVM. Java also have the standard data size irrespective of operating system or the processor. These features makes the Java as a portable language.
DYNAMIC: While executing the Java program the user can get the required files dynamically from a local drive or from a computer thousands of miles away from the user just by connecting with the Internet.
SECURE:
Java does not use memory pointers explicitly. All the programs in Java are run under an area known as the Sand Box. Security manager determines the accessibility options of a class like reading and writing a file to the local disk. Java uses the Public Key Encryption system to allow the Java applications to transmit over the internet in the secure encrypted form. The Bytecode Verifier checks the classes after loading.
PERFORMANCE:
Java uses native code usage, and lightweight process called threads. In the beginning interpretation of bytecode resulted the performance slow but the advance version of JVM uses the adaptive and Just In Time(JIT) compilation technique that improves the performance.
MULTITHREADED:
Java is also a Multithreaded programming language. Multithreading means a single program having different threads executing independently at the same time. Multiple threads execute instructions according to the program code in a process or a program. Multithreading works the similar way as multiple processes run on one computer.
Multithreading programming is a very interesting concept in Java. In multithreaded programs not even a single thread disturbs the execution of other thread. Threads are obtained from the pool of available ready to run threads and they run on the system CPUs. This is how Multithreading works in Java.
INTERPREATED:
The interpreter program reads the source code and translates it on the fly into computations. Thus, Java as an interpreted language depends on an interpreter program. The versatility of being platform independent makes Java to outshine from other languages. The source code to be written and distributed is platform independent. Another advantage of Java as an interpreted language is its error debugging quality. Due to this any error occurring in the program gets traced. This is how it is different to work with Java.
NEUTRAL ARCHITECTURE:
The term seems to be weird, but yes Java is an architectural neutral language as well. The growing popularity of networks makes developers think distributed. In the world of network it is essential that the applications must be able to migrate easily to different computer systems. Not only to computer systems but to a wide variety of hardware architecture and Operating system architectures as well. The Java compiler does this by generating byte code instructions, to be easily interpreted on any machine and to be easily translated into native machine code on the fly. The compiler generates an architecture-neutral object file format to enable a Java application to execute anywhere on the network and then the compiled code is executed on many processors, given the presence of the Java runtime system.Hence Java was designed to support applications on network. This feature of Java has thrived the programming language.
JAVA AND C:
Java does not include the unique keywords Sizeof, and typedef. Java does not contain the data types struct and union. Java does not define the type modifiers keywords auto, extern, register, signed and unsigned. Java does not support an explicit pointer type. Java added new operator such as instanceof and >>>. Java added labelled break and continue statements. Java added many feature required for Object-oriented programming.
Java does not support operator overloading. Java does not have template classes as in C++. Java does not support multiple Inheritance of classes. This is accomplished using a new feature calledInterface. Java does not support global variables. Every variable and method is declared within a class and forms part of that class. Java does not use pointer. There are no header files. Java replaced the destructor function with a finalize() method.
Process of compilation
Java Program
Java Compiler
Virtual Machine
The virtual machine code is not machine specific. The machine specific code is generated by the Java interpreter by acting as an intermediary between the virtual machine and real machine.
JVM
Bytecode Loader
Java Interpreter
Machine Code
SWING INTRODUCTIONSwing library is an official Java GUI toolkit released by Sun Microsystems. It is used to create Graphical user interfaces with Java.
SWING COMPONENTS:
Basic Controls: JButton JCheckBox JComboBox JList JMenu JRadioButton JSlider JSpinner JTextField JPasswordField
Interactive Displays of Highly Formatted Information: JColorChooser JEditorPane JFileChooser JTable JTextArea JTree
INTRODUCTION JDBC stands for Java Database Connectivity. The Java JDBC API enables Java applications to connect to relational databases via a standard API, so your Java applications become independent (almost) of the database the application uses. Using JDBC you can send SQL, PL/SQL statements to almost any relational database. JDBC is a Java API for executing SQL statements and supports basic SQL functionality.
The JDBC library includes APIs for each of the tasks commonly associated with database usage: Making a connection to a database Creating SQL statements Executing that SQL queries in the database
JDBC ARCHITECTUREThe JDBC API supports both two-tier and three-tier processing models for database access.
In the two-tier model, a Java application talks directly to the data source. This requires a JDBC driver that can communicate with the particular data source being accessed. A user's commands are delivered to the database or other data source, and the results of those statements are sent back to the user. The data source may be located on another machine to which the user is connected via a network. This is referred to as a client/server configuration, with the user's machine as the client, and the machine housing the data source as the server. The network can be an intranet, which, for example, connects employees within a corporation, or it can be the Internet.
In the three-tier model, commands are sent to a "middle tier" of services, which then sends the commands to the data source. The data source processes the commands and sends the results back to the middle tier, which then sends them to the user. MIS directors find the three-tier model very attractive because the middle tier makes it possible to maintain control over access and the kinds of updates that can be made to corporate data. Another advantage is that it simplifies the deployment of applications. Finally, in many cases, the three-tier architecture can provide performance advantages.
Until recently, the middle tier has often been written in languages such as C or C++, which offer fast performance. However, with the introduction of optimizing compilers that translate Java byte code into efficient machine-specific code and technologies such as Enterprise JavaBeans, the Java platform is fast becoming the standard platform for middle-tier development. This is a big plus, making it possible to take advantage of Java's robustness, multithreading, and security features.
With enterprises increasingly using the Java programming language for writing server code, the JDBC API is being used more and more in the middle tier of a three-tier architecture. Some of the features that make JDBC a server technology are its support for connection pooling, distributed transactions, and disconnected row sets. The JDBC API is also what allows access to a data source from a Java middle tier.
MAIN COMPONENTS OF JDBC Driver Manager: Manages a list of database drivers that matches connection requests from the java application with the proper database driver using communication sub protocol. The first driver that recognizes a certain sub protocol under JDBC will be used to establish a database Connection. Driver: The database communications link, handling all communication with the database. Normally, once the driver is loaded, the developer need not call it explicitly. Connection: Interface with all methods for contacting a database. The connection object represents communication context, i.e., all communication with database is through connection object only.
Statement: Encapsulates an SQL statement which is passed to the database to be parsed, compiled, planned and executed.
Result Set:
JDBC DRIVERS-
The JDBC API defines the Java interfaces and classes that programmers use to connect to databases and send queries. A JDBC driver implements these interfaces and classes for a particular DBMS vendor.
A Java program that uses the JDBC API loads the specified driver for a particular DBMS before it actually connects to a database. The JDBC DriverManager class then sends all JDBC API calls to the loaded driver.
JDBC-ODBC bridge plus ODBC driver, also called Type 1. Translates JDBC API calls into Microsoft Open Database Connectivity (ODBC) calls that are then passed to the ODBC driver. The ODBC binary code must be loaded on every client computer that uses this type of driver.
Native-API, partly Java driver, also called Type 2. Converts JDBC API calls into DBMS-specific client API calls. Like the bridge driver, this type of driver requires that some binary code be loaded on each client computer.
JDBC-Net, also called Type 3. Sends JDBC API calls to a middle-tier net server that translates the calls into the DBMS-specific network protocol. The translated calls are then sent to a particular DBMS.
Native-protocol, pure Java driver, also called Type 4. Converts JDBC API calls directly into the DBMS-specific network protocol without a middle tier. This allows the client applications to connect directly to the database server.
JAVA DATABASE CONNECTIVITY STEPSBefore we create a java jdbc connection to the database, we must first import the java.sql package. import java.sql.*; The star ( * ) indicates that all of the classes in the package java.sql are to be imported.
A JDBC Connection represents a session/connection with a specific database. Within the context of a Connection, SQL, PL/SQL statements are executed and results are returned. An application can have one or more connections with a single database, or it can have many connections with different databases. A Connection object provides metadata i.e. information about the database, tables, and fields. It also contains methods to deal with transactions.
Once a connection is obtained we can interact with the database. Connection interface defines methods for interacting with the database via the established connection. To execute SQL statements, you need to instantiate a Statement object from your connection object by using the createStatement() method.
A statement object is used to send and execute SQL statements to a database. Three kinds of Statements
EXECUTING A SQL STATEMENT WITH THE STATEMENT OBJECT, AND RETURNING A JDBC
Result Set Statement interface defines methods that are used to interact with database via the execution of SQL statements. The Statement class has three methods for executing statements: executeQuery(), executeUpdate(), and execute(). For a SELECT statement, the method to use is executeQuery . For statements that create or modify tables, the method to use is executeUpdate. Statements that create a table, alter a table, or drop a table are all examples of DDL statements and are executed with the method executeUpdate. execute() executes an SQL statement that is written as String object. ResultSet provides access to a table of data generated by executing a Statement. The table rows are retrieved in sequence. A ResultSet maintains a cursor pointing to its current row of data. The next() method is used to successively step through the rows of the tabular results.
ResultSetMetaDataInterface holds information on the types and properties of the columns in a ResultSet. It is constructed from the Connection object.
Import JDBC Packages: Add import statements in Java program to import required classes in your Java code. import java.sql.* ; // for standard JDBC programs
Register JDBC Driver: This step causes the JVM to load the desired driver implementation into memory so it can fulfill your JDBC requests.
Database URL Formulation: This is to create a properly formatted address that points to the database to which you wish to connect.
Create Connection Object: Finally, code a call to the DriverManager object's getConnection( ) method to establish actual database connection.
Relying on garbage collection, especially in database programming, is very poor programming practice. You should make a habit of always closing the connection with the close() method associated with connection object.
To ensure that a connection is closed, you could provide a finally block in your code. A finally block always executes, regardless if an exception occurs or not. To close above opened connection you should call close() method as follows: conn.close();
Library Management contains all the details regarding a library. The project created by using Java. The main components used are: JAVA as language SQL Connectivity
The project will have two panels i.e. Student Panel and Management Panel. In Student Panel there will be all information regarding a student belonging to particular institute for example book records, issued books, submitted books, students semester etc., while in Management Panel management will have info regarding all library like books detail, book records, students info etc. .
OBJECTIVE:
The main objective of the application is to automate the existing system of manually maintain the records of the Book Issue, Book Return from the student, Stock Maintenance, catalogue and Book Search to be computerized. So the Book Issue, Return, Searching will be faster.
SCOPE:
This application can be used by any Library to automate and make it easy the process of manually Maintaining the records related to the subject, Maintaining the stock and Book Issues.
PRODUCT FEATURES:
There is one users who will be using this product.
The features that are available to the librarian are : Librarian who will be acting as the administrator A librarian can issue a book to the student Can view the different categories of books available in the Library. Can view the List of books available in each category Can take the book returned from students Add books and their information of the books to the database Can check the report of the issued Books. Can Make entry of waiting student for a Books.
Further there are two section in this product : STUDENT PANEL MANAGEMENT PANEL
Here STUDENT PANEL contains : Add new Student Delete Student Edit Student Record Issue Book Submit Book And Student Detail showing details of student including Book issued and submitted on the name of that student
Here MANAGEMENT PANEL contains: Add new Book Edit Book Detail Book query Waiting Entry Delete Complete Record of Students(if they are Passing out from School/college)
PRODUCT SKELTON:
login
Student Panel
Management Panel
Add Student
Delete Student
Book Query
Book Issue
Waiting Entry
Book Submission
Student Detail
Search Book
The goal of designing input data is to make enter easy, logical and free from errors as possible. The entering data entry operators need to know the allocated space for each field; field sequence and which must match with that in the source document. The format in which the data fields are entered should be given in the input form .Here data entry is online/offline, it makes use of processor that accepts commands and data from the operator through a keyboard. The input required is analyzed by the processor. It is then accepted or rejected. Input stages include the following processes: Data Recording Data Transcription Data Conversion Data Verification Data Control Data Transmission Data Correction
One of the aims of the system analyst must be to select data capture method and devices, which reduce the number of stages so as to reduce both the changes of errors and the cost .Input types, can be characterized as. External Internal Operational Computerized Interactive
Input files can exist in document form before being input to the computer. Input design is rather complex since it involves procedures for capturing data as well as inputting it to the computer.
o OUTPUT DESIGN:
Outputs from computer systems are required primarily to communicate the results of processing to users. They are also used to provide a permanent copy of these result for latter consultation .Computer output is the most important and direct source of information to the users. Designing computer output should proceed in an organized well through out the manner. The right output must be available for the people who find the system easy to use.
The outputs have been defined during the logical design stage. If not, they should defined at the beginning of the output designing terms of types of output connect, format, response etc, Various types of outputs are External outputs Internal outputs
All screens are informative and interactive in such a way that the user can full fill his requirements through asking queries.
o DATABASE DESIGN:
The general theme behind a database is to handle information as an integrated whole.A database is a collection of interrelated data stored with minimum redundancy to serve many users quickly and effectively. After designing input and output, the analyst must concentrate on database design or how data should be organized around user
requirements. The general objective is to make information access, easy quick, inexpensive and flexible for other users. During database design the following Objectives are concerned: Controlled Redundancy Data independence Accurate and integrating More information at low cost Recovery from failure Privacy and security
Fig- DFD-Level 0
Fig- DFD-Level 1
Fig- DFD-Level 2
o ENTITY-RELATIONSHIP DIAGRAM:
An entity-relationship diagram is a data modelling technique that creates a graphical representation of the entities, and the relationships between entities, within an information system. It is clear that the physical objects from the previous section the member, books, library correspond to entities in the Entity-Relationship model, and the operations to be done those entities holds, checkouts, and so on correspond to relationships. However, a good design will minimize redundancy and attempt to store all the required information in as small a space as possible.
SOFTWARE TESTING
Is the menu bar displayed in the appropriate contested some system related features included either in menus or tools? Do pull Down menu operation and Tool-bars work properly? Are all menu function and pull down sub function properly listed ?; Is it possible to invoke each menu function using a logical assumptions that if all parts of the system are correct, the goal will be successfully achieved .? In adequate testing or non-testing will leads to errors that may appear few months later.
This create two problem 1) Time delay between the cause and appearance of the problem. 2) The effect of the system errors on files and records within the system
The purpose of the system testing is to consider all the likely variations to which it will be suggested and push the systems to limits. The testing process focuses on the logical intervals of the software ensuring that all statements have been tested and on functional interval is conducting tests to uncover errors and ensure that defined input will produce actual results that agree with the required results. Program level testing, modules level testing integrated and carried out.
INTEGRATION TESTING:
Unit testing focuses on testing a unit of the code. Integration testing is the next level of testing. This level of testing focuses on testing the integration of units of code or components. The Library Management System was tested as a whole. There are two major type of testing they are 1) White Box Testing. 2) Black Box Testing.
control structure of the procedural design to drive test case. Using white box testing methods, the following tests were made on the system
A) All independent paths within a module have been exercised once. In our system, ensuring that case was selected and executed checked all case structures. The bugs that were prevailing in some part of the code where fixed
B) All logical decisions were checked for the truth and falsity of the values.
This is black box testing enables the software engineering to derive a set of input conditions that will fully exercise all functional requirements for a program. Black box testing is not an alternative to white box testing rather it is complementary approach that is likely to uncover a different class of errors that white box methods like.. 1) Interface errors 2) Performance in data structure 3) Performance errors 4) Initializing and termination errors
MAIN PANEL
LOGIN PANEL:
ERROR IN LOGIN:
STUDENT PANEL:
MANAGEMENT PANEL:
Chapter 7 TABLES
-----------------------------------------------------------------------------------------------SNO STUDENT_ID STUDENT_NAME GENDER EMAIL_ID MOBILE_NO BRANCH STUDENT_YEAR SEMESTER Text Text Text Text Number Number Number Text Text
--------------------------------------------------------------------------------------------------------SNO BOOK_ID BOOK_NAME AUTHOR ISBN_NUMBER CATEGORY Number Text Text Text Text Text
Text
Type
Text Text
-----------------------------------------------------------------------------------------------------------
Type
Text Number Number
------------------------------------------------------------------------------------------------
CONCLUSION
The project library management is completed, satisfying the required design specifications. This software provides a user-friendly interface. This software is developed with modular approach. Thus the software has fulfilled all the objectives identified and is able to replace the existing system. The constraints are met and overcome successfully. The system is designed as like it was decided in the design phase. This software has a user-friendly screen that enables the user to use without any inconvenience. The software provides facility admin to login . This software provides the facility to keep all records up to date . All modules in the software have been tested with valid data and invalid data and everything work successfully. Hence the software has proved to work efficiently.
BIBLIOGRAPHY
1. Google Search Engine http://www.google.com 2. Wikipedia http://en.wikipedia.org 3. http://www.wifiduniya.com 4. Black Book of Java