Anda di halaman 1dari 13

Integrating Oracle SQL into compilation of financial statements

Due to the increased reliance on the structured query language (SQL) as the main query language to access financial database systems in accounting firms, teaching SQL in accounting information systems has become an important topic. The need to explore ways to teach such a topic effectively challenges many educators. This paper presents a teaching case that integrates Oracle SQL technology into the compilation of the financial statements. The teaching case includes 1) designing a financial database with a chart of accounts, 2) creating the company financial database, 3) querying the financial database, 4) preparing a summary trial balance, 5) developing a set of financial statements such as an income statement and a balance sheet, and 6) computing a key financial ratio: return on assets (ROA). This case offers a good starting point for instructors who are interested in teaching SQL in accounting information systems (AIS) courses. The case can also serve as a project for Information Systems (IS) database instructors who are interested in teaching financial and investment databases. By integrating financial statement concepts with Oracle SQL technology, students are able to get an insight into the Oracle financial database system and consolidate the fundamentals of financial database with the compilation of financial statements. Keywords: Structured query language, financial databases, accounting information systems, oracle databases, accounting education, case study

Article Type: Report Subject: Teachers Financial statements Accounting firms Authors: Masry, El-Hussein E. ElWang, Ming Hayes, Rick S. Pub Date: 01/01/2010 Publication: Name: Review of Business Research Publisher: International Academy of Business and Economics Audience: Academic Format: Magazine/Journal Subject: Business, international Copyright: COPYRIGHT 2010 International Academy of Business and Economics ISSN: 15462609 Issue: Date: Jan, 2010 Source Volume: 10 Source Issue: 1 Product:

Product Code: 9915410 Reporting & Disclosure; 8930000 Accounting & Auditing Services NAICS Code: 54121 Accounting, Tax Preparation, Bookkeeping, and Payroll Services SIC Code: 8721 Accounting, auditing, & bookkeeping Accession Number: 237533619 Full Text: 1. INTRODUCTION Database systems have affected the fundamental nature of accounting profoundly. Reliance on SQL to access and manipulate financial databases has increased rapidly. The use of accounting information in decision making is enhanced by powerful querying capabilities to the company's financial databases (Romney & Steinbart, 2006). Financial auditors need to examine relational databases with SQL for two major reasons. Since the introduction of the Sarbanes Oxley Act (SOX) in July 2002, external auditors need to be in charge of giving an opinion on internal controls with respect to financial reporting. Many of those internal control features are embedded into databases of the client company. Secondly, in order to examine and assess certain management assertions, financial auditors need to develop queries on databases using SQL. Although some of the queries could be run using the Generalized Audit Software (GAS) (e.g., ACL, IDEA, etc.), it is more efficient to query original databases with SQL than to rely on those software tools, especially when the data queried is highly sensitive or confidential. To use GAS, the client data will have to be downloaded to the auditor's computer systems, which could compromise the privacy and confidentiality of the client's data. In response to the change, the educators have started incorporating relational database queries in AIS curriculum. There are a number of efforts that have been made to incorporate SQL database queries to accounting information systems (e.g., Borthick et al. 2001; Debreceny & Bowen, 2005; McCollum, 2002). Borthick et al (2001) developed a teaching case illustrating how SQL queries can be used to provide continuous assurance in a situation where two trading partners want assurance of the other's compliance with their agreements. Debreceny and Bowen (2005) examined the ability of accounting students write SQL Data query language (DQL) programs to investigate certain assertions and to provide continuance assurance. They concluded that accountants and users of accounting databases need to improve their comprehension of the implications of various data structures on their SQL queries. Additionally, they came up with a rating of the difficulty of the various SQL DQL commands to accountants. McCollum (2002) advocated internal auditors' reliance and mastery of SQL commands, especially the ones that allow database access and enable auditors to merge relational financial databases of the auditor and the client. Some AIS educators have responded to the challenges by using case teaching approach to recreate the organizational context with the general ledger within which ERP implementations are conducted. This paper presents a teaching case that integrates Oracle SQL technology into the compilation of the financial statements. These financial statement reports are concise, professional and comparable to the financial statements of major publicly held manufacturing companies. This case is taught as part of an undergraduate accounting information systems course at a public university in a metropolitan area on the West Coast of the United States. The case focuses on the use of Oracle SQL code to create major financial statement reports for the Pegasus Company.

