0% found this document useful (0 votes)
7 views6 pages

Chapter At a Glance-16

The document discusses the importance of Database Management Systems (DBMS) in managing large volumes of data for computerized accounting systems, highlighting MS Access as a user-friendly option. It outlines the key components of a database, including tables, queries, forms, and reports, and emphasizes the need for understanding data requirements before designing a database. Additionally, it provides a step-by-step guide on creating tables and establishing relationships in MS Access, along with creating queries to retrieve and manipulate data effectively.

Uploaded by

Jeslin Nayak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views6 pages

Chapter At a Glance-16

The document discusses the importance of Database Management Systems (DBMS) in managing large volumes of data for computerized accounting systems, highlighting MS Access as a user-friendly option. It outlines the key components of a database, including tables, queries, forms, and reports, and emphasizes the need for understanding data requirements before designing a database. Additionally, it provides a step-by-step guide on creating tables and establishing relationships in MS Access, along with creating queries to retrieve and manipulate data effectively.

Uploaded by

Jeslin Nayak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Chapter at a Glance

DATABASE MANAGEMENT SYSTEM (DBMS)


The foremost need of Computerised Accounting System is the overwhelming quantity of data in organisations.
The conventionally used paper filing system, text documents, and even spread-sheets may not suffice for the
growing needs of tracking this voluminous and critical information. A solution to this situation is available in
the form of a Database Management System (DBMS).
Database Management System (DBMS) provides a variety of software tools for organising, processing and
querying data in a flexible manner. MS-Access, Oracle, SQL Server, IBM-DB2 are examples of DBMS software.

OBJECTS IN DATABASE MANAGEMENT SYSTEM (DBMS)


The database management a pre-requisite for understanding of this chapter, and hence, we will restrict ourselves
to the simpler and easy to comprehend ‘MS Access’ program for developing some practical accounting
applications.
Databases in Access are composed of four objects:
1. Tables,
2. Queries,
3. Forms, and Forms
4. Reports. User-friendly Tables
interfaces for Sets of related
UNDERSTANDING AND DEFINING THE entering and data
DATABASE REQUIREMENTS viewing data
With the continuous improvements in
computer’s processing speed, storage
capacity, networking techniques, operating Reports Queries
Formatted summaries Data resulting from
systems, etc., the capabilities of computer
of data suitable questions you ask
applications have also undergone many for printing one or more
changes. Various computer applications that tables
are commercially available today not only
provide fairly comprehensive tools for all
conceivable needs but also have become
extensively user friendly. So, when we look
forward to putting into use database applications such as ‘Access’, we really do not need much of programming
skills. Nevertheless, any programming knowledge may improve our efficiency and effectiveness in handling such
applications.
On the other hand, before we develop any database application, we ought to have a complete understanding
of our requirements expected from the application. This is one area where application itself may not extend
much help. Further, the correct understanding of our requirement also has a bearing on the choice of Database
Management Systems (DBMS), i.e., whether to go for ‘Desktop Database’ or to choose the ‘Server Database.

Desktop Database
Desktop database is mostly designed to run on “desktop” or personal computers. It is much cheaper and simpler.
Most of the desktop databases are very user friendly. A user does not need to understand SQL in order to use
them, and contain a fairly graphical interface. It also many a times provides web solutions so that the user can
publish data onto the web in various fashions. Microsoft Access is a very popular, well known, desktop database
that many people already own.
1
Server Database
Server database is comparatively more complex and expensive than desktop database. This type of databases
offer organizations the ability to manage large amounts of data and many users. In a server database, APIs are
used for rapid development of custom applications providing users with a lot of flexibility. It can also expand
very quickly if the money is put into investing the proper hardware into one. Unfortunately, this can get rather
costlier. Common server database includes Microsoft SQL Server and Oracle.

IDENTIFICATION OF DATA TO BE STORED IN TABLES


