Database Material

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Introduction

Microsoft Access is a Database Management System offered by Microsoft. It uses the


Microsoft Jet Database Engine and comes as a part of the Microsoft Office suite of
application.

Microsoft Access offers the functionality of a database and the programming capabilities to
create easy to navigate screens (forms). It helps you analyse large amounts of information,
and manage data efficiently.

A Library Management System is a software built to handle the primary housekeeping


functions of a library. Libraries rely on library management systems to manage asset
collections as well as relationships with their members. Library management systems help
libraries keep track of the books and their checkouts, as well as members’ subscriptions and
profiles.
Library management systems also involve maintaining the database for entering new books
and recording books that have been borrowed with their respective due dates.
Problem statement
Libraries are used to store books, but require a system to navigate to a specific book or
specific content within a book in the library. A library database system is an infrastructure
that allows users to search books and book content, add/remove, and issue selected books.
The problem faced is that library users require an efficient method to find a specific book or a
book of specific author in a library given a continuously expanding library. Efficiency
requires that the processing time should stay relatively the same even as the library contents
increases.
Objective
The objective of this project was to develop a library database system in which a client can
supply books to the server, organize books by location, retrieve books from the server and
query the server for books which contain specific keywords.
The envisioned library database system provides a user the ability to search for book to the
database and issue using the book title or its textual content.
The library system database will execute a textual analysis on issued books to identify
keywords within the books and thereby create an index. A library query will return a list of
books and will show a list of locations where a keyword is found of each book. Returned
results will be filtered to books that contain the specified context. By indexing the books, user
queries can return results, in context, without having to search every row in the database.
Tool used
Hardware
• Laptop(ram 8, hard disk 300GB, Hp envy)
Software
• Ms access

ENTITY OR TABLES
Information in a database is stored in tables. A table has fields, which are similar to column
headings. Tables is often called Entity, the columns in the table caries the characteristics of
the table which is known as Attributes. Based on the library information Management system
the following tables was created.

1. Student
➢ Stud_id
➢ Stud_name
➢ Stud_gender
➢ Stud_course
➢ Stud_regno
➢ Stud_class
➢ Stud_email
➢ Stud_phone
➢ Stud_dob

2. Teacher
➢ Teac_id
➢ Teac_name
➢ Teac_gender
➢ Teac_phone
➢ Teac_email
➢ Teac_dob
➢ Teac_department

3. Staff member
➢ SM_id
➢ SM_name
➢ SM_email
➢ SM_phone
➢ SM_gender
➢ SM_dob
4. Book
➢ B_id
➢ B_title
➢ B_author
➢ B_edition
➢ B_volume
➢ B_publisher
➢ B_location
➢ B_Tcopies

5. Issue
➢ Date_return
➢ Date_issue

Creating a new database

• Click File > New, and then select Blank desktop database.

• In the File Name box, type a file name for the new database.
• To browse to a different location and save the database, click the folder icon.
• Click Create.

Creating tables/Entities

• On the Create tab, in the Tables group, click Table.

• Now we start creating our tables required for our library information management
system as mentioned above and renaming them by saving the tables.
• We save the tables by right click on the table and click save and it will give out
renaming option as shown below.

• After renaming all the tables/Entities required.


Creating the attributes of the tables/entities.
In databases, attributes are the describing characteristics or properties that define all items
pertaining to a certain category applied to all cells of a column.

The rows, instead, are called tuples, and represent data sets applied to a single entity to
uniquely identify each item. Attributes are, therefore, the characteristics of every individual
tuple that help describe its unique properties.

Data type

Data types are the building blocks of databases. A field’s data type not only influences
other important characteristics of that field, such as field size, but also how the field is
used throughout the database, such as in objects, calculations, expressions, and so forth.
Using the right data type is a key to success.

Data type usage size


Short Text Alphanumeric data (names, Up to 255 characters.
(formerly titles, etc.)
known as
“Text”)

Long Text Large amounts of alphanumeric Up to about 1 gigabyte