The content of the case includes developing a financial database, creating a chart of accounts for the company, developing a set of financial statements such as an income statement and a balance sheet, preparing a trial balance summary and to compute a key financial ratio: return on assets (ROA), and testing the financial database with queries. The goal is to integrate accounting knowledge of financial statements and Oracle SQL technology to build a database to be used to generate the major financial statements needed for the Pegasus Company. 2. CASE SUMMARY This teaching case has been taught in an introductory AIS course in a ten-week academic quarterly system. During the first two weeks of the course, about two hours a week of class time are spent on introduction to the case scenario, financial database design and Oracle SQL syntax. It is important for students to do exercises on computers in class during the first two weeks of the quarter prior to the first assignment. During the first week of the quarter, students learn the conceptual design of the financial database and explore Oracle database architecture. During the second week of the quarter, students learn to create the financial database with the Oracle SQL language in the computer lab. Four types of the SQL language (DDL, DML, DCL and DQL) are briefly defined as follows. a) The data definition language (DDL) permits the user to create a table and define the columns in that table. Definition of the columns involves setting a minimum of three parameters for each of the columns: the name of the column, the data type of the column, and the field size of the column. b) The data manipulation language (DML) permits the user to populate the table, modify existing data or records in the table, and delete data from the table either individually or in its totality. c) The data control language (DCL) is a subset of DML that permits the user to control two very critical functions: creating and saving spool files containing the Oracle SQL programs as well as saving the data and tables created and/or modified. d) The data query language (DQL): permits the user to look up and retrieve data from the database based on specific search criteria. This portion is the most crucial to the work of the external auditor and the accountant. In third week, DML and DCL clauses and commands are taught in a lecture followed by hands on exercises. DQL statements and commands are covered from Week 4 to Week 8. Since the dQl portion is lengthy and important to the work of external auditors and accountants, five weeks are devoted to its coverage. The SQL Financial Statement Teaching Case is divided into seven assignments and assigned to students weekly (one assignment per week) starting at the beginning of the third week. The course outline is listed in Table 1 next page. 3. TEACHING CASE The Pegasus Company is a manufacturing company. During their last meeting, the board of directors at the Pegasus Company has decided to go public shortly. The company' Chief Executive Officer (CEO) wants to have a financial database created to serve this need. In other

words, the company wants to become Financial Electronic Data Interchange (FEDI) compliant. The reason is that Securities and Exchange Commission (SEC) requires companies planning to go public to prepare a set of financial statements in accordance to Generally Accepted Accounting Principles (GAAP) and include it in the company's annual report. The financial database will serve the needs of the investors, banks and lending institutions, financial auditors, IRS officers, SEC officers, executives and middle level management of the Pegasus Company. Investors need to rely on a set of financial statements in order to make an educated decision about whether they should own a share in the business. Banks and lending institutions need to examine the financial statements in order to determine the creditworthiness of the business. Financial auditors examine the financial statements for accuracy before they can issue a positive opinion about the performance of the company. SEC officers regularly read the annual and quarterly financial statements to assess company compliance with GAAP. Internal Revenue Service (IRS) office measures the corporate tax liability based on performance as embodied in the financial statements. Finally, the CEO and management in general cannot plan any future operations until after careful analysis of the financial condition of the company as described in the financial statements. The teaching case consists of seven parts including development of the Pegasus financial database, creation of a chart of accounts, compilation of a variety of financial statements and implementation of queries. Assignments 1 through 6 are cumulative and they are based on the financial database design. Each part has its learning objective, requirements, suggested solution and output. It is important to notice that some assignments have more than a single answer available. In those cases, the more efficient answer is provided in detail, and less efficient answers are discussed in general. Assignment I: Building a Financial Database with Oracle The learning objective of the assignment is to convert the conceptual design of the financial database to the Oracle database using accounting knowledge and Oracle technology. Figure 1 shows the requirements for the first assignment as provided in the case. Figure 2 shows the suggested solution to Assignment I. The answers are illustrated in three steps. First, a SQL DDL statement is written to configure the Financials table according to the specified parameters in the requirements. Then, a set of SQL DML statements are written to populate the table with the 30 accounts. Finally, a combination of SQL DQL and SQL DCL programs are used to display the content of the table and to save the table respectively. Assignment II Creating a Chart of Accounts The learning objective of the assignment is to integrate accounting knowledge of financial statements and knowledge of Oracle SQL to create a chart of accounts using Oracle SQL DQL code. The second assignment is based on the Financials table created in Assignment I. Assignment III: Trial Balance The third assignment is based on the Financials table created in Assignment I. The learning

