Thursday

OLTP Online transaction processing

OLTP stands for Online transaction processing Online transaction processing, or OLTP, refers to a class of systems that facilitate and manage transaction-oriented applications, typically for data entry and retrieval transaction processing. The term is somewhat ambiguous; some understand a "transaction" in the context of computer or database transactions, while others (such as the Transaction Processing Performance Council) define it in terms of business or commercial transactions.OLTP has also been used to refer to processing in which the system responds immediately to user requests. An automatic teller machine (ATM) for a bank is an example of a commercial transaction processing application.
The technology is used in a number of industries, including banking, airlines, mailorder, supermarkets, and manufacturing. Applications include electronic banking, order processing, employee time clock systems, e-commerce, and eTrading. The most widely used OLTP system is probably IBM's CICS.

Requirements: Online transaction processing increasingly requires support for transactions that span a network and may include more than one company. For this reason, new OLTP software uses client/server processing and brokering software that allows transactions to run on different computer platforms in a network.
In large applications, efficient OLTP may depend on sophisticated transaction management software (such as CICS) and/or database optimization tactics to facilitate the processing of large numbers of concurrent updates to an OLTP-oriented database.
For even more demanding decentralized database systems, OLTP brokering programs can distribute transaction processing among multiple computers on a network. OLTP is often integrated into SOA service-oriented architecture and Web services.

Advantages: Online Transaction Processing has two key benefits: simplicity and efficiency.
Reduced paper trails and the faster, more accurate forecasts for revenues and expenses are both examples of how OLTP makes things simpler for businesses. It also provides a concrete foundation for a stable organization because of the timely updating. Another simplicity factor is that of allowing consumers the choice of how they want to pay, making it that much more enticing to make transactions.
OLTP is proven efficient because it vastly broadens the consumer base for an organization, the individual processes are faster, and it’s available 24/7.
Disadvantages:
It is a great tool for any organization, but in using OLTP, there are a few things to be wary of: the security issues and economic costs.
One of the benefits of OLTP is also an attribute to a potential problem. The worldwide availability that this system provides to companies makes their databases that much more susceptible to intruders and hackers.
For B2B transactions, businesses must go offline to complete certain steps of an individual process, causing buyers and suppliers to miss out on some of the efficiency benefits that the system provides. As simple as OLTP is, the simplest disruption in the system has the potential to cause a great deal of problems, causing a waste of both time and money. Another economic cost is the potential for server failures. This can cause delays or even wipe out an immeasurable amount of data.

Tuesday

OLAP On Line Analytical Processing,MOLAP,ROLAP,HOLAP

OLAP is an acronym for On Line Analytical Processing. OLAP performs multidimensional analysis of business data and provides the capability for complex calculations, trend analysis, and sophisticated data modeling. It is quickly becoming the fundamental foundation for Intelligent Solutions including Business Performance Management, Planning, Budgeting, Forecasting, Financial Reporting, Analysis, Simulation Models, Knowledge Discovery, and Data Warehouse Reporting. OLAP enables end-users to perform ad hoc analysis of data in multiple dimensions, thereby providing the insight and understanding they need for better decision making. Databases configured for OLAP employ a multidimensional data model, allowing for complex analytical and ad-hoc queries with a rapid execution time. They borrow aspects of navigational databases and hierarchical databases that are speedier. Nigel Pendse has suggested that an alternative and perhaps more descriptive term to describe the concept of OLAP is Fast Analysis of Shared Multidimensional Information (FASMI). The output of an OLAP query is typically displayed in a matrix (or pivot) format. The dimensions form the row and column of the matrix; the measures, the values. Functionality: In the core of any OLAP system is a concept of an OLAP cube (also called a multidimensional cube or a hypercube). It consists of numeric facts called measures which are categorized by dimensions. The cube metadata is typically created from a star schema or snowflake schema of tables in a relational database. Measures are derived from the records in the fact table and dimensions are derived from the dimension tables.

