Professional Documents
Culture Documents
Liberery Management Final
Liberery Management Final
With the advancement of technology, it is imperative to exalt all the systems into a user-
friendly manner. The Library Management system (LMS) acts as a tool to transform traditional
libraries into digital libraries. In traditional libraries, the students/user has to search for books which
are hassle process and there is no proper maintenance of database about issues/fines. The overall
progress of work is slow and it is impossible to generate a fast report. The librarians have to work
allotted for arranging, sorting books in the book sells. At the same time, they have to check and
monitor the lend/borrow book details with its fine. It is a tedious process to work simultaneously in
different sectors. LMS will assist the librarians to work easily. The LMS supports the librarians to
encounter all the issues concurrently. The users need not stand in a queue for a long period to
return/borrow a book from the library. The single PC contains all the data’s in it. The librarians have
to assess the system and provide an entry in it. Through LMS the librarian can find the book in the
bookshelves. The LMS is designed with the basic features such as librarian can
add/view/update/delete books and students' details in it. Once he/she ingress into the system they
can modify any data’s in the database. The complete model is developed in Dot net technology, the
C# language is used to build the front end application whereas the SQL server is exploiting as
database. The authorized person can only access the LMS system, they have to log in with their user
id and password. As aforementioned that the LMS is designed in a user-friendly manner, so the
admin can smoothly activate the system without expert advice. Every data is storing and retrieving
from the SQL database so it is highly secure. Thus our system contributes its new approach towards
the digital library setup.
1
E-R MODEL
For each regular strong entity type E in the ER schema create a relation R that includes
all the simple attributes of E. include only the simple component attributes of a composite
attribute. Choose one of the key Attribute of E as primary key for R. If the chosen key of E
is composite, the set of simple attributes that form it will together form the primary key of
R.
If multiple keys were identified of E during the conceptual design, the information
describing the attributes that form each additional key is kept in order to specify secondary
(unique) keys of relation R. knowledge about keys is also kept for indexing purpose and
other type of analyses.
For each weak entity type W in the ER schema with owner of type E, create a
relation R and include all simple attributes (or simple components of composite attributes
of Was attribute of R. In addition, include as foreign key attributes of R in the primary key
attributes of the relation of type W. The primary key R is the combination of the primary
key of the owner and the partial key of weak entity type W.
For each binary 1:1 relationship type R in the ER schema, identify the relation S and
T that corresponds to the entity type participating in R. there are three possible approaches
which are as follows
3
2) Relation option:
For each n-ary relationship type R, where n>2, create a new relation S to represent
R. Include as foreign key attributes in S the primary keys any simple attributes of the n-ary relationship
type as attributes of S. The primary key of S is usually the combination of all the foreign key that
reference the relations representing the participating entity types. However, if the cardinality
constraints on any of the entity types E participating in R in 1, then the primary key of S should not
include the foreign key attribute that references the relation E corresponding to E.
PATIENT(ID,NAME,ADDRESS,AGE,GENDER,PH.NO.)
BILL(ID,CHARGE,MED,LAB,TOTAL)
ROOM(ID,CHARGE)
PAYS(PATIENT ID,BILL)
ACCOMODATES(PATIENT ID,ROOM ID)
5
SQL-I : Basics (DDL)
7
NORMALIZATION OF ORDER FORM
9
11
13
7. PROJECT
CODE FOR LIBRARY MANAGEMENT
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MySql.Data.MySqlClient;
namespace LibraryM
{
public partial class Form1 : Form
{
string cs, q;
MySqlConnection c1;
MySqlCommand cmd;
public Form1()
{
InitializeComponent();
}
15
c1.Open();
try
{
q = "select count(sid) from students";
cmd = new MySqlCommand(q, c1);
int ids = Convert.ToInt32(cmd.ExecuteScalar());
ids++;
f2.sid.Text = ids.ToString();
}
catch (Exception ex)
{
MessageBox.Show("Please Enter Valid Text.", "",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
finally
{
if (c1.State == ConnectionState.Open)
c1.Close();
}
f2.Show();
}
c1.Open();
try
{
q = "select count(bid) from books";
cmd = new MySqlCommand(q, c1);
int idb = Convert.ToInt32(cmd.ExecuteScalar());
idb++;
f3.bid.Text = idb.ToString();
}
catch (Exception ex)
{
MessageBox.Show("Please Enter Valid Text.", "",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
finally
{
if (c1.State == ConnectionState.Open)
c1.Close();
}
f3.Show();
}
c1.Open();
17
try
{
q = "select * from books";
MySqlDataAdapter da = new MySqlDataAdapter(q, c1);
DataTable t = new DataTable();
da.Fill(t);
f5.dataGridView1.DataSource = t;
}
catch (Exception ex)
{
MessageBox.Show("Something went wrong.", "",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
finally
{
if (c1.State == ConnectionState.Open)
c1.Close();
}
f5.Show();
}