(formerly data: sentences and paragraphs. (GB), but controls to display
known as See The Memo data type is now a long text are limited to the
“Memo” called “Long Text” for more first 64,000 characters.
information on the Long Text
details.
Number Numeric data 1, 2, 4, 8, or 16 bytes.
Large Numeric data 8 bytes
Number
Date/Time Date and Times 8 bytes
Date/Time Date and Times Encoded string of 42 bytes
Currency
Monetary data, stored with 4
decimal places of precision. 8 bytes.

AutoNumber Unique value generated by Unique value generated by


Access for each new record. Access for each new record.
Yes/No Boolean (true/false) data 1 byte.
OLE Object Pictures, graphs, or other Up to about 2 GB.
ActiveX objects from another
Windows-based application.
Hyperlink A link address to a document or Up to 8,192 (each part of a
file on the Internet, on an Hyperlink data type can
intranet, on a local area network contain up to 2048
(LAN), or on your local characters).
computer
Attachment You can attach files such as Up to about 2 GB.
pictures, documents,
spreadsheets, or charts; each
Attachment field can contain an
unlimited number of attachments
per record, up to the storage limit
of the size of a database file.
Calculated you can create an expression that Dependent on the data type
uses data from one or more of the Result Type property.
fields. You can designate
different result data types from
the expression.
Lookup The Lookup Wizard entry in the Dependent on the data type
Wizard Data Type column in Design of the lookup field.
view is not actually a data type.
When you choosee this entry, a
wizard starts to help you define
either a simple or complex
lookup field.

Primary key
A primary key is a column or a set of columns in a table whose values uniquely identify a
row in the table. A relational database is designed to enforce the uniqueness of primary
keys by allowing only one row with a given primary key value in a table.
Select primary key in the table.

• In the Navigation Pane, right click a table, and select Design View.
• Select the field or fields you want to use as the primary key.
• Select Design > Primary Key.

For our tables the primary key are Student(Stud_id), Teacher(Teac_id), Book(B_id),
Issue(Date_issue), Staff Member(SM_id). Samples as shown below.
Relationship
Database relationships are associations between tables that are created using join statements
to retrieve data. ... Both tables can have only one record on each side of the relationship. Each
primary key value relates to none or only one record in the related table.
types of relationship
i. One-to-One Relationship
Such a relationship exists when each record of one table is related to only one record of the
other table.

ii. One-to-Many or Many-to-One Relationship


Such a relationship exists when each record of one table can be related to one or more than
one record of the other table. This relationship is the most common relationship found. A
one-to-many relationship can also be said as a many-to-one relationship depending upon
the way we view it.

iii. Many-to-Many Relationship


Such a relationship exists when each record of the first table can be related to one or more
than one record of the second table and a single record of the second table can be related to
one or more than one record of the first table. A many-to-many relationship can be seen as
a two one-to-many relationship which is linked by a 'linking table' or 'associate table'. The
linking table links two tables by having fields which are the primary key of the other two
tables.

Creating relationship

• On the Database Tools tab, in the Relationships group, click Relationships.

• On the Design tab, in the Relationships group, click Add Tables (or Show Table in
Access 2013).
• Select one or more tables or queries and then click Add. After you have finished
adding tables and queries to the Relationships document tab, click Close.
• Drag a field (typically the primary key) from one table to the common field (the
foreign key) in the other table. To drag multiple fields, press the CTRL key, click
each field, and then drag them.
• Verify that the field names shown are the common fields for the relationship. If a field
name is incorrect, click on the field name and select the appropriate field from the list.

To enforce referential integrity for this relationship, select the Enforce Referential
Integrity check box. For more information about referential integrity, see the
section Enforce Referential Integrity.

• Click Create.

Access draws a relationship line between the two tables. If you selected the Enforce
Referential Integrity check box, the line appears thicker at each end. In addition, again
only if you selected the Enforce Referential Integrity check box, the number 1 appears
over the thick portion on one side of the relationship line, and the infinity symbol (∞)
appears over the thick portion on the on the other side of the line, as shown in the
following figure.
Database form
In a database context, a form is a window or screen that contains numerous fields, or spaces
to enter data. Each field holds a field label so that any user who views the form gets an idea
of its contents. A form is more user friendly than generating queries to create tables and
insert data into fields.
A good database form creator will give you the following capabilities:

• The ability to gather information via web and mobile browsers


• The ability to customize the look and feel of the form
• The ability to handle dynamic if-then behavior.

Types of Forms in MS Access.


Microsoft Access is one of the programs from Microsoft Office. It is appropriate for you who
work with database. One of the features offered by Microsoft Access is Form. Form is a
feature that functions to relate the tables of data. Therefore, you can enter, change and view
the stored information easily in the database. There are many types of forms in MS
Access that you need to know. Here they are:
• Standard form
• Card form
• Statistic form
• Tabular form
• List form

Type of database form used.


Type of database I decided to use is standard database form because, it is the basic model of
forms in Microsoft Access. So, the form also comes with the standard display. This is the
simplest one. So, it is appropriate for you who want to use form in the first time. You can use
it easily. Anyway, it belongs to one of the kinds of forms in MS Access.
Creating form

• To create a form with no controls or preformatted elements: On the Create tab,


click Blank Form. Access opens a blank form in Layout view, and displays the Field
List pane.

• To add a field to the form, double-click it or drag it onto the form. To add several
fields at once, hold down CTRL and click several fields, and then drag them onto the
form at the same time.
• Use the tools in the Controls group on the Form Layout Tools tab to add a logo, title,
page numbers, or the date and time to the form.
• If you want to add a wider variety of controls to the form, click Design and use the
tools in the Controls group.

Sample Form layout designed for each entity


Teacher form
Student form

Query
A database query is a request to access data from a database to manipulate it or retrieve it.
This allows us to perform logic with the information we get in response to the query.

Creating query

• Select Create > Query Wizard.

• Select Simple Query, and then OK.


• Select the table that contains the field, add the Available Fields you want to Selected
Fields, and select Next.

• Choose whether you want to open the query in Datasheet view or modify the query in
Design view, and then select Finish.

Report

Creating report

• Select Create > Report Wizard.

• Select a table or query, double-click each field in Available Fields you want to add it
to the report, and select Next.
• Double-click the field you want to group by, and select Next.
• Complete the rest of the wizard screens, and select Finish.

Conclusion

After we have completed the project we are sure the problems in the existing system would
overcome. The “LIBRARY MANAGEMENT SYSTEM” process made computerized to
reduce human errors and to increase the efficiency. The main focus of this project is to lessen
human efforts. The maintenance of the records is made efficient, as all the records are stored
in the ACCESS database, through which data can be retrieved easily. The navigation control
is provided in all the forms to navigate through the large amount of records. If the numbers of
records are very large then user has to just type in the search string and user gets the results
immediately. The editing is also made simpler. The user has to just type in the required field
and press the update button to update the desired field.

Reference

“Smarter Libraries through Technology(March 2013). The Roles of Integrated Library


Systems and Library Services Platforms.” Smart Libraries Newsletter 33. Accessed May 6,
2015. Retrieved from: http://journals.ala.org/sln/issue/view/282.

Abraham Silberschatz, Henry F. Korth and S. Sudarshan(2006). Fifth Edition. Database


System Concepts, McGraw-Hill Education (Asia).
“Library Systems Report (2014).Competition and Strategic Cooperation.” American
Libraries 45, no. 5 (May 2014):

You might also like