Tables allow us to create the framework for storing information in the database. Each column (also called ‘field’)
of the table corresponds to a specific characteristic (or ‘attribute’ in database terms) of the stored information.
Each row (also called ‘record’) corresponds to a particular instance of the information. A set of tables often with
well established relationships between them constitutes the database covering total spectrum of stored
information. The term ‘database design’ can be used to describe the structure of different parts of the overall
database.
We may get a better understanding of database design by referring to practical example of an accounting
problem. We may take up the case of payroll accounting.
Let us begin by identifying various attributes of information that are required to be stored in our Payroll
database. We may have a set of attributes pertaining to employee’s personal details such as: ‘Employee ID’,
‘Name’, ‘Designation’, and ‘Location’. On the other hand, we may also deal with such attributes pertaining to
employee’s pay as: ‘Basic Pay’, ‘Dearness Allowance (DA)’, ‘House Rent Allowance (HRA)’, ‘Transport Allowance
(TA)’, ‘Provident Fund (PF) Deduction’, etc. We may also want to know the attributes of ‘Gross Salary’ and ‘Net
Salary’ which is obtained by subtracting ‘PF Deductions’ from ‘Gross Salary’. However, ‘Gross Salary’ and ‘Net
Salary’ attributes may not require being stored in the database as they are merely computational outcomes
from other attributes. We may also require some attributes concerning pay formulations such as ‘% Rate of DA’
which may fluctuate month to month, ‘% Rate of HRA’ varying with the location of employee, and ‘TA Slabs’
varying with the designation of employee.
Now the main question is how to store these attributes in our database tables. Shall we make all of above
attributes as part of one table, or shall we opt for multiple tables. The ‘Access’ as such will not put any constraint
on the number of tables we opt for, or the type of data we chose to put in any table. It will have to be entirely
our decision, based on logical structuring of data that we seek to apply. You may also appreciate the fact that
the purpose of a database is not so much for the storage of information, as for its quick retrieval. Hence, you
ought to structure your database in such a manner that it can be queried quickly and efficiently.

CREATING DATABASE TABLES IN MICROSOFT ACCESS


Before we take up the task of database design using Access, we will have to first start up the Microsoft Access
Application. For this, click on the Start button on the Windows Taskbar. Now point to All Programs; then point
to Microsoft Office; and then click Microsoft Office Access 2007.
In Simplified manner it is as follows:
Start > All Programs > Microsoft Office > Microsoft Access 2007
Click on Blank Database under central section. This will open up a dialogue box on the right section asking for
database file name. This dialogue box could have also been opened by Clicking on the Office button located at the
upper left corner of the screen and then Clicking New at the dropdown menu.
Enter the file name ‘PayRollApplication’ and then click on the Create button.
Instead of the default location for your database file, you can also identify your own location by clicking on the Browse
icon given on the right side of file name. In New File dialogue box, you can also accept the suggested name (in default
folder My Documents) and later on rename the file and move it to any other folder of your choice.
Clicking Create button on the New file dialogue box takes you directly to the new database window with the Tab for
DataSheet opened up.

2
In the left side Navigation Pane you will see that a default table has already been created and the same is also opened
up in the working area of the window.
We can straight away start working on this table assuming it to be our first table. All we have to do is to type an
employee name (say ‘Ram Kishore’) in the second column and click enter (or use Tab) to move to third column; type
a designation ID (say ‘1’) followed by enter; and finally move to fourth column and type a location ID (say ‘1’).
In this case, Access will automatically set a data type for each field based on the type of data entered into each
column. You will see that headings of these columns are named as ‘Field1’, ‘Field2’ and ‘Field3’.
Move the mouse pointer over the column heading ‘Field1’ and then double-click to select the column heading.
Type ‘EmpName’ and press enter to change the column name from ‘Field1’ to ‘EmpName’. Similary, change the names
of columns ‘Field2’ and ‘Field3’ to ‘DesgID’ and ‘LocationID’.
You might have noticed by now that the first column of the table has the name ‘ID’ which was created automatically.
This is an AutoNumber field in which the field value is assigned automatically by Access as we enter a new record.
Move the mouse pointer over ‘ID’ heading; double click to select this heading, and change its value to ‘EmpID’.
The structure of the ‘Table’ in the Datasheet View is already complete. At this stage, you can choose to enter the
values of the other records as well. If you are not contended with the width of any column in your table then with
the insertion point positioned in any record of this column click
Home Tab > More (under Records Group) > Column Width.
Click on the Save button on the Quick Access toolbar on left hand top corner of window. A Save As dialogue box will
appear with the default table name. Replace the name with ‘TabEmpDetails’ and press enter or click OK button to
save the table with the intended name.
Now let us look at this table in Design View. Click on the View button placed on the left end of the ribbon (in View
group) under the Datasheet Tab. In Design View, you can tell Access which all fields will go into the table by entering
desired attributes in the column titled ‘Field Name’. The type of data corresponding to each attribute can be identified
in the column ‘Data Type’.
Having fully completed the structure and data of our first table and also having understood the various concepts
related to its design, we can now move on and create rest of the four tables. Click on Create Tab > Table Button.
You can choose this view or the Design View to create the rest of the tables and save them under intended names.
The field names and data types of all five tables are summarrised as under:

S. No. Field Name Data Type Description


1. TabEmpID
EmpID AutoNumber Unique Employee ID—Primary Key.
EmpName Text
DesgID Number
LocationID Number
2. TabDesignations
DesgID AutoNumber Unique Designation ID—Primary Key.
Designation Text
TA Number Transportation Allowance—Fixed as per designation.
3. TabLocations
LocationID AutoNumber Unique Location ID—Primary Key.
Location Text
RateofHRA Number % Rate of House Rent Allowance.
4. TabDARates
MonthID AutoNumber Unique Month ID—Primary Key.
SalMonth Text With Values as ‘April-2022’, ‘May-2022’,etc.
RateofDA Number % Rate of Dearness Allowance.
5. Tab Monthly Salary
SalaryID AutoNumber Unique Salary ID—Primary Key.
MonthID Text
EmpID Number
Basic Number Basic pay based on level & attendance of employee.
DedForPF Number Deduction for PF opted by employee & as per rules.

3
Having completed the designs of all data tables, we will now move on to the task of establishing relationships
between different tables. Click on the Database Tools Tab and then Relationships button under Show/Hide
group. In the working area, a Show Table dialogue box will appear. In case you do not see this dialogue box
click on Design > Show Table. In the Show Table dialogue box, select a table and click Add button to add it in
the relationship window. Add all the five tables in this manner. Close the Show Table dialogue box by clicking
on Close button.
In the working area you will see all five table objects, each detailing the fields within them. You can reposition
these table objects anywhere within the relationship window. To do this, point the mouse pointer in the caption
area of the selected table object, hold down the left mouse button and then drag the mouse to shift table to
its new location.
Now to create a relationship between TabMonthlySalary and TabDARates, position the mouse pointer over
MonthID in the TabMonthlySalary table object, hold down the left mouse button, drag the pointer right to
MonthID in the TabDARates, and then release the mouse button. A Edit Relationships dialogue box will appear
as soon as you release the mouse button. You will notice that the dialogue box shows relationship type as One-
To-Many.
Access has determined the relationship type based on the fields selected for joining the two tables. Click on
the Create button. A black line will appear joining the two tables at the common field. This line, also referred
to as Join Line, establishes the relationship between TabMonthlySalary and TabDARates using the common field
of MonthID. Remember, MonthID forms Primary Key in TabDARates and Foreign Key in TabMonthlySalary and
hence is the relationship One-To-Many type. You may now repeat above steps to establish other relationship
between the tables. The overall relationship between different tables are summarised as under:
Table Related Table Common Field Relationship Type
TabDARates TabMonthlySalary MonthID One-To-Many
TabEmpDetails TabMonthlySalary EmpID One-To-Many
TabDesignations TabEmpDetails DesgnID One-To-Many
TabLocations TabEmpDetails LocationID One-To-Many

CREATION OF QUERY IN MICROSOFT ACCESS