objective of the assignment is to integrate accounting knowledge of financial statements and Oracle SQL technology to create a trial balance. The students use SQL DML code to update the Financials table. Then they write a SQL DQL program to select the data to be displayed in a trial balance. Additionally, students have to use a DQL command to allow the display of a complete trial balance sheet, with the total of debit balances and total of credit balances showing at the bottom. Figure 5 shows the requirements for the third assignment as provided in the case. Figure 6 illustrates the suggested answer for Assignment III. The answer shows the two major steps needed to prepare the trial balance. A SQL DQL statement with the UNION operator is used to run trial balance data and accounts. The use of the SUM aggregate function was indispensable to add up the debit and credit balances. Assignment IV: Creating Income Statement Report The learning objective of assignment IV is to integrate knowledge of Oracle SQL commands with financial accounting concepts to compile a single step income statement. There are many approaches to complete the assignment. The most efficient approach is to a write a SQL DQL program to include revenue and expense accounts into a single step income statement along with net income/net loss at the bottom of the statement. The aggregate operator SUM is needed to compute net income/net loss. An alternative less rigorous approach followed by some students is to use SQL DQL commands to compute the net income or net loss figure; Then to use SQL DML code to update the Income summary account in the Financials table with the computed amount; and finally use a DQL program to select the data to be displayed in the income statement. Certainly, the second approach is less preferable and less practical because it breaks down the process into two steps. Figure 7 shows the requirements for the fourth assignment as provided in the case. Figure 8 shows a suggested answer for assignment IV. The answer shows the two major steps needed to prepare the income statement. The tasks of computing net income /net loss, inserting it into the "Income Summary" account and compiling revenues, expenses and income summary into an income statement in a single step using a single program is shown in Figure 9. It's important to note that some students will view the three requirements as three different SQL programs and use a less efficient approach to prepare the income statement. It's important for the instructor to make it clear to the students that for this assignment, efficiency is as important as effectiveness and thus will be rewarded. Table 4 shows the Suggested output of Assignment4: Income Statement Report. Assignment V: Balance Sheet Report The learning objective of the assignment is to use a combination of SQL DQL and SQL DML code to compile an end of year balance sheet. The balance sheet is based on the "Financials" table previously used in assignments 2, 3 and 4. To simplify the assignment, students are required to prepare a semi classified balance sheet showing the total of assets, the total of liabilities and owner's equity and only one subtotal: total current assets. There are many approaches to complete the assignment. The most efficient approach is to write three SQL programs to compute and insert the three totals/subtotals into the financials table, then to write a

