Sie sind auf Seite 1von 6

Query Language

Query language includes a set of commands used in retrieving data from (or modifying or
updating) a database. Query languages are used to make queries into databases.

broadly, Query languages can be classified according to whether they are database query
languages or information retrieval query languages.
Structured query Language
SQL is a database sublanguage for querying and modifying relational databases. It was developed by IBM
Research in the mid 70's and standardized by ANSI in 1986.
Major Features:
Queries typed at an SQL prompt.
SQL is a non-procedural language.
SQL specifies WHAT, not HOW.
It is not case sensitive.
Pure SQL is good for.
(i) defining database structure; (h) generating low-volume, ad hoc queries (w) prototyping
Sophisticated applications are often implemented by using SQL in combinations with a programming
language.
Embedded SQL
SQL can be embedded within procedural programming languages,
These languages may include C/C++, Java etc.
Embedded SQL supports:
Highly customised applications.
Background applications running without user intervention.
Combining database took with programming tools.
Databases on the WWW.
1

SQL Statements
There are 3 basic categories of SQL Statements:
SQL-Data Statements - query and modify tables and columns
>SELECT Statement - query tables and views in the database
> INSERT Statement - add rows to tables >UPDATE Statement - modify columns in table rows
>DELETE Statement - remove rows from tables
SQL Statements (contd.)
SQL-Transaction Statements - control transactions
>COMMIT Statement - commit-the current transactions
Roll back Statement - roll back the current transactions
SQL Statements (contd.)
SQL-Schema Statements ~ maintain schema (catalog)
>CREATE TABLE Statement - create tables
>CREATE VIEW Statement - create views
>DROP TABLE Statement - drop tables
>DROP VIEW Statement - drop views
>GRANT Statement - grant privileges on tables and views to other users
> REVOKE Statement - revoke privileges on tables and views from other users
DDLDCL& DML
SQL is divided into three main categories; Data Definition Language (DDL), Data Control Language and
Data Manipulation Language (DML).
Examples of DDL commands
CREATE DATABASE - Creates a new database

ALTER DATABASE - Modifies the database

DROP DATABASE - Drops (deletes) a database

CREATE TABLE ~ Creates a new table


2

ALTER TABLE - Modifies the table

DROP TABLE - Drops (deletes) a table

These are just some of the object classes that can be defined using DDL
Examples of DCL commands

GRANT - Allows users access privileges to database

REVOKE - Withdraws users access privileges given by GRANT statement


Examples of DML commands

DML is a language for accessing and manipulating the data organized by the appropriate data model.

SELECT - Retrieves data from the database

INSERT - Inserts new data into the database

UPDATE - Updates existing data in the database

DELETE - Deletes existing data from the database

What is Data Warehousing?

A data repository which stores integrated information for efficient querying, analysis and
reporting.

Data collected from multiple, disparate sources of an organization.

Heterogeneous data transformed and combined into homogenous data, typically summarized

Used for decision support and data analysis systems (DSS)

Trend Analysis over time

Forecasting

Strategic Planning for Business Analyst


Operational database and Data Warehouse Database

Operational database
it holds read-only data.
Operational databases include

Indexing, hashing for optimized queries.

Concurrency control, logging and recovery.

Data warehouse database

requires special type of data organizations, access and implementation based on


multidimensional views.

Updated periodically

Cleaning, Transformation (Derived data), Loading & Refresh


Distinctive Features

Four Keywords:

Subject-oriented: Organized around major subjects such as customer, supplier, product, sales
etc. vis-a-vis Application oriented for DBMS, to provide concise view around particular subject issue
Static/Non-volatile: Usually read-only, updated or refreshed periodically, separated from operational
db

integrated: data from multiple disparate sources are transformed and combined in a separate
data repository
Time variant: Stores historical data, used to analyze the business or market trends and facilitate
future predictions. Every key structure in data warehouse contains, either explicitly or Implicitly, an
element of time
Data Warehouse

Repository of information

Multiple sources (heterogeneous)

Unified schema (homogeneous)

Usually resides at a single site

Constructed by following processes

Data cleaning

Data Transformation

integration

Data Loading
4

Periodic Refreshing

Provides data analysis capability - OLAP


What Is Data Mining?

Extracting or Mining knowledge from large data set to find patterns that art

valid: hold on new data with some certainty novel: non-obvious to the system

useful: should be possible to act on the item understandable: humans should be able to
interpret the pattern

Also known as Knowledge Discovery in Databases

Example

Which items are purchased together in a retail store?

Fraudulent usage of credit cards - detect purchase of extremely large' amount compared to
regular purchases
Applications

Banking: loan/credit card approval

predict good customers based on old customers Customer relationship management

identify those who are likely to leave for a competitor.

Targeted marketing

identify likely res ponders to promotions

Fraud detection - telecommunications/financial transactions from an on liner stream of event


identify fraudulent event

Manufacturing and production

automatically adjust knobs when process parameter changes

Medicine: disease outcome, effectiveness of treatments

analyze patient disease history: find relationship between diseases

Molecular/Pharmaceutical: identify new drugs

Scientific data analysis: identify new galaxies by searching for sub clusters

Web site/store design and promotion: find affinity of visitor to pages and modify layout
5

Mining on what kind of data?


Large Data Volume

Relational Database

Data Warehouse

Flat files

Web

Transaction Database

Object Oriented or Object Relational Database


Data mining works with warehouse data
Data warehouse provides the enterprise with a memory
Data mining provides enterprise with intelligence

Data Mining Algorithms

Data mining involves different algorithms to accomplish different tasks


All these algorithms attempt to fit a model to the data

The algorithms examine the data and determine a model that is a closest to the characteristics
of the data being examined

Some basic data mining tasks


Predictive: Predict values of data using known result found from different data (historical)

Regression

Classification

Time series analysis

Descriptive: Identifies patterns or relationship data

Clustering / similarity matching

Association rules and variants

Summarization

Sequence Discovery

Das könnte Ihnen auch gefallen