Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
197 views
Accounting Database Design and Templates
Accounting Database Design and Templates
Uploaded by
theahmadkhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Accounting Database Design and Templates For Later
Download
Save
Save Accounting Database Design and Templates For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
197 views
Accounting Database Design and Templates
Accounting Database Design and Templates
Uploaded by
theahmadkhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Accounting Database Design and Templates For Later
Carousel Previous
Carousel Next
Save
Save Accounting Database Design and Templates For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 16
Search
Fullscreen
‘The Review of Accounting Information Systems Accounting Database Design And SQL Implementation Revisited David, Olsen, (Email: dolsenggh202.us.edo), Ua Sate University Abstract This paper extends previous work in the context of database design in the accounting area and illustrates the power of the Structured Query Language (SQL) with more ad- vanced business and accounting examples. In the past five years, SQL has become a driving force in the database arena because it is the standard method of extracting information from the database. With the increasing importance of the Internet, de- ‘mand for persons with SQL skills is axiomatic because database systems are fre- quently the backend structure that support ecommerce websites. Database technoiogy is also critical for operations and for data warehousing with implications for account ans because they have the business skills 10 interpret data and to know what informa- tion is critical for many types of decision making. We contend that accountants with savvy technical skills and a fundamental understanding of SQL will be property posi- tioned in the competition to be effecive information providers. In this paper, we use the same group of generic business and accounting-related entities as we used in the first article. The basic design provides the basis for a set of six relational tables with Volume 4, Number 2 sample daa, ‘These tables provide the basis for ten advanced SOL statements that are designed to illustrate the power and usefulness of SOL for accountants. Introduction many ways, the accounting profession is ata crossroads. Either accountants will embrace information systems technology ‘and use it to leverage their considerable infor- mation advantage, ot they will risk becoming in- significant and will lose market share to infor- ‘mation systems persons that have familiarity with accounting precepts. Because of that risk, ac- ccountants are taking a new look at the profes- sion, and many are adapting to the changing en- vironment. Accountants must move from the role of exclusively preparing information to the roles of designers, managers, and auditors of database systems, Readers with questions or comments are encour- ‘aged 10 contact the author via e-mail 33 In order to fulfill these additional roles, ac- countants should have considerable database Knowledge as well as specific knowledge of the structured query language (SQL). SQL is eriti- cal because it is the standard database language that transcends platforms and database manage- ment systems (DBMS). DBMS products such as Access, Oracle, DB2, Sybase, Informix, and SQL Server include an SQL component that is used to accomplish tasks such as table creation and answering ad hoc questions. Some might argue that graphical user inter- faces (GUD) or web-based interfaces should be used for these tasks, but these tools are too weak for advanced queries, and they tend to be pro- rietary. Proprietary tools have historically been‘The Review of Accounting Information Systems, ‘a problem because the standards change and new proprietary tools must be learned. In contrast, SQL is stable, includes a standards governing body, and is robust and powerful. ‘This paper extends the work in Olsen(1999) that included a description of a database design in the context of an accounting example. This paper includes several advanced SQL statements that are salient to accountants.’ An increased knowledge of database management is important for the survival of practicing accountants. This knowledge should include a familiarity of entity relationship (ER) modeling, table normalization, ‘query concepts, and SQL. ‘This paper continues with a review of some of the accounting database literature in Section HL, Section IM is an introduction to a standard, simplified database design that supports basic business functions. ‘The entities that are derived from the basic business design in Section III are the basis for the normalized tables that are used throughout the rest of the paper. In Section IV, fa set of advanced SQL examples that are ger- ‘mane to accounting are presented and explained. ‘The examples that were selected make use of the ‘more advanced SQL techniques as well as an- swer some common accounting questions. These advanced techniques should benefit accountants as they will have a more powerful tool to use when they are compiling and interpreting infor- mation, Section V concludes with a discussion of the future of databases and SQL in account- ing, Review Of Accounting Database Literature A principal understanding of database con- ‘cepts has historically been important in the ac- counting profession. For example, the AAA. “The queries in this paper were tested and exe- cuted in Microsoft SQL Server 7.0 though some differences with Access 2000 are noted. The queries in the first paper were tested and exe- cuted in Access 97. Volume 4, Number 2 ‘Committee on Contemporary Approaches to ‘Teaching AIS (AAA, 1986) recommended that instructors include substantial coverage of data- base topics in their AIS courses. The extent of database coverage recommended by the Com- ‘mittee includes 1) data coding, 2) file/record de~ sign, 3) batch/on-line processing, 4) data struc~ tures and file organization, 5) database organi- zation, 6) conceptual data modeling, 7) defining database requirements, 8) model databases, 9) extracting data from databases, and 10) mainte~ ‘nance procedures. Olsen and Calderon (1996) reported on a ‘more contemporary list of database management systems topics and concepts that included sur- vey to AIS instructors. Those topics are listed in ‘Table 1. ‘The rationale for proficiency using database ‘management systems (DBMS) is evident from the changing role of accountants as information providers in business and industry. WI Ccountants are stil very important providers of fi: ‘nancial information to managers and parties ex- ternal to a business enterprise, their role is rap- ily changing (Elliott, 1994). Managers, inves- tors, and others now have significantly greater access to sophisticated databases and can query those databases directly to obtain timely custom reports. The accountant’s role then seems to in- clude more systems analysis and design as well as supporting querying the information system. Olsen and Kimmell (1998) reported on ad- vanced database technologies that are either be- ‘inning to be used or that may be used in the ac- ‘counting profession. These technotogies include 1) objectoriented databases, 2) Internet data- bases, 3) data warehousing, 4) data mining, 5) active databases, and 6) business rules. These advanced technologies have important implica- tions for accountants because they will be the ba- sis for future accounting systems. Accountants skilled in these areas will be nicely equipped for the furure systems.‘The Review of Accounting Information Systems ‘Table 1 List of Database Con Alvernatve database models ~ Hierarchical mode! Alternative database models ~ Network model Alternative dxabese models — Relational model Alternative dabase models — Object Oriented model Auditing databases sie terminology ~ abut (eld) esi erminology ~ entity (resord) table (le) Basie erninolony Basie ernlnoog [Concurrency cour [Pazenity relationships Dataentiy relationships ‘one-to-one reladonatips ve o-many relationships SSS [Dasa ow diagrams Data dieonaries Daahase management systems sofware packages Database sdminisration Database secur Eni inary Enity Relationship models alsaton of databases [General coniros for he oven information yam Information systems step planning aformation systems wer nests and reqlremeatsaalyle Network and anwibued dabases | Nonmaliaton ~ frst normal form [Normalization ~ Rit normal frm Querying a database Reterentaliiegiy Relational operators Specific congoe for individual applications Suctured Query Language (SQL) Traniacton management 35 Volume 4, Number 2 Database Design And SQL Examples ‘The following six generic entities are com- ‘mon to most business and are the basis for this presentation: (1) Customers (2) Orders (3) Line Items (4) Inventory (5) Vendors and (6) Ship- ping. Figure 1 is an Entity Relationship (ER) dia- gram that conforms to the rules defined by Chen (1976) that illustrates the relationships between the six entities. The Customers entity simply represents customers with the attributes that must be captured. Appropriate customer attributes in- clude the customer's name, address, phone num- ber, etc., and are listed in the table definitions in Appendix A. The Orders entity represents or- ders that have been placed by customers who al- ready exist in the system, The customers and the orders have a one-to-many (I-M) relation- ship, which means that a customer can place many orders and that an order is placed by a sin- gle customer. Alternatively, the 1-M relation- ship is sometimes referenced as a parent-child relationship. Figure 1 then includes the number 1 by the Customer entity and an M by the Orders entity. Similarly, the Orders entity has @ 1-M rela- tionship with the Line lems entity. This means that a given order may have several line items, but a single tine item belongs to one order. This allows for an Order to contain many different pieces of inventory of varying quantities. This design also shows a 1-M relationship between the Inventory entity and the Line Items ‘entity, which means that a single type of inven- tory can appear on many different line items and that a Line Item includes only one type of in- ventory. A 1-M relationship also defines the Vendor and the Inventory entities, which means that a vendor can supply mumerous different types of inventory and that a type of inventory is supplied by a single vendor. This is admittedly simplisticThe Review of Accounting Information Systems because most organizations would want to have the option of ordering the same types of inven- tory from different vendors. Some of the rela- tionships were simplified in order to make these ‘examples manageable. tionship is the one between the Vendors and Shipping entities. We state that a vendor chooses to ship goods with a single ear- rier such as UPS or Federal Express. To that end, a vendor uses one method of shipping, and a shipper services many vendors, We thus ob- serve a ILM relationship between the Shipping and Vendors entities ‘This query displays the order mumber, date, and amount for all inventory items that are white. This is a good example of a subquery, which is essentially a query within a query. To understand a subquery, itis easier to read it from the bottom select statement and proceed upward, For example, the innermost select statement re- ‘urns all inventory numbers (|_num) for inven- tory that is white, The next select statement, then, is only considering white inventory when it Volume 4, Number 2 searches for order mumbers (0_num) from the Lineltem table. ‘The outermost select statement displays the order number, order date, and the invoice amount for the orders which include in- ventory items that are white This query makes use of the “IN” operator before each sub-query. An “IN” operator must bbe used in place of the *=" operator if the sub- query is going to return more than one value in the answer; otherwise, this query would return Subqueries are valuable for answering questions that have values in separate tables and are often used instead of joins to improve the speed of the query. ‘The answer here is simply the Orders table ‘with up-to-date values in the invoice amount at- tribute. Many arguments have been presented against storing derived attributes as we do in this example. In fact, the general rule of thumb is not storing derived attributes without a good rea- son, which is usually related to performance. SQL Examples the color of an order item is white Answer SELECT o mum, 0 date, i amt FROM Orders ‘Example 1 -- Find the order umber, date, and invoice amount from the Orders table where WHERE 0 num IN (SELECT o_num FROM Lineltem WHERE i num IN (SELECT imum FROM Inventory WHERE color = ‘white; mum o date ame 1598 1999-02-12 00:00:00.000 86,0000 1693 1999.03.06 00:00:00.000 204.0000 37The Review of Accounting Information Systems. Example 2 ~ Update the invoice amount in the Orders table from the individual line items in the Lineitem table. Answer: SELECT 0_mum, SUM(total_tine_item) AS i_amt INTO parti FROM Lineltem GROUP BY o_num; Parti (The temporary table) oun iam 145 4 0298 142 0342 4 om 200 1267 110 1321 100 1598 86 1693, 204 2u11 4 2323 68 2415 105 2948 99 3674 164 4567 36 4932 8 5674 30 3675 116 Answer: UPDATE Orders SET Onder partl.i_amt FROM Orders, part! WHERE Orders.o_num = partl.o_num; ‘This query can be done in a few ways. We chose to do a two-part query that makes a tem- porary table that we call partl. ‘The first part of the query calculates a sum of the total line items 58 Volume 4, Number 2 by the order number. A given order number might have 5 line items, so the total line item amount for each of the five is added and put into the new iamt field in a temporary table we called Parti. In order to calculate the total line items for a single order, we used the optional GROUP BY clause on the order number field. ‘The temporary table called Part is the first table listed above. ‘The second part of the query is easier to understand because it is a simple update query. ‘The order numbers from the Orders and the temporary Part] tables are joined in the WHERE. statement, The invoice amount (i_am\) field in the Orders table is updated to the value i_amt from the temporary table, Part1. ‘These two queries are simply executed after all the line items are input, but they must be exe- cuted in order. Considerable caution should be exercised on queries like this because update queries actually change the data in an existing table. These queries can be executed multiple ‘times without a problem because there is no cu- ‘mulative effect involved in the calculation, ‘This query displays some customer and payment information for the customers who have not fully paid a given order. The distinct modi- fier ensures that a single customer is listed re- gardless of the number of orders that have not yet been fully paid. ‘This useful, common busi- hess query is produced by first joining the or- ders and customers tables on the customer num ber attribute, Orders that have the paid_in_full attribute equal 10 0 (which is used to represent the false condition) are then returned.* ‘The ppaid_in_full attribute in the Orders table was represented with the bit datatype meaning that a Note a difference here between the Access data- base management system and the SQL Server database system. In Access, there is a yes/no datatype, so the WHERE clause in the query ‘would have the paid_in_full attribute equal 10 “FALSE.”The Review of Accounting Information Systems Volume 4, Number 2 Example 3 ~ Find the customer name, address, city, and state for customers who have not fully pid & siven order. Answer: SELECT DISTINCT c.c_name, ¢_addr, ¢ city, ¢ state, o.paid_in_full FROM customers AS ¢, Orders AS 0 ‘WHERE c.c_num name ¢ addr city state pain full ‘Alex's Music Store ‘21 Rose St. Logan ur 0 Bill's Tacos 9873 D St Preston D 0 Bill's Towing 345 Oak St Smithfield UT o Brian's Brain Surgery 574 Riverside Chicago 1 0 Carol's Green House = 448 399 E Charlote NC 0 Fred's Auto Shop 123 South Main Logan ur 0 Jacks Used Autos S4N Autobaun ‘Roanoke VA 0 Jon's Haireuts 125 South Main Logan ur ° Nate's Racquet Shop $67 Elm St Baton Rouge LA 0 Pacos Bill 234 Catus Dr, Amarillo 1™ 0 Example 4 ~ List the vendor name and inventory descriptions of inventory each vendor supplies to us Sort the answer in ascending onder by vendor name and descending order by inventory description, Answer: SELECT v.v_name, i.{dese] FROM Vendor AS v, Inventory AS i WHERE v.v_num = iv_nom ORDER BY V.v_name, i[dese] DESC; name dese ypame dese Jou Browa's Materials shovel Taigis Tre ‘atieries Jon Brown's Materials nails Sanchez's Supplier white paint on Brown's Materials hammer Sanchez's Supplier snow shovel Jon Brown's Materials garden spade ‘Sanchez's Supplier snow blower Luigi's Inc. sand paper Sanchez's Supplier screwdriver Laigi's Inc. paint brush Sanchea's Supplier sand Luigi's Ine Tight bulbs Sanchez's Supplier ladder Luigi's Ino garden gloves Sanche's Supplier hand saw Laigi's Ine aril Sanchez's Supplier flashlight Laigi's Ine. cypress mulch Sanchea's Supplier flashlight Luigi's Ine, brown paint 59‘The Review of Accounting Information Systems, ‘The data we need to accomplish this query is contained in the vendors and inventory tables, so we join them on the vendor number attribute in the WHERE clause. We display the vendor names and the inventory descriptions in the SELECT clause. ‘The ORDER BY clause sets the display order of the answer table. In this ‘case, it is used to list the vendors in ascending order, which is the default. The DESC modifier is required after the inventory description so that inventory can be listed in descending order. Note that it would be considered bad nam- ing practice to abbreviate the description field of the inventory table to DESC because DESC is a reserved word as was explained in the previous paragraph. This is an interesting example be- cause Access accepts DESC in the SELECT clause of this query whereas SQL Server forced the bracket modification (,[dese]) before the query could execute, ‘This query groups the total sales by state. ‘We used an aggregate in the SELECT clause to ‘get a sum of the orders and named the new col- ‘uma in the answer table sum_of sales with the AS modifier. We had to include the state attrib- Volume 4, Number 2 ‘wee in the SELECT clause because it is used in the GROUP BY clause. In other words, if an attribute is used in the GROUP BY clause, it ‘must be specified in the SELECT clause. We joined the Customers and the Orders tables in the WHERE clause and grouped by state in the GROUP BY clause, To summarize, ‘we group by state and then get a sum of orders for each state If an aggregate is specified in the SELECT statement, the rest of the attributes in the SELECT clause must either include an aggregate of be included in the GROUP BY clause, This is necessary because the attribute in the select slatement that is going to be grouped must be identified. It is interesting to note that groupings can take place on more than one attribute. Using the aggregate operator as we did in this manner is helpful in determining the total sales that are ‘made in each state. It is interesting to note that a left outer join ‘would be required if we wanted to list all states along with the associated (otal sales amounts (if any). SELECT e.c state, SUM(0.i_amt) AS sum_of sales FROM eustomers AS c, Orders AS 0 WHERE c.c_num = 0.¢_num GROUP BY ce state state sum _of sales cr 14.0000 D 68,0000 1 142.0000 LA 86.0000 NC 105,000 [Example 5 ~ List the total sles by state where at least one customer exist in te sate. Answer: state ssum_of sales oR 99.0000 sD 100.0000 1X 200.0000, ur 912.0000 VA 204,000 0.‘The Review of Accounting Information Systems Volume 4, Number 2 Example 6 ~ Find the inventory description and cost forall items sold inthe states of Uuah, Texas, sand Oregon, Answer: SELECT [desc cost FROM Inventory WHERE i_num IN (SELECT i_num FROM Linsliem WHERE o num IN (SELECT o_num FROM Orders WHERE c_num IN (ELECT ¢_num FROM customers WHERE ¢_state IN(UT',"TX'OR')); ese cost dese. cost screwdriver 2.0000 ladder 20.0000 sand paper 4000 ‘brown paint 6.0000 ail 36.0000 hammer 2.5000 ‘garden spade 1.0000 batteries 2.0000 shovel 5.0000 flashlight 1.0000 snow blower 50,0000 This will display the description and the descriptions and their corresponding costs for cost of the inventory items that were sold in ei- only the inventory items that were returned in ther Utah, Texas, or Oregon. This is another the previous SELECT statement. example of multiple sub-queries that are used to extract specific information from the database. ‘This more complex query can also be ac- The inner-most SELECT extracts all Customer complished by simply joining all four tables and numbers (¢_num) from the customers table that then selecting the specific tuples’. The subquery live in Una, Texas, or Oregon. Notice the use approach has a performance advantage over the of the “IN” operator. As we mentioned earlier, join approach in many commercial database if more than one ¢_num is possible, the “IN” management systems because of the tremendous operator is required. If only one answer is pos- cost of joining tables. AS the tables grow larger, sible, the “=” operator is used. the advantage becomes more pronounced be- cause the subquery method works with smaller The next SELECT statement extracts the amounts of data, whereas the join method creates ‘order sumbers (@_num) from the Orders table an enormous temporary table which is then re- for those customers that were returned in the duced to the eventual answer. previous SELECT statement. The next SELECT Statement returns the invoice number (_num) This query illustrates another difference from the Lineltem table for all order numbers between Access and SQL Server which concerns that were returned in the previous SELECT formatting. Access queries produce output in a statement, A tuple is the formal name of a single row or Finally, we want to display the inventory record in a database. a‘The Review of Accounting Information Systems. Volume 4, Number 2 Example 7 - Write a query that updates the amount due attribute in the Orders table. Answer: UPDATE Orders SET amt_due = i_amt -amt_paid; ‘able format, and the results are displayed in a ‘more user-friendly manner. For example, the answer to this query shows several zeros after the decimal point and does not display currency symbols, whereas Access eliminates the extra ze- ros and does display currency symbols. This probably coincides with the philosophy that Ac- cess is designed 10 be an end-user product, whereas SQL Server is designed to be an indus- trial-strength product. Other DBMS products generate output quite similar to that displayed in these examples, ‘This is an example of another update query that actually modifies data in an existing table. ‘The amount due is calculated as the invoice amount minus the amount paid and is specified in the SET clause. Every order in the Orders ta- ble is updated to this calculated amount. An an- swer table is not listed here because itis simply the updated Orders table. ‘This query is essentially a group of separate SELECT queries combined using the UNION statement {0 form a single query that yields the total sales for different time periods. In the first SELECT statement, the aggregate SUM( is ap- plied to the invoice amount from the Orders ta- ble. In the end, the invoice amounts will be dis- played for each specified time period due to the effects of the ORDER BY clause in the last line which orders by the time period. ‘The column heading for invoice amounts is changed to sum_of_sales with the AS modifier for clarity. Similarly, the second column is re- ‘named to “year” and the values simply include ea ‘Example 8 — Write a query that lists the total sales (orders) for the following time periods (1980-1990, 1991-1997, 1998, 1999) SELECT SUM( amt) AS sum_of sales, "1980 to 1990" AS year FROM Orders WHERE 0 date BETWEEN 01/01/80" AND "12/31/90" UNION SELECT SUM(_amt) AS sum_of sales, "1991 to 1997" AS year FROM Orders WHERE 0 date BETWEEN '01/01/91" AND "1231/97" UNION SELECT SUM(_amt) AS sum_of_sales, 11998" AS year FROM Orders WHERE 0 date BETWEEN 01/01/98" AND "12/31/98" UNION SELECT SUM(i_am!) AS sum_of sales, "1999" AS year FROM Orders WHERE 0 date BETWEEN °01/01/99' AND "12/31/99" ‘ORDER BY year; sum _of sales year 424.0000, 1980 w 1990 274.0000 1991 t0 1997 190,000 1998 1042,0000 1999 literals for the time period designations. The date condition is set in the WHERE statement ‘using the between operator to include all dates from 1980 to 1990 inclusive. ‘The rest of the SELECT statements do the same tasks with dif- ferent time periods. In summary, this is a clever ‘method of calculating and displaying summarized‘The Review of Accounting Information Systems Volume 4, Number 2 Example 9 ~ List the toil sales amount of in- ventory items along with the vendors that sup- Plied those items forthe year 1999, Answer: SELECT v.v_name, SUM(.total_line_item) AS sum_of sales, '1999" AS year FROM Lineliem AS 1, Vendor AS v, Or ders AS 0 WHERE Linum IN(SELECT i_num FROM Inventory WHERE v_num = v.¥_mum) AND Lo_num = 0.0_num AND 0.¢_date BETWEEN ' (01/01/99 AND "12/31/99" GROUP BY v.v_name; name sum of sales yea Jon Brown's Materials Luigi's Inc. Sanches Supplier 286.0000 1999 370.0000 1999) 386.0000 1999 information for different time periods, but it is ‘important that all the answers be in the same format in order to utilize the UNION statement. This is another query that serves to illus- trate the difference between ANSI standard SQL, which SQL Server uses, and Access, which is only partially compliant. ‘The dates in this ex- ample are enclosed with an apostrophe (*) which is ANSI SQL. In contrast, Access requires dates in queries to be enclosed with pound signs (#). ‘This is a simple example of a data ware- housing type of question that is used for analyti- cal purposes. An inner SELECT is used to re- ‘urn inventory numbers for each vendor that has supplied us with any inventory. We join the In- ventory and Vendor tables, which has the effect of ordering the inventory numbers by vendors that have supplied that inventory. In the end, this facilitates the grouping by vendors, 8 ‘Example 10 - List the customer names for cus- tomers that have not fully paid an order and show the number of days since the order was placed. (The date this query was processed for this exam- ple was January 3, 2000.) SELECT c.c_name, east(GETDATEQ as integer) AS late payment_days FROM customers AS 6, Orders AS 0 0.0 date WHERE o.paid_in_full = 0 AND o.¢_mm name payment days Fred's Auto Shop 838 Fred's Auto Shop ro) Fred's Auto Shop 1 Alex's Music Store 5979 ‘Alex's Music Store 432 Brian's Brain Surgery 354 cos Bill 349 Bill's Towing 327 [Nate's Racquet Shop 325 Jon's Haircus 1886 ‘Carol's Green House 25 Bill's Tacos 249 Jacks Used Autos 303 ‘The WHERE clause evaluates three condi- tions. First, inventory numbers for a specific line item must match those chat are returned by the SELECT statement described in the previous paragraph, Second, the Lineitem table and the Orders table ae joined on the order number at- tribute so that the date attribute from the Orders table can be evaluated. Third, order dates for all ine items that met the first two conditions are tested and are returned if the order was placed in the year 1999. ‘The outer SELECT is then used to list the name of the vendors, the total dollar amount of inventory that was sold and that was supplied by each vendor, and the year which, in this case, ‘was specified as the literal ‘1999.” The GROUP BY at the end is the mechanism that facilitates calculating the sales amount by vendors.‘The Review of Accounting Information Systems, ‘A common accounting task is calculating the aged accounts receivables or, in other words, determining how many days have passed since a receivable has been issued. Since we did not in- clude an attribute in this sample database that ex- actly represents the receivable issue date, we use an approximate attribute by using the order date. ‘The SELECT statement is used to list the customer's name and a calculation that is the current system date minus the order date and is, titled in the answer as late payment days. The ordering of dates is important in this calculation because more recent dates are larger values, and older dates are smaller values in most, if not all, systems. Subtracting the order date from the system date in this case is not ANSI standard for ‘wo reasons. First, GETDATE( is the proprie~ tary SQL Server method of returning the current system date. Second, the cast() function was used f0 convert the date calculation into integers. If the cast function were not used, the number of days outstanding would appear as a date which would not be useful. Access seems to have a more simple implementation as the following works in the SELECT clause in Access: SELECT c.c_name, date) - late_payment_days 0.0_date AS ‘The WHERE statement includes two con- ditions. First, the Orders and Customer tables are joined on the order number attribute and sec ‘ond, the WHERE returns only those orders that have not yet been paid in full. See the discus- sion in Example 3 concerning the paid in full at- tribute having a 0 or a 1 t represent false or true respectively. Conclusion Recently, the use of information technology for business purposes has become critically im- portant, in no small part, due to the Internet. ‘Though the accounting profession has already changed in significant ways in response to ad Volume 4, Number 2 vances in technology, change continues to occur ata staggering rate. Though database technol- ‘ogy is not new, its level of usage is dramatically increasing, and innovative database applications continue to appear. Because of the importance of database technology in business, accountants ‘would be well served to augment their business ‘and accounting knowledge with database com- petency. ‘Two important database aptitudes include database design and querying a database. The design used in this case is similar to Olsen (1999) which illustrated using the ER diagraming ‘method to model the sample business listed in Figure 1. In summary, database design is im- perative for aspiring accountants planning to work in the systems area For many years, microcomputer database applications relied on proprietary querying schemes as the primary method of “questioning” the database. In contrast, contemporary database systems use SQL as the primary method of “questioning” the database, The SQL. method continues to enjoy the advantage of standardiza- tion, which means that accountants can learn one method of querying and still be competent with different databases. The SQL examples in this case were designed to illustrate some advanced ‘methods of querying that can be useful for analy- sis purposes. Systems savvy accountants that can combine advanced SQL techniques with business and accounting knowledge will have a substantial competitive advantage as information providers. Future research in the SQL business area needs to include specific accounting and finance extensions to the language. In addition, new Internet specific languages such as XML that often integrate SQL must also include accounting and finance extensions. There is currently a concerted effort in developing such standards in both XML and SQL.‘The Review of Accounting Information Systems Volume 4, Number 2 References 4, Olsen, D., “Accounting Database Design and SQL Implementation” Review of Ac- 1, American Accounting Associaton, “Report counting Information Systems (Summer, of the AAA Committee on Contemporary 1999. Approaches to Teaching Accounting In- 5. Olsen, D., and T. Calderon, “Database formation Systems.” May 1986, Coverage in the Accounting “Information 2. Chen, P.P., “The Entity-Relationship Systems Course” Journal of Accounting Model: Toward a Unified View of Data.” and Computers Information Systems ACM Transactions on Database Systems (Spring 1996) Ganuary 1976): 9-36. 6. Olsen, D., and S, Kimmell, “Towards In- 3. Eliott, R.K., "The Future of Audits." tegrating Advanced Database Concepts into Journal of Accountancy, (Septemiber 1994), Accounting” Review of Accounting Infor- pp. 74-82. ‘mation Systems (Summer, 1998). ‘Appendix A Table: customers Columns Name Type Size num Text 7 e-name Text 30 c_addr Text 20 c-city Text 18 c_state Tet 2. c_tipeode Tet 9) phone Text Tnput Mask: aaa") “aaal-aaaa fax Text ccinternet_ Text Relationships customers to Orders emm1 © mum M Attributes: One-To-Many 6The Review of Accounting Information Systems. Volume 4, Number 2 ‘Appendix B Customers Table "2 Souh Nain opin [UT 8421-485) 74599 (5) 7459998 eds com lesen mace (as) 89486 Jont Rowe 5. Logan (6574 Riverside Chicago. 45367- (756) 874.0000 (128) 874-7513, ‘Beast 1200 (St. 7 LUT 7684. (435) 46.9675 (435) 546-9875 p |x. [79101- ls) 245-6198. (855) 245-6499 box se [asym | os pureTowng sous, SE" [or secs merse CSO Use fom | a fx a Fem [x seam rams fam sree ‘sos SN [esr boon ‘ax SB ern Amin SO 9 Sas OH HAH (56 864-7543 0186) 864-1111 | nteastock com 125 South Main [Logan UT |84321-|435) 7929856 (435) 456-9876 |Haivpnet.com | josos Cals Cue ag MOTE (as sos crear. + jens a (9873 D St. 36 3747543 ((756) 874-7777 |Tacosdonet.org_ Ls Bech Ave [430 123-7094 [456 123-2005 surtnapoimtrnkors | Broom De Salem OR [97306 |(312) $87-6578. 12) $87-6579 Blackest. com | I _ mace issste JHU 54 qutaun —[Roaoke VA 2513-64) 98-5866 | 64 9665565 |Carsavet aos ooo NAY = ——— (985 [Miceam 28D pany [SD [S710 ms asssr96 |76)205-697 [Bikabutancom | Be Nie | eS eatimcom | THE Suacher's 472 South [Logan [UT 4321-(435) 3459876 (435) 765.9087 Usangao.com 58 |Supplier_jMain _ ——— 4 — bar ae ont rea (iy Sra |G ST Liwea cm abies " 7 pene - (SG gh eas a a NDE GH EH eee L J___Center 1 oe 11‘The Review of Accounting Information Systems 6 mum ¢ num 6 dale las 12398 ‘ba1/1983, ise ise ana asa sins anit 53885 9999 a6 $9870 Haro fa iRiiaeo os “ai ari968 rate Tas ‘sna co : 25s oni a a 00 Sere Ee sii Orders Table Volume 4, Number 2 0800 @ 0 50) S100) 6‘The Review of Accounting Information Systems. Volume 4, Number 2 "45000 (sore (33392 43000 ~ 3392 35241
You might also like
From Accounting To FP&A
PDF
No ratings yet
From Accounting To FP&A
7 pages
Systems Analysis and Design in A Changing World, 7th Edition - Chapter 9 ©2016. Cengage Learning. All Rights Reserved. 1
PDF
No ratings yet
Systems Analysis and Design in A Changing World, 7th Edition - Chapter 9 ©2016. Cengage Learning. All Rights Reserved. 1
52 pages
Database Evolution
PDF
No ratings yet
Database Evolution
8 pages
The Adaptive Web - Methods and Strategies of Web Personalization - INDEX
PDF
No ratings yet
The Adaptive Web - Methods and Strategies of Web Personalization - INDEX
10 pages
SQL Server Tutorial On Tables
PDF
No ratings yet
SQL Server Tutorial On Tables
53 pages
Relational Database
PDF
No ratings yet
Relational Database
17 pages
Building Scalable Web Sites
PDF
No ratings yet
Building Scalable Web Sites
21 pages
CDIT 405 Lecture 1 - Introduction To DBMS
PDF
No ratings yet
CDIT 405 Lecture 1 - Introduction To DBMS
4 pages
Terms and Conditions For Electronic Banking Services
PDF
No ratings yet
Terms and Conditions For Electronic Banking Services
5 pages
Accounting Database Design
PDF
100% (1)
Accounting Database Design
11 pages
Database Concept For Accounting
PDF
100% (1)
Database Concept For Accounting
10 pages
Discovering Computers 2011: Living in A Digital World
PDF
No ratings yet
Discovering Computers 2011: Living in A Digital World
40 pages
Software Engineering: A Short Guide To Written Exam Software Engineering
PDF
No ratings yet
Software Engineering: A Short Guide To Written Exam Software Engineering
12 pages
Database Fundamentals
PDF
No ratings yet
Database Fundamentals
31 pages
DBMS Notes For BCA
PDF
67% (6)
DBMS Notes For BCA
9 pages
Database Fundamentals: INFM 603 - Information Technology and Organizational Context
PDF
No ratings yet
Database Fundamentals: INFM 603 - Information Technology and Organizational Context
35 pages
Mini Project B LVL
PDF
No ratings yet
Mini Project B LVL
62 pages
The Evolution of Technology For The Accounting Profession
PDF
No ratings yet
The Evolution of Technology For The Accounting Profession
8 pages
Good Programming Skills
PDF
No ratings yet
Good Programming Skills
47 pages
NAV17 Web
PDF
No ratings yet
NAV17 Web
812 pages
Online Book Store
PDF
100% (4)
Online Book Store
15 pages
Requirement Analysis Ch-2
PDF
No ratings yet
Requirement Analysis Ch-2
31 pages
Data Access Programming
PDF
No ratings yet
Data Access Programming
7 pages
Business Intelligence Requirements Gathering
PDF
No ratings yet
Business Intelligence Requirements Gathering
2 pages
MIS in Your Pocket
PDF
100% (1)
MIS in Your Pocket
1 page
Ax2012 Enus Devi 04
PDF
No ratings yet
Ax2012 Enus Devi 04
20 pages
Cis CH5
PDF
No ratings yet
Cis CH5
50 pages
Chapter 3 - Architecture Session I
PDF
No ratings yet
Chapter 3 - Architecture Session I
19 pages
Bharath Resume
PDF
No ratings yet
Bharath Resume
4 pages
Introduction To Cloud Computing - D
PDF
No ratings yet
Introduction To Cloud Computing - D
19 pages
SQL Tutorial
PDF
No ratings yet
SQL Tutorial
33 pages
Introduction To Networking
PDF
No ratings yet
Introduction To Networking
11 pages
Cloud Computing Research Paper
PDF
No ratings yet
Cloud Computing Research Paper
6 pages
1iscala Overview
PDF
No ratings yet
1iscala Overview
12 pages
Programming Paradigm
PDF
No ratings yet
Programming Paradigm
14 pages
03 Working With Project Transactions
PDF
No ratings yet
03 Working With Project Transactions
70 pages
Associates and Joint Ventures: Chapter Aim
PDF
No ratings yet
Associates and Joint Ventures: Chapter Aim
41 pages
CRM Uml
PDF
No ratings yet
CRM Uml
53 pages
CS207: Database and Information Systems
PDF
No ratings yet
CS207: Database and Information Systems
32 pages
Dynamics AX 2012 Shortcuts (GL)
PDF
No ratings yet
Dynamics AX 2012 Shortcuts (GL)
1 page
Contract
PDF
No ratings yet
Contract
98 pages
ERP Project Toolkit - The Ultimate Checklist and Tools To Start Your ERP Project - Part 3
PDF
100% (1)
ERP Project Toolkit - The Ultimate Checklist and Tools To Start Your ERP Project - Part 3
10 pages
Ax PDF
PDF
No ratings yet
Ax PDF
526 pages
Introduction of DBMS
PDF
No ratings yet
Introduction of DBMS
83 pages
Final Project Report: Locate A Tutor
PDF
No ratings yet
Final Project Report: Locate A Tutor
65 pages
Designing Effective Input: Kendall & Kendall Systems Analysis and Design, Global Edition, 9e
PDF
No ratings yet
Designing Effective Input: Kendall & Kendall Systems Analysis and Design, Global Edition, 9e
48 pages
Progress Analysis
PDF
No ratings yet
Progress Analysis
21 pages
OOPs PPT
PDF
No ratings yet
OOPs PPT
14 pages
Guidelines Extensions (Table Level) Best Practices
PDF
No ratings yet
Guidelines Extensions (Table Level) Best Practices
15 pages
Java Lab Programs JNTUA
PDF
No ratings yet
Java Lab Programs JNTUA
10 pages
Entity Relationship Model
PDF
No ratings yet
Entity Relationship Model
32 pages
PIC - Module 1 - Part 1
PDF
No ratings yet
PIC - Module 1 - Part 1
12 pages
5a - CRM, ERP, SCM
PDF
No ratings yet
5a - CRM, ERP, SCM
32 pages
Net Suite Open Air So A Papi Guide
PDF
No ratings yet
Net Suite Open Air So A Papi Guide
212 pages
Systems Analysis and Design in A Changing World, 7th Edition - Chapter 4 ©2016. Cengage Learning. All Rights Reserved. 1
PDF
No ratings yet
Systems Analysis and Design in A Changing World, 7th Edition - Chapter 4 ©2016. Cengage Learning. All Rights Reserved. 1
67 pages
Supplemental Materials For Database Man-Agement System Knowledge and Skills in The Accounting Information Systems Course
PDF
No ratings yet
Supplemental Materials For Database Man-Agement System Knowledge and Skills in The Accounting Information Systems Course
6 pages
AIT-3
PDF
No ratings yet
AIT-3
5 pages
Suggested Answers To Discussion Questions
PDF
No ratings yet
Suggested Answers To Discussion Questions
3 pages
Lecture Notes On Analysis Design of Accounting Dat PDF
PDF
No ratings yet
Lecture Notes On Analysis Design of Accounting Dat PDF
49 pages
Design and Implementation of An Accounting Database Assistance System
PDF
No ratings yet
Design and Implementation of An Accounting Database Assistance System
48 pages
Notesh
PDF
No ratings yet
Notesh
246 pages
ORACLE-BASE - Oracle Shell Scripting
PDF
No ratings yet
ORACLE-BASE - Oracle Shell Scripting
3 pages
Oracle Database 12c New Features - Part 1
PDF
No ratings yet
Oracle Database 12c New Features - Part 1
17 pages
Install Oracle Developer Suite On Win7
PDF
No ratings yet
Install Oracle Developer Suite On Win7
7 pages
Encrypted RMAN Backup Tips
PDF
No ratings yet
Encrypted RMAN Backup Tips
4 pages
12c Grid Control Installation
PDF
No ratings yet
12c Grid Control Installation
9 pages