fourth SQL DQL program to compile the balance sheet. An alternative less efficient approach that some students use is to write a series of SQL DQL programs to compute the three totals/subtotals, then a series of SQL DML programs to insert these subtotals into the "Financials" table, and finally a SQL DQL program to compile the balance sheet. Certainly, the second approach is less than optimal because it requires three extra SQL DML programs compared to the first approach. Figure 10 includes the requirement for the fifth assignment as provided in the case. Assignment VI: Return on Assets Ratio Report The learning objective of this assignment is to use SQL DQL commands to compute a major financial ratio: ROA. ROA is obtained by dividing net income (or net loss) by the average operating assets of the company. Average operating assets is the sum of operating assets at the beginning of the fiscal year and operating assets at the end of the year divided by two. In this case, since only a single period is involved, no information is available on beginning operating assets. Thus, end of year operating assets are assumed to be average operating assets. There are many approaches to compute ROA using DQL code. The most efficient approach is to use the operator "Distinct" to allow dividing the result of one query by the result of a second query. An alternative less efficient approach is to use an aggregate operator (e.g., Sum) to allow adding the content of both cells then to divide the sum of the credit amounts (net income) by the sum of the debit amounts (total assets). Certainly, the second approach is less preferable and less practical because it breaks down the process into two steps. Figure 10 shows the requirements for the sixth assignment. Figure 11 is a suggested answer for assignment VI. A single SQL DQL program is needed to compute ROA. The most efficient answer was to use the DISTINCT operator in order to combine the outcome from two sub queries used to compute net income (loss) and total assets respectively. The SQL DQL program also modifies the heading of the computed ratio to appear as "RETURN ON ASSETS (%.)" A less efficient alternative solution is to use the aggregate operator SUM to compute the total of the two cells with credit normal balance and the total of the two cells with a debit normal balance and divide the first by the second. The inefficiency of this scenario is that, for it to be successful, the values had to be stored previously using SQL DML programs, which is the case. Using the first approach ROA was computed directly without having to rely on any other previous work. 4. LEARNING OUTCOME The teaching case provides students hands-on experience on financial database systems and Oracle SQL technology. At the end of the course, students are able to develop and query Oracle financial databases, create a chart of accounts, develop balance summary, income statement, balance statement and Return on Assets Report reports individually. Students' motivation to learn the case is high because they realize they are developing important skills that will help them in their future career. Feedback from students who completed the case is extremely positive. Many students who went on to work for public accounting firms, especially the large four public accounting firms (Ernst

&Young, Deloitte, Price EaterHouseCoopers, and KMPG) express their appreciation to the authors for giving them the opportunity to learn this teaching case during their study. On many occasions, the authors received emails and letters where alumni are attributing their success in their career directly to their knowledge of financial database systems and Oracle SQL. In one instance, the alumni explicitly stated that her knowledge of financial database systems and Oracle SQL in general was the single most practical skill she learned in her college years. The comments on the case from the students are summarized as follows: The case is a bridge that connects existing accounting knowledge to Oracle SQL technology. By integrating financial statement concepts with hands-on Oracle SQL technology, students are able to get an insight into accounting information systems. The chart of accounts and financial statements are the fundamentals of enterprise resource planning (ERP) software. The hands-on experience from learning the teaching case really helps students learn ERP software and other financial applications significantly. The learning outcomes from the case play an important role in student career development. The experience from the case help students get auditing, accounting and ERP jobs, and make them become competitive in today's job market. 5. CONCLUSION AND FUTURE LOOK This case offers a good starting point for instructors interested in teaching SQL to students in a way to help them explore the potential of SQL as a tool that is already embedded into the company's information system. The project provides students hands-on training on the use of SQL with Financial database systems to compile the major financial statements and reports and build up the foundation for them to understand a variety of ERP, accounting, financial and other business applications in their career development. The current study places most of the emphasis on teaching students about how to serve the needs of external decision makers including investors, lending institutions, banks, IRS, etc ... Future case studies should try to build on the current one to provide the students with the opportunity to build a set of financial reports that serve the needs of internal financial decision makers including the executives of the company as well as middle level management. Ample research in accounting (e.g., McClure 2007) indicates that more companies use budgeting software. Thus, future case studies should train the students on how to prepare budgets, performance reports and variance analysis reports among many other. These reports geared toward the internal needs of management are essential both to accounting students interested in a career in public accounting as well as accounting students interested in a career in private accounting and in consulting. Additionally, future cases should address a variety of organizations (government agencies, nonprofit organizations, etc.), thus covering a variety of accounting systems and accounting reports. REFERENCES: Borthick, F., Jones, D. R., and Kim, R. (2001). "Developing database query proficiency: Assuring compliance for responses to website referrals". Journal of Information Systems Vol. 15, No. 1, pp. 21-25

