Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 7

Logical database structure for Accounting Information System

Introduction

An accounting information system (AIS) is a system of collection, storage and processing of


financial and accounting data that is used by decision makers. An accounting information system
is generally a computer-based method for tracking accounting activity in conjunction with
information technology resources. The resulting statistical reports can be used internally by
management or externally by other interested parties including investors, creditors and tax
authorities. The actual physical devices and systems that allows the AIS to operate and perform
its functions.

A big advantage of computer-based accounting information systems is that they automate and
streamline reporting. Reporting is major tool for organizations to accurately see summarized,
timely information used for decision-making and financial reporting.

The accounting information system pulls data from the centralized database, processes and
transforms it and ultimately generates a summary of that data as information that can now be
easily consumed and analyzed by business analysts, managers or other decision makers. These
systems must ensure that the reports are timely so that decision-makers are not acting on old,
irrelevant information and, rather, able to act quickly and effectively based on report results.
Consolidation is one of the hallmarks of reporting as people do not have to look through an
enormous number of transactions. For instance, at the end of the month, a financial accountant
consolidates all the paid vouchers by running a report on the system.

The systems application layer provides a report with the total amount paid to its vendors for that
particular month. With large corporations that generate large volumes of transactional data,
running reports with even an AIS can take days or even weeks.

In this we assume that mike is opening the business for goods of which he needs the logical
database design of accounting information system

The requirements analysis for this database led to the following six entities and their unique
identifiers are as follows

7
Entity Entity Key

Customer Customer_id

Inventory Item_Number

Order Order_Number

Sales Shipment_Number

Employee Employee_Id

Payroll Payroll_id

Database snapshot showing the relationship of the table

Here the relation between customer and Item can be multiple as multiple customers can purchase
multiple items and the same time multiple items can be purchased by single customer

Customer

7
1

Plac N Inventory
es

Order N Item

The following assertion can describe the database in more details.

1. Each customer may place many orders, but only one customer may place a particular
order.

2. Sales table can have multiple orders of the same customer.

3. In an order table multiple items of the same type can exists.

4. In a payroll table multiple employees will be there and the data of the single employee
can be multiple times.

The relationship between Order table and Item table can also multiple relationships as in one
order there can be multiple items.

