Difference between SQL and PL/SQL

Hello

Wrong if I say:
SQL only access the database (under the hood)
PL/SQL is a layer on top of SQL.

Correct me if I'm wrong

Thank you

user12045475 wrote:

Try to understand, it is true what I write below?

What exactly is BC ? Cache buffers?

SQL:
Select *...
data-online BC-online client memory file

All SQL are analyzed as a SQL cursors. A handful of customer for this SQL cursor is returned to the caller. In the APIs such as ODBC, it is a statement handle. In PL/SQL, this is called a variable from PL/SQL cursor for example.

The client now called the interface extraction (using this handle) for this SQL cursor. The data moves from the (buffer cache/LMS) database to the client variables that will receive this output cursor.

If the client is remote, the data moves over TCP. If the client is local, that data travels via IPC (since the process of the Oracle server to the client process).

If this customer is the PL/SQL, the data moves from area (SGA) memory to another (PGA) within the same server process. This is the fundamental reason why PL/SQL will always be better than other clients as the travel itinerary data from the SQL cursor for the client variables/extraction buffer is very short.

Insert * select
data-online BC-online data file file

Same process as above. Only, the customer data from the database. It retrieves data from a table and inserts the data into another table - in the same cursor. The SELECTION of this slider component sends not all selected customer lines.

This highlights a fundamental approach to Oracle called SQL maximize and minimize the PL/SQLdevelopment.

The SELECT could be done via a dedicated slider. With the client by pulling all lines so that the database in the memory of the client. So, the INSERT could be done (also a dedicated slider) and the same data that is pushed back to the database.

So for this approach, data will be make to the customer, then from the client to the database database. It's quite a detour for travel. The same same thing could be done using a simple SQL cursor (as opposed to two dedicated sliders). And this slider could make reading and writing lines, without sending the data via a detour through the memory of the client.

The underlying concept is to optimize the use of SQL - solve both the problem of data processing in SQL itself. And if it is not really feasible using only SQL, then consider using the PL/SQL.

PL/SQL:
Select * in...
data file => BC-online PGA? -online client memory

See the answer in the upper part of the 1st sample you posted. This is no different. A SQL cursor is created (called a PL/SQL implicit cursor). The output of this slider is extracted and stored in local client variables (which reside in the PGA for PL/SQL code).

Tags: Database