Debreceny, R. and Bowen, P. (2005) "The Effects on End-User Query Performance of Incorporating Object-Oriented Abstractions in Database Accounting Systems". Journal of Information Systems, Vol. 19, No 1, pp. 43-75 McClure, D. (2007). "Budgeting Software Grows Up", Accounting Technology, Vol 23, No. 8, pp. 27-32 McCollum, T. (2002) "Data Analysis with SQL", The Internal Auditor, Vol. 59. No.4, pp: 25-28 Romney, M. B. and Steinbart, P. J. Accounting Information Systems, 10/E Publisher: Prentice Hall, 2006 AUTHOR PROFILES: Dr. El-Hussein E. El-Masry is an Associate Professor of Accounting in the California State University, Los Angeles, USA. Dr. Ming Wang is an Associate Professor of Information Systems in the California State University, Los Angeles, USA. Dr. Rick S. Hayes is a Professor of Accounting in the California State University, Los Angeles, USA. El-Hussein E. El-Masry, California State University, Los Angeles Ming Wang, California State University, Los Angeles Rick S. Hayes California State University, Los Angeles
Figure 1 Requirements for Assignment I: A) Build a financial database that could be used to prepare the major financial statements (Income Statement, Balance Sheet, and Statement of Cash Flows) based on the Figure 1 using Oracle SQL. First, create a Financials table and insert 30 accounts exactly into the table. The table should include fields for: account number, account name, amount, debit amounts, and credit amounts. It is students' responsibility to identify the accounts most likely to be included in the financial statements of a publicly held manufacturing company. Consult your accounting textbook if you need help with that. --Financials_AIS_Student (Acct_no, Acctname, Amount, Debit, Credit); B) Build the other four tables in the right sequence based on the ERD in Figure 1, insert at least three data records into each table and make sure referential integrity work well among the tables. --The Customer table (Acct No, Cust ID, Company name, Phone, Credit_Card_No, Expiration_Date, Balance)

--The Order table (Order ID, Order Date, Cust_ID) --The Inventory table (Acct_No, Inv_No, EOQ, QOH, Per_Unit_Cost) --The Order_line table (Acct_No, Inv_no, Order_ID, QTY) C) Make sure you have saved data in the tables before you quit SQL Oracle.

Figure 2 Suggested Answers to Requirements in Assignment I Part A: Creating tables using DCL Sample entry: CREATE TABLE Financials_AIS_Student (Acct_no VARCHAR(5), Acctname VARCHAR (25), Amount NUMBER (10,2), Debit NUMBER (9,2), Credit NUMBER (9,2)); Part B: Using DML to populate the Financials table with 30 accounts and DCL to save data: Sample entry: INSERT INTO Financials_AIS_Student VALUES (100, 'Cash_equivalents', 1000, 1000, NULL); COMMIT; Part C: Using DQL to display all the records in all five tables in the financial database Sample entry: SELECT * FROM Financials_AIS_Student;

Figure 3 Requirements for Assignment II: 1) Prepare a chart of accounts based on the "Financials" table created Important Guidelines: --You can use any account balances as long as all necessary accounting rules, checks and balances apply. --The code used in the account number field has to be both 1) representative of the selection of accounts chosen and 2) efficient. --Assume that the database created will be used to prepare a set of classified financial statements. --Do not include the totals of the fields in the chart of accounts --In the output, make sure each account is included on a single line --Your notepad file should show all programs written. If many

attempts are made before a final effective program was written, make sure you highlight the final answer that you want graded. Figure 4 Suggested Answers for Assignment II: Part A: Capturing current date and time and user of the table: SHOW USER; SELECT TO_CHAR (SYSDATE, 'MONTH, DD, YYYY HH24:MI:SS') " START ASSIGNMENT 1" FROM dual; Part B: Display the Chart of Accounts SELECT Acct_no as "ACCOUNT NO", Acctname as "ACCOUNT NAME" FROM Financials_AIS_Student;

Figure 5 Requirements for Assignment III Update the Financials table created in Assignment I in a way to allow you to prepare a trial balance sheet based on it. Use SQL DQL code to display a complete trial balance. --You are to assume that the database created will be used to prepare a set of classified financial statements. --Make sure to include the totals of the fields in the chart of accounts

Figure 6 Suggested Answers for Assignment III: the Trial Balance Summary Part A: Capturing current date and time and user of the table: SHOW USER; SELECT TO_CHAR (SYSDATE, 'MONTH, DD, YYYY HH24:MI:SS') " START ASSIGNMENT 1" FROM dual; Part B: Run trial balance using the SUM aggregate functions: SELECT Acctname as "ACCOUNT NAME", Debit, Credit FROM Financials_AIS_Student UNION ALL SELECT NULL, SUM(Debit), SUM(Credit) FROM Financials_AIS_Student;_