Aggregations: It has been claimed that for complex queries OLAP cubes can produce an answer in around 0.1% of the time for the same query on OLTP relational data. The single most important mechanism in OLAP which allows it to achieve such performance is the use of aggregations. Aggregations are built from the fact table by changing the granularity on specific dimensions and aggregating up data along these dimensions. The number of possible aggregations is determined by every possible combination of dimension granularities.
The combination of all possible aggregations and the base data contains the answers to every query which can be answered from the data [8]. Due to the potentially large number of aggregations to be calculated, often only a predetermined number are fully calculated while the remainder are solved on demand. The problem of deciding which aggregations (a.k.a. views) to calculate is known as the view selection problem. View selection can be constrained by the total size of the selected set of aggregations, the time to update them from changes in the base data, or both. The objective of view selection is typically to minimize the average time to answer OLAP queries, although some studies also minimize the update time as well. Many different approaches have been taken to view selection (which is NP-Complete), including greedy algorithms, randomized search, genetic algorithms and A* search algorithm
A very effective way to support aggregation and other common OLAP operations is the use of bitmap indexes.

Types: OLAP systems have been traditionally categorized using the following taxonomy.[9] Multidimensional
MOLAP:
MOLAP is the 'classic' form of OLAP and is sometimes referred to as just OLAP. MOLAP uses database structures that are generally optimal for attributes such as time period, location, product or account code. The way that each dimension will be aggregated is defined in advance by one or more hierarchies.
Relational:
ROLAP: ROLAP works directly with relational databases. The base data and the dimension tables are stored as relational tables and new tables are created to hold the aggregated information. Depends on a specialized schema design.

Hybrid: HOLAP
There is no clear agreement across the industry as to what constitutes "Hybrid OLAP", except that a database will divide data between relational and specialized storage. For example, for some vendors, a HOLAP database will use relational tables to hold the larger quantities of detailed data, and use specialized storage for at least some aspects of the smaller quantities of more-aggregate or less-detailed data. Comparison among these three OLAP's:
Each type has certain benefits, although there is disagreement about the specifics of the benefits between providers.
Some MOLAP implementations are prone to database explosion. Database explosion is a phenomenon causing vast amounts of storage space to be used by MOLAP databases when certain common conditions are met: high number of dimensions, pre-calculated results and sparse multidimensional data. The typical mitigation technique for database explosion is not to materialize all the possible aggregation, but only the optimal subset of aggregations based on the desired performance vs. storage trade off.
MOLAP generally delivers better performance due to specialized indexing and storage optimizations. MOLAP also needs less storage space compared to ROLAP because the specialized storage typically includes compression techniques.
ROLAP is generally more scalable. However, large volume pre-processing is difficult to implement efficiently so it is frequently skipped. ROLAP query performance can therefore suffer.
Since ROLAP relies more on the database to perform calculations, it has more limitations in the specialized functions it can use.
HOLAP encompasses a range of solutions that attempt to mix the best of ROLAP and MOLAP. It can generally pre-process quickly, scale well, and offer good function support.
Courtesy:Wikipedia

Saturday

