Role of abstraction in pl/sql, PL-SQL Programming

Role of Abstraction in pl/sql:

The abstraction is a high-level description or model of a real-world entity. The Abstractions keep our daily lives convenient. They help us cause about an object, event, or relationship by suppressing the irrelevant detail. For illustration, to drive a car, you do not require to know how its engine works. The simple interface consisting of a steering wheel, gearshift, accelerator, and brake, lets you use the car efficiently. The details of what happens under the hood are not significant for day-to-day driving.

The Abstractions are central to the discipline of programming. For illustration, you use the procedural abstraction when you suppress the details of a complex algorithm by writing a procedure and passing it parameters. A single procedure call hides the particulars of your implementation. To try a special implementation, you simply replace the procedure with the other having similar name and parameters. Thanks to the abstraction, programs that call the procedure need not be customized.

You use the data abstraction when you state the datatype of the variable. The datatype stipulate a set of values and a set of operations suitable for those values. For illustration, a variable of the type POSITIVE can hold only the positive integers, and can only be added, multiplied, and subtracted, and so on. To use the variable, you do not require knowing how the PL/SQL stores integers or implements arithmetic operations; you basically accept the programming interface.

The Object types are a generalization of the built-in datatypes found in many programming languages. The PL/SQL gives a variety of the built-in scalar and composite datatypes, each of that is associated with the set of predefined operations. The scalar type (like CHAR) has no internal components. The composite type (like the RECORD) has internal components which can be manipulated separately. Similarly the RECORD type, an object type is a composite type. Though, its operations are user-defined, and not predefined.

Presently, you cannot define object types within the PL/SQL. They should be CREATED and stored in an Oracle database, where they can be shared by a lot of programs. A program which uses the object types is known as the client program. It can manipulate and declare an object without knowing how the object type presents data or implements operations. This permits you to write the program and object type individually, and to change the implementation of the object type without affecting the program. And hence, the object types support both the procedural and data abstraction.

Posted Date: 10/6/2012 7:51:15 AM | Location : United States







Related Discussions:- Role of abstraction in pl/sql, Assignment Help, Ask Question on Role of abstraction in pl/sql, Get Answer, Expert's Help, Role of abstraction in pl/sql Discussions

Write discussion on Role of abstraction in pl/sql
Your posts are moderated
Related Questions
Advantages of Invoker Rights The Invoker-rights routines centralize the data retrieval. They are particularly helpful in applications which store data in various schemas. In su

UNION ALL - SQL Further varieties of UNION arise when we replace the key word DISTINCT by ALL in any of the foregoing examples, as in Example. ALL specifies that if row r appe

Set Operators The Set operators combine the results of the two queries into one result. The INTERSECT returns all the distinct rows selected by both queries. The MINUS returns

Using Operator VALUE: As you may expect, the operator VALUE returns the value of an object. The VALUE takes its argument a correlation variable.  For illustration, to return a

Functions The function is a subprogram which can take parameters and be invoked. Normally, you can use a function to calculate a value. The function has 2 sections: the specifi

CLOSE Statement The CLOSE statement allows the resources held by a cursor variable or open cursor to be reused. No more rows can be fetched from the cursor variable or closed

Cursor FOR Loops In most cases that need an explicit cursor, you can simplify the coding by using a cursor FOR loop rather of the OPEN, FETCH, and CLOSE statements. A cursor FO

Running the PL/SQL Wrapper To run the PL/SQL Wrapper, go through the wrap command at your operating system prompt by using the syntax as shown: wrap iname=input_file [oname=

Recursive Subprograms The recursive subprogram is the one that calls itself. Think of a recursive call as a call to a few other subprograms that does the similar task as your

LOOP Statements The LOOP statements execute a series of statements at multiple times. The loops enclose the series of statements that is to be repeated. The PL/SQL provides typ