The Queries provide the real power to a database in terms of its capabilities to answer more complex requests
(or queries). In case of Access, Queries provide the capability of combining data from multiple tables and placing
specific conditions for the retrieval of data. In its simplest form, you may consider a Query to be another tabular
view of your data showing information from one or more tables.
Click on Create > Query Design. A Show Table dialogue box will appear with a Query Table in the background.
In case you do not see this dialogue box click on Design > Show Table. In the Show Table dialogue box, select
a table and click Add button to add it in the relationship window. Add all the five tables in this manner. Close
the Show Table dialogue box by clicking on Close button. In working area above the Query Table, you will see
all five table objects (with complete list of their fields) along with the one-to-one relationship that has been
established between tables earlier. You can reposition these table objects in the manner discussed earlier. In
the portion below Table objects, you will see blank columns that represent columns in the Query results
datasheet. These columns are also referred to as the Design Grid.
In the first column of the design grid, click on the Table row. A dropdown button will appear on this cell. Click
on the button to get the dropdown list of tables and click on ‘TabMonthlySal’. Now in the same column, click
on Field row and get the dropdown list of all fields in ‘TabMonthlySal’. Click on the ‘SalaryID’ field.
In this manner the SalaryID (from TabMonthlySal) has been selected for view in the Query. The above operation
could have also been done simply by double clicking the ‘SalaryID’ in the list box of TabMonthlySal object.
You shall take care to fill different fields from Table object into the Design Grid in the same order in which you
want to display these fields in the Query Results data sheet. Now select any of the described methods to fill
other columns of the design grid in the specified order with fields of MonthID (TabMonthlySalary), SalMonth
(TabDARates), EmpName (TabEmpDetails), and Basic (TabMonthlySalary).

4
At this stage, if you click on the Run button under Results group of Design Tab, you will see the result of Query
displayed with the fields of SalaryID, SalMonth, EmpName, and Basic. Clicking of ‘Run’ actually tells the Access
to execute all instructions stored by you in the Query, and to display the results. You may adjust the column
widths by any of the methods described earlier for Tables. Click on the Save button on the Quick Access toolbar.
At the Save As disalogue box, type QueryMonthlySalary and click OK to save our Query.
As we are not seeing the computational fields and the field of Ded For PF in the DataSheet View. Go back to
the Design Grid view by clicking on Design View under Home Tab. In the Design Grid, Click on the Field row of
the first blank column (after Basic) and type ‘DA: [Basic]* [TabDARates. RateOfDA]/100’. In this expression, the
word ‘DA’ coming before the column(:) will be treated as the name of the computational field which will appear
as heading of the column. The rest of the typed part will form the actual expression which will be evaluated
and its value displayed on clicking of Run command.
In our expression for ‘DA’, we have made use of ‘Basic’ field which is already forming a part of Query by taking
it within the square parenthesis ([ ]). We have also made use of ‘RateOFDA’ field which is not appearing in the
Query columns; and for this we recorded the corresponding Table name as well as Field name separated by a
period (.) within the square parenthesis. It may be easily comprehendable that the operator ‘*’ and ‘/’ stand
for multiplication and division respectively. At this stage if you click on the ‘Run’ command, you will notice the
last field for ‘DA’ with its computed values for different employees as per the % DA Rates for different months.
Come back to the design view (by Clicking Design View button under Views Group) and repeat above listed
procedure to fill up the next field of Query for computing HRA using the expression ‘HRA: [Basic]*
[Tab Locations. RateOfHRA]/100’. The next column in the Query is for the TA field, which is to be included as
such from the Table ‘TabDesignations’ using any of the methods enumerated earlier. Next, create the field for
‘Gross Salary’ by typing the expression ‘GrossSalary: [Basic]+[DA]+[HRA]+[TA]’.
Now we can also include the field of ‘DedForPF’ from the ‘TabMonthlySalary’. Finally, we shall include the field
of Net Salary using the simple expression ‘NetSalary: [GrossSalary]-[DedForPF]’. At this stage, save your Query as
instructed earlier and also run the ‘Run’ command to look back the outcome of your effort in the Data Sheet View.
For a better presentation, you may also like to sort the records in ascending or descending order against a
chosen field of the Query. For this, click on the Sort row below the Emp Name field. Now Click on the pull down
button that appears on the end of the cell and select Ascending. Run the Query and notice that the records are
alphabetically arranged as per names of the employees.

CREATION OF FORMS IN MICROSOFT ACCESS