Similar Questions

  • difference between SQL-2003-2008-SQL and SQL: 1999 on 9i

    What are the differences between SQL-2003 and SQL 9i or 10g?

    If I'm not mistaken:
    [http://iablog.sybase.com/paulley/2008/07/sql2008-now-an-approved-iso-international-standard/] this watch article which presents the version of sql is sql - 2008.is, he followed in GR 11, 2?

    Edited by: mango_boy Oct 6, 2009 14:21

    The reference manual of Oracle SQL language for each version of the database (which dates back at least to Oracle 7.0) has an appendix that deals with compliance with various standards.

    The SQL for GR 11, 2 language manual deals with respect to SQL 2008 in the said Appendix.

    Not surprisingly, Oracle9i was released before SQL-2008 and (as expected), there is no discussion of compliance.

    As usual, your questions can be answered by getting knowing and diving in the docs. Because it's not easy, I refer to the http://download.oracle.com/docs/cd/E11882_01/server.112/e10713/intro.htm#i68236 documentation roadmap

    Published by: Hans Forbrich on September 6, 2009 15:38

  • Difference between Gemfire and SQLFire

    Anyone can list the differences between Gemfire and SQLFire.

    Since both are targeted and databases as an object model and another model more than SQL. Apart from this basic difference if I can get some differences and the reason behind the two products, which would be much appreciated.

    Hello
    GemFire has a slightly different set of objectives: it is designed to be much more flexible (buttons plus) designed to achieve possibly higher performance in some scenarios. For example, you can do a caching prioritized with GemFire (client applications can incorporate a local cache) and it is rich in favour of publication / subscription semantics. Thus, it is possible to realize the event in real time, more scalabe engine architecturees with GemFire more than it is with SQLFire.
      
    On the other hand, SQLFire with relational semantics is easier to understand with a query more powerful engine and support for referential integrity provided out of the box.
      
    Level positioning, GemFire could be better adapted to the 'green field' applications that lend themselves to a design of K - V and SQLFire is best suited for applications where the data model (and so mark requirements) are more complex.
  • What is the difference between varchar and varchar2

    Hello

    can someone tell me difference between varchar and varchar2

    Thank you
    Chantal

    >
    can someone tell me difference between varchar and varchar2
    >

    See VARCHAR2 and VARCHAR in the section of the doc of the SQL language data types
    >
    The VARCHAR2 data type
    The VARCHAR2 data type specifies a variable-length character string. When you create a VARCHAR2 column, you specify the maximum number of bytes or characters of data it can hold. Oracle then stores each value in the column exactly as you specify, provided that the value does not exceed the maximum length of the column. If you try to insert a value that is greater than the specified length, then Oracle returns an error.

    The VARCHAR data type
    Do not use the VARCHAR data type. Use the VARCHAR2 data type. Although the VARCHAR data type is currently synonymous with the VARCHAR2, VARCHAR data type is programmed to be redefined as a separate datatype used for character strings of variable length compared to different comparison semantics.

  • What is the difference between LEAD and LAG?

    Hi all
    Please let me know the difference between LEAD and LAG even if both are functions. Analytics, where we can use specific to improve performance.

    Thanks in advance.

    concerning
    PRAMOD

    Pramod salvation,

    pramod62917 wrote:
    Please let me know the difference between LEAD and LAG

    The main difference is in which way is 'research ':
    -Lead will "transfer" in respect of the order by clause
    -Lag goes "back" with regard to the order by clause

    See this example (Basic):

    Scott@my11g SQL>ed
    Wrote file afiedt.buf
    
      1  with t as (
      2  select 'TeamX' team, 1 player_id, 'PlayerA' name from dual
      3  union all select 'TeamX' team, 2 player_id, 'PlayerB' name from dual
      4  union all select 'TeamX' team, 3 player_id, 'PlayerC' name from dual
      5  union all select 'TeamX' team, 4 player_id, 'PlayerD' name from dual
      6  union all select 'TeamZ' team, 1 player_id, 'PlayerJ' name from dual
      7  union all select 'TeamZ' team, 2 player_id, 'PlayerK' name from dual
      8  union all select 'TeamZ' team, 3 player_id, 'PlayerL' name from dual
      9  -- end of sample data --
     10  )
     11  select
     12  team
     13  ,player_id current_play_id
     14  ,name current_name
     15  ,lead(name) over (partition by team order by player_id) next_name
     16  ,lag(name) over (partition by team order by player_id) prev_name
     17* from t
    Scott@my11g SQL>/
    
    TEAM  CURRENT_PLAY_ID CURRENT NEXT_NA PREV_NA
    ----- --------------- ------- ------- -------
    TeamX               1 PlayerA PlayerB
    TeamX               2 PlayerB PlayerC PlayerA
    TeamX               3 PlayerC PlayerD PlayerB
    TeamX               4 PlayerD         PlayerC
    TeamZ               1 PlayerJ PlayerK
    TeamZ               2 PlayerK PlayerL PlayerJ
    TeamZ               3 PlayerL         PlayerK
    
    7 rows selected.
    

    On the first line + (team = TeamX, current_play_id = 1) +, the next_name once PlayerA regarding the order given by +(order by player_id) + team +(partition by team) + playerB. For this line it is not prev_name like no player as an inferior player_id wihtin this team.
    On the 3rd line +(team=TeamX, current_play=3) +, the once next_name PlayerC in regards to the order given by the team PlayerD, the previous is PlayerB.

  • What is the difference between EPMA and Essbase Studio

    If the two are not used to design applications?

    And a really need Essbase Studio?
    What is the difference between EPMA and Essbase Studio

    ^ ^ ^ It's a little confusing, isn't? As far as I understand the role of EPMA, it is a way to share dimensions and common data between several products Oracle EMP including Planning, Essbase and HFM. In fact, I don't know if other products live in EPMA. What is EPMA not have is a great way to supply or manipulate the dimension and fact tables (or files). Oh, there are tables of the interface, but you will write the code/use the utility of dimension EPMA to load dimensions. I must say that I never tried to load through EPMA data so that someone else will have to pronounce on it. Once the dimensions are built, you can deploy Essbase (and other products) of common and specific to the database dimensions.

    Studio is the tool you will use to go against a data warehouse, or something terribly close a data warehouse to build Essbase databases. Just for Essbase - HFM, planning, etc. are not the targets of the Studio release.

    What gets confusion / intriguing, is that when EPMA deploy Essbase apps, it uses Studio under the covers to do. So the interesting implementations where people use Studio (which is much more flexible than EPMA because it is a development tool as opposed to a dimension/data management application) to read the tables, EPMA interface (and as far as I know, the EPMA base tables) and create Essbase applications like that.

    If you think that there is overlap, I agree with you, but you can see that they are not the same.

    And a really need Essbase Studio?

    ^ ^ ^ Do not use Studio to build Essbase databases. You can go hog wild in EAS with loading SQL rules if you want, even if at some point it will be probably easier and simpler to build in the Studio. Although the Studio has been mentioned as the replacement of EAS for awhile, I suspect the effort required to build a database in Studio will keep around for quite a while EAS or Studio Lite will be out. There is a lot to say (sometimes) for the incredible flexibility EAS/Essbase-Studio requires a more methodical approach and EPMA has a very formal set of standards and methods.

    Phew, I'm sorry, I wrote a book on this subject and I bet you get a lot of differences of opinion on that.

    If you are interested in the Studio, you could do well to take a copy of 'Look smarter than you are with Oracle Essbase Studio 11' of Glenn Schwartzberg. I don't get a penny from the sale while I was among the writers of copy (Hey, I got a mention in the acknowledgements). It's a good book and an excellent introduction to the tool.

    Kind regards

    Cameron Lackpour

  • Difference between DBMS_XMLGEN and DBMS_XMLSQUERY

    Hello

    Can someone let me know the fundamental difference between DBMS_XMLGEN and DBMS_XMLQUERY?



    Thanx

    Published by: Apache on October 13, 2008 23:56

    Directly from the documentation:

    H2. DBMS_XMLGEN 125
    DBMS_XMLGEN package converts the results of a SQL query to the canonical XML format. All takes an arbitrary SQL query as input, converts it to XML format, and returns the result as a CLOB. This package is similar to the DBMS_XMLQUERY package, except that it is written in C and compiled in the kernel. This package can be run only on the database.

    H2. DBMS_XMLQUERY 127
    DBMS_XMLQUERY provides database XMLType functionality. If possible, use DBMS_XMLGEN package integrated into the C instead of DBMS_XMLQUERY.

  • Difference between 'Reload' and "Reload (Override Cache)"?

    Https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly#w_navigation, what is the difference between 'Reload' and "Reload (Override Cache)"? What makes "ignore cache"?

    Reloading Web pages and cache bypass aims to obtain a new copy of perhaps obsolete or damaged files currently stored in the disk cache.
    You can do it like the first attempt if a normal charging does not seem to provide a version of a Web site or if you are having problems with a Web site otherwise.

    We usually have advice that if you have questions:

    Reload Web pages and ignore the cache to refresh potentially stale or corrupt.

    • Hold down the SHIFT key and click the Reload button
    • Press 'Ctrl + F5' or 'Ctrl + Shift + R' (Windows, Linux)
    • Press 'Command + shift + R' (Mac)

    Clear the cache and delete cookies only from Web sites that cause problems.
    "Clear the Cache":

    • Firefox/tools > Options > advanced > network > content caching Web: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Firefox/tools > Options > privacy > "Use the custom settings for history" > Cookies: "show the Cookies".

    Start Firefox in Safe Mode to check if an extension or theme (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problems.

  • is there a difference between 38 and 42mm with their pixel density?

    is there a difference between 38 and 42mm with their pixel density? the 38mm and 42mm watches have same interns?

    You can see the technical details of the Apple Watch here. Apple - Support - technical specifications

  • What is the difference between extensions and Plugins and Add-ons?

    I'm sorry if here is not the right place for this post.

    What is the difference between extensions and Plugins and Add-ons? Apparantely, they differ in some sense or aspect, but I do not know how. Please, if it is not too complicated, explain in detail and simple language. Thanks in advance to 1 million.

    Kind regards
    Danesh

    Hi Danesh,

    You should take a look at this article for an explanation. Plugins and extensions are essentially types of Add-ons as well as of the characters and themes.

    Hope this helps!

  • What is the difference between Firefox and Namoroka 64-bit? I have a 64-bit computer. Which should I use?

    What is the difference between Firefox and Namoroka 64-bit?
    I have a 64-bit computer. Which should I use?

    The officially supported only is Firefox - which is your best choice, unless you want to test the new features...

    http://www.Mozilla.org/en-us/Firefox/new/

  • What is the difference between dawn and the beta?

    What is the difference between dawn and the beta?

    Beta is the next version of Firefox that is due to be released in 5 weeks, and Aurora is the one after that--like an Alpha version of development.

  • Difference between valuation and putting in good shape?

    What is the difference between recovery and formatting?

    I need to download tools and utilities to perform the recovery?

    Recovery recovery image installation.
    Formatting of removal of content from disk HARD integer.

    No, you don't need any download. All you need is CD/DVD recovery for your laptop model.

    To be honest, your questions are a bit funny. If you want to have accurate on such things information please publish your laptop model and it will be much easier to give you exact explanation and instructions how to use recovery CD/DVDs.

  • Qosmio X - 70A - difference between nVidia and driver Toshiba GPU

    Is there a difference between nvidia and one packed by toshiba display driver?
    I'm using the Toshiba but Geforce experience gives me a headache with warnings about a newer driver and toshiba does not appear to provide a.

    Of course there is a difference between the GPU nVidia drivers (or drivers provided by manufacturers of graphics cards) and the drivers provided by Toshiba.

    The Toshiba driver page GPU drivers are changed and made for the mobile use.
    Each laptop model supports various components (CPU, cooling, modules, etc.) and different design. That is why the heat dissipation is always different.

    The GPU driver provided by Toshiba supports a kind of GPU overheating protection and protects the graphics chip of the damage. This means that the GPU performance are controlled by the driver and in case the internal temperature would rise to critical level, it would decrease the performance of the GPU. Also the laptop stops automatically if the temperature is too high.

  • Difference between Satellite and Satellite Pro L100

    What is the difference between satellite and satellite pro? for example - satellite L100 175 and satellite pro L100 176?

    Hello

    the difference between Satellite and Satellite Pro is the operating system:
    Windows XP Home Edition for Satellite
    Windows XP Professional for Satellite Pro

    The difference between the models L100-xxx is just the equipment.
    For example the CPU:
    Sam L100-175: Core Duo T2500; 2.0 GHz
    Satellite Pro L100 176: Core Duo T2400. 1.83 GHz
    For more details look into the specifications of the models.

    Good bye

  • Is the difference between TSMC and Samsung Chip in the real Iphone 6 s? If this is the case, how can I found it before buying a new? How can I

    Is the difference between TSMC and samsung chip processors in the real Iphone 6 s? If this is the case, how can I found it before buying a new one?

    No, it isn't.

Maybe you are looking for

  • Move groups of tabs after organized

    I have about 4 groups of tabs open. I organize them by resizing and moving them around the screen. Then I clicked on a tab and start browsing. When I go back to look at my tab groups (whether by clicking the button or by using "Ctrl + Shift + e"), th

  • rather than open to my home page, Firefox opens according to the page it was when I closed the application

    Until yesterday, whenever I started Firefox, opened it to the home page I selected. During the day yesterday, has changed: now, when I open Firefox, it loads everything that was the last page, it was during the previous session. I checked the setting

  • Cannot restore iPod 1st generation ispw file

    Hello I am on windows 10 and could not restore iPod touch 1st generation no matter what ispw file. I received the error 1600 and error 20. I tried to restore in DFU mode and recovery. Is the files I've tried damaged in any way, my iPod or iTunes? I t

  • How to connect my Satellite A300-1J1 to HD TV

    Hello I have a laptop model Toshiba Satellite A300-1J1 (who doesn't have a HDMI) & just Toshiba XV551D 40 '' HD tv. You want to be able to connect the laptop to the tv with the best possible picture quality, a DVI to HDMI cable would be better than t

  • How can I support a ban on false communication

    I was banned for a month of communication, even if I did nothing wrong. How can I argue my case and reverse the trend. * The position proposed by the facilitator at the appropriate forum category (of Outlook.com |) E-mail | Electronic component for W