Headder AdSence

What is the difference between OLTP and OLAP?

I found this information some where, it's very easy to understand, and am sharing the original link below of this.

OLTP (On-line Transaction Processing) is characterized by a large number of short on-line transactions (INSERT, UPDATE, DELETE). The main emphasis for OLTP systems is put on very fast query processing, maintaining data integrity in multi-access environments and an effectiveness measured by number of transactions per second. In OLTP database there is detailed and current data, and schema used to store transactional databases is the entity model (usually 3NF). 



OLAP (On-line Analytical Processing) is characterized by relatively low volume of transactions. Queries are often very complex and involve aggregations. For OLAP systems a response time is an effectiveness measure. OLAP applications are widely used by Data Mining techniques. In OLAP database there is aggregated, historical data, stored in multi-dimensional schemas (usually star schema). 


The following table summarizes the major differences between OLTP and OLAP system design.

OLTP System - Online Transaction Processing (Operational System)
OLAP System - Online Analytical Processing (Data Warehouse)

Source of data
OLTP: Operational data; OLTPs are the original source of the data.
OLAP: Consolidation data; OLAP data comes from the various OLTP Databases

Purpose of data
OLTP: To control and run fundamental business tasks
OLAP: To help with planning, problem solving, and decision support

What the data
OLTP: Reveals a snapshot of ongoing business processes
OLAP: Multi-dimensional views of various kinds of business activities

Inserts and Updates
OLTP: Short and fast inserts and updates initiated by end users
OLAP: Periodic long-running batch jobs refresh the data

Queries
OLTP: Relatively standardized and simple queries Returning relatively few records
OLAP: Often complex queries involving aggregations

Processing Speed
OLTP: Typically very fast
OLAP: Depends on the amount of data involved; batch data refreshes and complex queries may take many hours; query speed can be improved by creating indexes

Space Requirements
OLTP: Can be relatively small if historical data is archived
OLAP: Larger due to the existence of aggregation structures and history data; requires more indexes than OLTP

DatabaseDesign
OLTP: Highly normalized with many tables
OLAP: Typically de-normalized with fewer tables; use of star and/or snowflake schemas

Backup and Recovery
OLTP: Backup religiously; operational data is critical to run the business, data loss is likely to entail significant monetary loss and legal liability
OLAP: Instead of regular backups, some environments may consider simply reloading the OLTP data as a recovery methodsource: 



Stored Procedures - Auto Executing

You can designate stored procedures to execute every time the SQL Server is started. These types of procedures cannot accept any input parameters and have to be owned by a member of SYSADMIN fixed server role. To designate stored procedures for automatic execution use the sp_procoption system stored procedure.

The only option allowed by this procedure is 'startup'. The procedure to be started automatically MUST reside in the Master database. The following example makes the procedure execute automatically every time the server starts up:
sp_procoption my_procedure, 'startup', 'on'


This option could be useful if you have specific processing requirements or tasks that need to be perform at server startup - for instance you might wish to backup all of your user databases every time SQL Server is started.