Figure 7 Requirements for Assignment IV: Using Oracle SQL, prepare a single step income statement based on the trial balance you prepared in assignment III. Make sure you use Oracle SQL to compute net income/net loss. Show net income/net loss as "income summary" at the bottom of the statement. Important Guidelines:

--Since a single step income statement is required, no subtotals are required (e.g., gross margin, operating income, etc ...) --In the output, make sure each account along with its balance are included on a single line --It is recommended to prepare the income statement including the net income/net loss balance using a single SQL Oracle program. Don't forget that efficiency is a substantial part of professionalism.

Figure 8 Suggested Answers to Requirements for Assignment IV Part A: Capturing current date and time and user of the table: SHOW USER; SELECT TO_CHAR (SYSDATE, 'MONTH, DD, YYYY HH24:MI:SS') " START ASSIGNMENT 1" FROM dual; Part B: Computing net income/loss and compiling revenues, expenses and income summary into a single step income statement: SELECT Acctname as "ACCOUNT_NAME", Debit, Credit FROM Financials_AIS_Student WHERE Acct_no BETWEEN 400 AND 599 UNION ALL SELECT 'INCOME SUMMARY', NULL, SUM(CREDIT)--SUM(DEBIT) FROM Financials_AIS_Student WHERE Acct_no BETWEEN 400 AND 599;

Figure 9 Requirements for Assignment V: Prepare a balance sheet using Oracle SQL. The only totals and subtotals that need to show and be inserted into the body of the balance sheet are "total current assets", "total assets" and "total liabilities and owners' equity." Compute these totals/subtotals using SQL Oracle before you insert them into the balance sheet. --Set the size of the page used to display the balance sheet to allow for 54 lines only. --Include the following heading at the top of the balance sheet "BALANCE SHEET DECEMBER 31, 200X" Important Guidelines: --A fully classified balance sheet is not required for this assignment. You don't have to compute any subtotals besides the total of current assets. --Compute the selected subtotals/totals and insert them in the order specified. Points may be deducted for failure to follow that order.

--In the output, make sure each account along with its balance are included on a single line --It is recommended to compute and insert each of the three values required in a single step (a single program) using a combination of SQL DQL and SQL DML code. Don't forget that efficiency is a substantial part of professionalism.

Figure 10 Requirement for Assignment VI: Return on Assets Report Using SQL Oracle, write a DQL program to compute ROA (return on assets) based on the figures computed for the income statement and balance sheet prepared in assignments 4 and 5. Important Guidelines: --It is recommended to compute ROA in a single step using a single SQL program. Don't forget that efficiency is a substantial part of professionalism. --You don't need to insert the final ROA figure into the Financials table. --Make sure Include the following heading for the final ROA percentage "RETURN ON ASSETS (%)"

Figure 11 Suggested Answers to Requirements in Assignment VI: Part A: Capturing current date and time and user of the table: SHOW USER; SELECT TO_CHAR (SYSDATE, 'MONTH, DD, YYYY HH24:MI:SS') " START ASSIGNMENT 1" FROM dual; Part B: Computing and displaying ROA: SELECT DISTINCT ( (SELECT Credit FROM Financials_AIS_Student WHERE Acct_no = 600) / (SELECT Debit from Financials_AIS_Student WHERE Acct_no = 199)) * 100 AS "Return on Assets (%)" From Financials_AIS_Student;

Table 1 Course Outline Week 1 Lecture Pegasus database scenario (1 hours) Oracle database architecture (1 hours) Oracle SQL and environment (2 hours) SQL DCL and DML Teaching Case Assignment

2 3

I. Oracle financial database creation

4 5 6 7 8 9 10

SQL DQL SQL DQL SQL DQL SQL DQL SQL DQL SQL DQL Student

(1 hour) II. A chart of accounts creation (1 hour) III. Trial balance summary (1 hour) IV. Income statement (1 hour) V. Balance sheet statement (1 hour) VI. Return on assets ratio report (1 hour) Financial database queries Pegasus database case presentation

Table 2 Suggested Screen Output: Return on Assets Report VI. RETURN ON ASSETS OCTOBER, 24, 2008 20:11:10 USER is SCOTT Return on Assets (%) 28.75

Anda mungkin juga menyukai