Skip to content

PL/SQL for Data Engineers

Metadata

  • Author: The Data Girl
  • Full Title: PL/SQL for Data Engineers
  • Category: #Type/Highlight/Article
  • URL: https://medium.com/p/9a571ae0f75

Highlights

  • SQL(Structured Query Language): It is a programming language that is used to manipulate, define, query data, and perform other operations on data. In short, it is used to communicate with databases.
  • Procedural Programming: It is a programming model that is used to create structured/modular scripts. Each module is written to perform one action/task. It works on the concept of calling a procedure. A procedure is a routine/function/sub-routines that are developed to compute a series of instructions step-by-step.
  • PL/SQL can not only execute SQL queries but also wrap the queries into a block that can be called any number of times to perform operations on different databases.
  • Procedural Language Support: It allows developers to use conditional statements(if,if-else), loops, throw exceptions, build packages that help them in adding more functionality to their application, and even in building routines that can be reusable.
  • Error Checking and Handling: Unlike SQL, PL/SQL offers developers to use exceptions to catch the error and give instructions on how to handle them. PL/SQL provides inbuilt as well as user-defined exceptions.
  • Data Structures: Unlike SQL, PL/SQL offers few data structures like varray, records, collections that can store collections of elements. Programmers can use them to make code more readable and less complex.
  • Dynamic SQL: A programming technique that enables you to build SQL statements dynamically at runtime. This can be used when your query execution depends upon the user’s input. For eg. on basis of the user’s location, you execute different queries. If the user’s location is India then you execute queries that use the India records.
  • Reduce Network Traffic: As PL/SQL statements are encapsulated into a block that is executed all at once in the oracle engine it helps in reducing the network traffic.