CREATE TABLE [dbo].[Customer](


[Customer_Id] [int] IDENTITY(1,1) NOT NULL,
[Customer_Name] [varchar](100) NULL,
[Customer_City] [varchar](50) NULL,
[Credit_Limit] [decimal](18, 0) NULL,
[Sales_YTD] [decimal](18, 0) NULL,
[Sales_Person] [varchar](100) NULL,
CONSTRAINT [PK_Customer] PRIMARY KEY CLUSTERED
(
[Customer_Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON

CREATE TABLE [dbo].[Inventory](


[Item_Number] [int] IDENTITY(1,1) NOT NULL,

7
[Item_Name] [varchar](100) NULL,
[Qty] [int] NULL,
[Cost_Per_Unit] [decimal](18, 0) NULL,
[Cost_Price_Per_Unit] [decimal](18, 0) NULL,
CONSTRAINT [PK_Inventory] PRIMARY KEY CLUSTERED
(
[Item_Number] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

CREATE TABLE [dbo].[Order](


[Order_Number] [int] IDENTITY(1,1) NOT NULL,
[Cust_Id] [int] NOT NULL,
[Cust_Order_No] [varchar](20) NULL,
[Order_Date] [datetime] NULL,
CONSTRAINT [PK_Order] PRIMARY KEY CLUSTERED
(
[Order_Number] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF


GO

ALTER TABLE [dbo].[Order] WITH CHECK ADD CONSTRAINT [FK_Order_Customer]


FOREIGN KEY([Cust_Id])
REFERENCES [dbo].[Customer] ([Customer_Id])
GO

ALTER TABLE [dbo].[Order] CHECK CONSTRAINT [FK_Order_Customer]

CREATE TABLE [dbo].[Sales](


[Shipment_no] [varchar](100) NOT NULL,
[Item_No] [int] NOT NULL,
[Order_No] [int] NOT NULL,
[Cust_No] [int] NOT NULL,
CONSTRAINT [PK_Sales] PRIMARY KEY CLUSTERED
(
[Shipment_no] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF


GO

7
ALTER TABLE [dbo].[Sales] WITH CHECK ADD CONSTRAINT [FK_Sales_Customer]
FOREIGN KEY([Cust_No])
REFERENCES [dbo].[Customer] ([Customer_Id])
GO

ALTER TABLE [dbo].[Sales] CHECK CONSTRAINT [FK_Sales_Customer]


GO

ALTER TABLE [dbo].[Sales] WITH CHECK ADD CONSTRAINT [FK_Sales_Inventory]


FOREIGN KEY([Item_No])
REFERENCES [dbo].[Inventory] ([Item_Number])
GO

ALTER TABLE [dbo].[Sales] CHECK CONSTRAINT [FK_Sales_Inventory]


GO

ALTER TABLE [dbo].[Sales] WITH CHECK ADD CONSTRAINT [FK_Sales_Order] FOREIGN


KEY([Order_No])
REFERENCES [dbo].[Order] ([Order_Number])
GO

ALTER TABLE [dbo].[Sales] CHECK CONSTRAINT [FK_Sales_Order]

CREATE TABLE [dbo].[Order_Line_Items_inventory](


[Order_No] [int] NOT NULL,
[Item_No] [int] NOT NULL,
[Qty_Ordered] [int] NULL,
[Sales_Price] [decimal](18, 0) NULL
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[Order_Line_Items_inventory] WITH CHECK ADD CONSTRAINT


[FK_Order_Line_Items_inventory_Inventory] FOREIGN KEY([Item_No])
REFERENCES [dbo].[Inventory] ([Item_Number])
GO

ALTER TABLE [dbo].[Order_Line_Items_inventory] CHECK CONSTRAINT


[FK_Order_Line_Items_inventory_Inventory]
GO

ALTER TABLE [dbo].[Order_Line_Items_inventory] WITH CHECK ADD CONSTRAINT


[FK_Order_Line_Items_inventory_Order] FOREIGN KEY([Order_No])
REFERENCES [dbo].[Order] ([Order_Number])
GO

ALTER TABLE [dbo].[Order_Line_Items_inventory] CHECK CONSTRAINT


[FK_Order_Line_Items_inventory_Order]

CREATE TABLE [dbo].[Sales_Line_Item_inventory](


[Shipment_No] [varchar](100) NULL,
[Item_No] [int] NOT NULL,
[Qyt_Shipped] [int] NULL

7
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF


GO

ALTER TABLE [dbo].[Sales_Line_Item_inventory] WITH CHECK ADD CONSTRAINT


[FK_Sales_Line_Item_inventory_Inventory] FOREIGN KEY([Item_No])
REFERENCES [dbo].[Inventory] ([Item_Number])
GO

ALTER TABLE [dbo].[Sales_Line_Item_inventory] CHECK CONSTRAINT


[FK_Sales_Line_Item_inventory_Inventory]
GO

ALTER TABLE [dbo].[Sales_Line_Item_inventory] WITH CHECK ADD CONSTRAINT


[FK_Sales_Line_Item_inventory_Sales] FOREIGN KEY([Shipment_No])
REFERENCES [dbo].[Sales] ([Shipment_no])
GO

ALTER TABLE [dbo].[Sales_Line_Item_inventory] CHECK CONSTRAINT


[FK_Sales_Line_Item_inventory_Sales]

CREATE TABLE [dbo].[Employee](


[Employee_Id] [int] NOT NULL,
[Employee_Name] [varchar](100) NULL,
[Employee_Address] [varchar](100) NULL,
[Employee_Designation] [varchar](100) NULL,
[Employee_Role] [varchar](100) NULL,
[Employee_DOJ] [datetime] NULL,
[Employee_Status] [varchar](10) NULL,
CONSTRAINT [PK_Employee] PRIMARY KEY CLUSTERED
(
[Employee_Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

CREATE TABLE [dbo].[Payroll](


[Employee_Salary] [decimal](18, 0) NULL,
[Employee_ID] [int] NOT NULL,
[No_of_Days_Worked] [int] NULL,
[Salary_Paid] [decimal](18, 0) NULL,
[Salary_Month] [varchar](10) NULL,
[Tax_Deducted] [decimal](18, 0) NULL,
[PF_Amount] [decimal](18, 0) NULL
) ON [PRIMARY]

GO

7
SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[Payroll] WITH CHECK ADD CONSTRAINT [FK_Payroll_Employee]


FOREIGN KEY([Employee_ID])
REFERENCES [dbo].[Employee] ([Employee_Id])
GO

ALTER TABLE [dbo].[Payroll] CHECK CONSTRAINT [FK_Payroll_Employee]

References

Database design basics. (n.d.). Database design basics. Retrieved May 1, 2010, from
http://office.microsoft.com/en-us/access/HA012242471033.aspx

Gehani, N. (2006). The Database Book: Principles and practice using MySQL. 1st ed., Summit,
NJ.: Silicon Press

Investopedia Introduction to Accounting Information System - See more at:


http://onlineaccountingblog.shoebooks.com.au/2011/08/03/accounting-information-systems-
introduction-and-components/#sthash.kocgxmJs.dpuf

Teorey, T.; Lightstone, S. and Nadeau, T.(2005) Database Modeling & Design: Logical Design,
4th edition, Morgan Kaufmann Press. ISBN 0-12-685352-5

You might also like