Unix Commands Quick Reference

  • cat filename1 > filename2 :
    This overwrite contents of filename2 with filename1
  • cat filename1 » filename2 :
    This appends contents of filename1 to filename2.
  • cd /usr:
    Changes current directory to /usr directory
  • cd .. :
    Change current directory to previous higher directory.
  • cd :
    Change to home of current userid.
  • chgrp group1 filename1 :
    Change group id to group 1 for filename1.
  • chgrp -R group1 * :
    Changes group id of all files in current and subdirectories to group 1.
  • chmod ugo+rwx filename1:
    Add read/write/execute permission to filename1 for user/owner, group and others (world).
  • chmod o x filename1 :
    Remove execute from others (world)
  • chmod 751 filename1 :
    Set rwx for user/owner, group and others; r=4, w=2, x=1, rwx=7 rx=5, rw=6, wx=3, none=0.
  • chown sam filename1 :
    Change owner of file filename1 to sam.
  • chown -R sam * :
    Change owner to sam for all files in current and subdirectories.
  • clear :
    Clear the terminal screen.
  • compress filename1 :
    Compress file filename1 and replace it with filename1.Z
  • cp filename1 filename2 :
    Copy file filename1 to filename2 destroying the contents of filename2.
  • cp -i * /usr/local/bin :
    Copy all files in current directory to /usr/local/bin directory; Prompt before overwriting files (i)
  • cpio :
    Copy file archives to disk/tape
  • crontab -e :
    Edit crontab file for current user
  • crontab -e bill :
    Edit crontab file for user bill
  • crontab -l :
    List crontab entries for current userid
  • csh :
    Start the c shell process
  • cut -d:
    -f1,5 /etc/passwd
    :
    Extract the 1st and 5th fields (username & real name) from file /etc/passwd where delimiter is colon
  • who | cut -d" " -f1:
    List login names from who command
  • date :
    Display current date string
  • date +%D :
    Display current date, MM/DD/YY format
  • dd :
    Copy file(s) to/from raw devices
  • df :
    Displays free disk blocks and modes on file systems.
  • df -k :
    Displays free space in kilobytes for mounted file systems
  • echo name :
    Displays literal "name" on screen
  • echo $PATH :
    Displays PATH environment variable
  • ed/edit/ex :
    Alternative line editors, see vi
  • env Displays current environment variables or allows setting
  • file filename1 :
    Determines and displays type of file for filename1 (text, data, executable, directory, symbolic link...etc...)
  • find /usr/opt/bin -name "filename1*" -print :
    Starts searching in /usr/opt/bin for files starting with
  • filename1, If found prints the full file names and continues searching subdirectories
  • find . -type f -print | xargs grep -i [PATTERN] :
    Recursive grep for a pattern in a file (searches through files in subdirectories)
  • find . ! -mtime - | /usr/bin/xargs rm -rf :
    Finds and removes files older than specified
  • finger sam :
    Displays data about user session for sam
  • ftp solar :
    Establishes a File Transfer Protocol session over the network between current host and a host named solar; See man pages for additional ftp commands
  • grep jdoe /etc/passwd :
    Searches the file /etc/passwd searching for string "jdoe"; If found, displays
  • grep -i Sam filename1:
    Search filename1 for upper or lower case string of Sam and display lines found
  • groups sam :
    List groups that sam is a member of
  • head filename1 :
    Display first few lines of filename1
  • head -50 filename1:
    Display first fifty lines of filename1
  • id :
    List current user id and any group ids
  • kill -9 1351 :
    Terminate process number 1351
  • ksh:
    Start Korn Shell command interpreter; See man pages; Preferred shell for most users
  • ln -s filename1 /usr/opt/filename2 :
    Create a symbolic link named /usr/opt/filename2 that points to filename1; See man pages
  • lp -d lp1 filename1 :
    Print filename1 on destination printer lp1
  • lpstat -d :
    Displays name of default printer, if any
  • lpstat -a :
    Lists printers accepting print requests
  • lpstat -s :
    Displays most everything regarding printing
  • lpstat -u sam :
    Displays status of sam's print jobs
  • ls -al :
    Displays all files in wide listing
  • ls -al *.doc :
    Displays files ending with .doc
  • ls -al /bin/k*:
    Displays files starting with k in /bin directory
  • man --is Online UNIX manual:
  • man-pages:
    It gives detailed instructions on all of the commands listed here and a lot more.See man man for more...
  • mail sam :
    Starts mail message to sam
  • mailx sam :
    Nicer looking mail utility
  • mkdir -p /usr/opt/dirx:
    Creates dirx below /usr/opt
  • make:
    Code compilation utility
  • mkdir dirx:
    Creates directory dirx
  • more filename1 :
    Displays single pages from filename1 pausing after each page.for many options see man pages
  • mv filename1 /usr/opt/ :
    Moves filename1 to directory /usr/opt; Unlike the cp (copy) command, mv removes file from origin
  • netstat -i:
    Show the TCP/IP network interfaces
  • netstat -r:
    Show network route table
  • netstat -rn:
    Displays routing information but bypasses hostname lookup
  • netstat -a | more :
    Show the state of all sockets
  • newgrp group1 :
    Changes current group to group 1
  • news :
    Displays unread files from /usr/news or /var/news
  • nice/renice :
    Adjusts process’ execution priority
  • Unix Commands from p to z:
  • passwd:
    Allows changing your login password
  • ps :
    Lists all of current user's live processes
  • ps -ef :
    List all users processes that are executing
  • pwd:
    Displays current working directory you are in
  • rcp filename1 hostb:
    /usr/local/bin
    :
    Copies filename1 from current host system to hostb, and places it in the /usr/local/bin directory; The .rhosts or hosts.equiv files must be setup to allow action
  • rksh:
    Starts restricted Korn Shell session
  • rlogin hostb :
    Logs into remote host name hostb
  • rm filename1 :
    Deletes filename1 from the disk without recourse
  • rm -i filename1 :
    Deletes filename1 after prompting for verification
  • rmdir dirx :
    Deletes directory dirx
  • rmdir -r dirx:
    Deletes directory and all contents
  • rsh:
    Restricted version of Bourne Shell for security
  • sar :
    System Activity Reporter
  • sh :
    Bourne Shell command interpreter; Alternative to Korn Shell and C shell but is the default on most systems; Older version that is losing popularity
  • sleep 3 :
    Pauses for 3 seconds and continues
  • stty sane:
    Attempts to restore terminal settings after they are hosed; Use CTRL-J with this command
  • stty erase ^H :
    Use to reset backspace/delete; ^H is the key you may want to use for backspace/delete;
  • su sam:
    Log on as user sam
  • su - sam:
    Log on as sam, and execute his profile too
  • tail filename1 :
    Display last few lines of filename1
  • tail -50 filename1 :
    Display last fifty lines of filename1
  • tail -f :
    Continually reads updating file; Great for monitoring a log file while being written
  • tar -cvf /dev/rmt/0c /usr/bin/* :
    Tape archive utility; Copies all files in /usr/bin directory to tape device /dev/rmt/
  • tar -xvf /dev/rmt/0 /usr/bin/ :
    Extracts all files from tape device /dev/rmt/0 and writes them to /usr/bin/
  • tar -tvf /dev/rmt/0c :
    Read tape on device /dev/rmt/0c and lists contents in verbose mode
  • tee:
    Used in scripts to split output to two outputs. Usually used with a pipe command (|)
  • tee -a /tmp/filename1:
    Append the output to filename1 without overwriting its original content
  • telnet hostb:
    Create a remote terminal on hostb
  • touch filename1 :
    Creates an empty file named filename1; Changes modification time to current time if the file already exists
  • uname -a:
    Lists 0/S revision, host name, hardware
  • uncompress filename1 :
    Uncompresses file with .Zsuffix, created by compress command previously
  • uptime :
    Displays current time, time logged-in,number of users etc
  • users:
    Displays current logged-in users in a listing
  • uucp :
    UNIX-to-UNIX copy utility; See man pages
  • view filename1:
    A read only version of vi editor
  • w :
    Combination of uptime, who and ps -a commands
  • wall :
    Write to all; Allows entry of message to be sent to line 25 of all terminals; End message with a CTRLD command
  • wc -l filename1:
    Utility that counts the number of lines in filename1
  • wc -c filename1 :
    Utility that counts the number of bytes in filename1; -m provides number of characters
  • wc -w filename1 :
    Utility that counts the number of the words in filename1
  • whence filename2:
    Prints path name location of executable filename2
  • which filename2 :
    Similar to whence command
  • who Displays login name, terminal name, date, and time of login, of users currently logged in
  • who am i :
    Displays effective user id of user
  • who -b :
    Displays date/time of last reboot
  • who -r :
    Displays current system run level