Advanced accounting information systems
This presentation is the property of its rightful owner.
Sponsored Links
1 / 23

Advanced Accounting Information Systems PowerPoint PPT Presentation


  • 81 Views
  • Uploaded on
  • Presentation posted in: General

Advanced Accounting Information Systems. Day 11 Understanding the SQL Language September 18, 2009. Announcements. Assignment 2 due Monday Business Week activities continue. Catch up on topics we skipped. Database structures Ways to organize individual records in a database Hierarchical

Download Presentation

Advanced Accounting Information Systems

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Advanced accounting information systems

Advanced Accounting Information Systems

Day 11

Understanding the SQL Language

September 18, 2009


Announcements

Announcements

Assignment 2 due Monday

Business Week activities continue


Catch up on topics we skipped

Catch up on topics we skipped

Database structures

Ways to organize individual records in a database

Hierarchical

Network

Relational


Catch up on topics we skipped1

Catch up on topics we skipped

Data warehouse

Identify similarities between data warehouse and a fine restaurant (p. 158-159)


Objectives chapter 6 understanding the sql language

Objectives – Chapter 6 – Understanding the SQL Language

Basic SQL features and functions

SELECT statement fundamentals

Operators and functions

DDL and DML statements


Questions for today

Questions for today

Five basic features of SELECT


Sql structure

SQL Structure

DDL

DML and DQL


Sql structure1

SQL Structure

SQL

developed in 1980s

incorporates both DDL and DML

standard per ANSI and ISO

Included in many mainstream DBMS

DB2

Oracle

MySQL

Informix

Microsoft SQL Server


Sql structure2

SQL Structure

Basic features

DDL

DML

Command operators

Functions

Transaction control


Sql structure3

SQL Structure

Two basic options for executing SQL commands

Interactive (or dynamic)

Embedded

Query mode


Interactive sql

Interactive SQL

Character based interface (see Figure 6.1)

Menu-driven interface (see Figure 6.2)


Embedded sql

Embedded SQL

Best suited to activities that must be performed periodically

SQL commands are part of an executable program

Can also be used in application programs


Command basics

Command Basics

Command syntax

Command keywords (command clauses)

Command parameters

Results set (relational set)

SELECT

FROM

WHERE


Error messages

Error messages

Command did not complete successfully

Why do errors return give so little information?


Select fundamentals

SELECT fundamentals

DBMS analyzes the declarative SQL SELECT statement and creates an access path – plan for what steps to take to respond to the query

SELECT

FROM

WHERE

;


Using select to evaluate expressions

Using SELECT to evaluate expressions

Select 5 + 7 total_value


Understanding operators and functions

Understanding Operators and Functions

Unary operators

Binary operators

Arithmetic operators

Comparison and logical operators


Advanced accounting information systems

DDL

Create


Advanced accounting information systems

DML

INSERT into TABLENAME

VALUES

Insert into INVOICE (INVNO, INVDATE, AMOUNT) VALUES

(324, 5/25/09, 13.30)


Advanced accounting information systems

DML

UPDATE TABLE SET COLUMN-NAME =

UPDATE INVOICE SET AMOUNT = 13.50 WHERE INVNO = 325;


Advanced accounting information systems

DML

DELETE FROM TABLENAME

WHERE SEARCH-CONDITION

DELETE FROM INVOICE

WHERE INVNO = 800


Advanced accounting information systems

DQL

SELECT LIST ATTRIBUTES FROM TABLE WHERE QUALIFYING CONDITIONS

GROUP BY

ORDER BY

WHAT IS THE OTHER NAME FOR QUALIFYING CONDITIONS?

USE * TO retrieve entire record in one table

Retrieving other values

Expression

Function


Questions for monday

Questions for Monday

What is the difference between comparison and logical operators?

Identify and describe the use of the three basic DML commands


  • Login