The Access 2007 provides facility for creation of a Simple Form wherein you can enter information for one
record at a time. Access also provides tools for creation of a Split Form which shows the underlying datasheet
in one half of the section and a Form in other half for entering information in the record selected in the
datasheet. The two views in this form are synchronised so that scrolling in one view causes the scrolling of other
view to same location of the record.
The Microsoft Access provides two primary mechanisms for placing information into the tables as and when
the need arises. The first method, which we are already familiar with, is to simply bring up the table in a window
by double clicking on it and adding information to the new blank row at the bottom. We can also make changes
in any other row as one would do in case of a spreadsheet. You can save the changes in the table by clicking
on the Save button on the Quick Access toolbar.
As second mechanism for information handling (i.e., for addition, modification and deletion), the Access provides
a user-friendly Forms interface that allows users to enter information in a graphical form, and this information
transparently passes to the underlying database. This method is more user-friendly for the data entry operator,
though it may entail a little more work on the part of the database designer.

CREATION OF REPORTS IN MICROSOFT ACCESS


A Report is also used for the print purpose, though it allows for more flexibility in selecting the fields to print,
and to have more control on the overall layout and format of the print output. The Report in Access is thus
another object which is designed to print information from the database on to the screen, or to a file or directly
to the printer.
5
Here also you can take the elaborate route of step-by-step design as was done in case of Tables, Query or Form.
However in this case, you may find the Report Wizard becoming a more favorable tool as it guides the designer
through a series of dialogue boxes to create the most suitable Report.
Evidently in our case, we will be interested in generating the Report for the ‘QueryMonthlySalary’. With this
intent, Click on ‘QueryMonthlySalary’ in the Navigation Pane, then click on Create Tab, and then on Report
Wizard under Reports Group. In the dialogue box that appears with QueryMonthlySalary Query already selected,
move all fields from the Available Fields List Box to the Selected Fields List Box using appropriate Arrow button.
Click Next to see the second dialogue box asking for Grouping Levels. Here select ‘SalMonth’ and click on the
Arrow button (else double click the ‘SalMonth’) to print data in groups of different salary months.
Click Next to reach the third dialogue box asking for sorting order of the records. Here you can click on the
Pull-down Arrow next to the first text box and then select ‘SalaryID’ from the drop down list so as to arrange
the records in ascending order of the salary ID within each data group.
Click Next to see the dialogue box for layout of the Report. Retain the default ‘Stepped’ layout but change the
orientation of Report to ‘Landscape’ so as to see all the columns of the Report in a single page view.
Again Click Next to see the dialogue box for selecting style of Report. You may choose any style and later on
experiment with the others as well. One more click of Next will take you to the dialogue box seeking the name
of Report object. Type ReportMonthlySalary and click on the Finish button to see the Report appearing in
working area of window in its Print Preview form.
You may notice that the extent of data in above designed Report is limited as per the Criteria laid down in our
Query ‘QueryMonthlySalary’. By changing the Query suitably, we can modify the Report for generating monthly
as well as annual Pay Rolls. We can also change the Criteria of our Query to get individual Report for each month
(i.e., Pay Slip) or for the whole of year (i.e., Annual Statement).
We may like to improve the Report further by getting sum total of all the values under different columns for
each group. For example, we may want to see the total Basic of all employees for April, 2022 group. For such
modification, open the Report in Design View by Clicking on Home Tab and then clicking on Design View under
Views Group. In the design view, select the field Basic by clicking it once. Now click on Totals under ‘Grouping
and Totals’ Group of Design Tab. In the pull down menu that appears, click on ‘Sum’. You will notice that an
expression ‘= Sum([Basic])’ will appear below the Basic Text Box. You can repeat above steps with other fields
containing numerical (both stored as well as computed) values. Now if you click on View button (i.e.,
click Design > Report View), you will see the sum total of each column (with in each group) appearing in
the report.
At this stage, close the Report by clicking on the Cross button immediately above the report. Save the application
once again by clicking on the Save button under Quick Access Bar. Our Pay Roll Application in Access has been
completed and saved. You may now close your application by clicking on the Close button under ‘Office Button’
or by simply clicking on the Cross button at right-hand top corner of the window.

You might also like