Introduction to Programming Languages

Programming languages are the foundation of software development. Whether you’re building web apps, mobile apps, or databases, the language you choose determines how you structure your code and interact with the system. Some of the most widely used programming languages today include Java, C++, PL/SQL, and Visual Basic.

Despite their differences, programming languages often fall into specific paradigms—such as procedural and object-oriented—each with its own style of solving problems.

Procedural Programming Languages

Procedural languages focus on a sequence of tasks to be performed. Code is written as a list of instructions that run step-by-step, from top to bottom.

Examples of Procedural Languages:

  • PL/SQL

  • Visual Basic

Key Characteristics:​

  • Code is executed in the order it appears (unless altered by loops/conditions).

  • Emphasis is on procedures and functions.

  • Ideal for beginners due to the straightforward, linear flow.

Example (PL/SQL):

BEGIN
   DBMS_OUTPUT.PUT_LINE('Hello from PL/SQL!');
END;

Hybrid Language: PL/SQL as Both Procedural & Object-Oriented

PL/SQL started as a procedural language, but with the introduction of Oracle 8 and enhancements in Oracle 9i and 10g, it now supports many object-oriented features as well.

Object Features in PL/SQL:

  • User-defined object types

  • Object methods

  • Inheritance (limited support in earlier versions, extended in newer versions)

Example (Object Type in PL/SQL):

CREATE TYPE book_t AS OBJECT (
    title   VARCHAR2(100),
    price   NUMBER,
    MEMBER PROCEDURE display_info
);
/

CREATE TYPE BODY book_t AS
    MEMBER PROCEDURE display_info IS
    BEGIN
        DBMS_OUTPUT.PUT_LINE('Title: ' || title || ', Price: ' || price);
    END;
END;
/

DECLARE
    my_book book_t := book_t('PL/SQL Basics', 299);
BEGIN
    my_book.display_info;
END;
/

This example creates a book_t object type with a procedure to display its data—demonstrating PL/SQL's object-oriented capabilities.

Conclusion

Understanding the difference between procedural and object-oriented languages is critical for choosing the right language for your project. While Java and C++ let you build modular and reusable components, languages like PL/SQL still shine when it comes to structured data processing—especially in Oracle databases.

As programming continues to evolve, hybrid approaches (like object-oriented PL/SQL) allow developers to benefit from both worlds—offering structure and flexibility.

Scroll to Top