Podcast
Questions and Answers
ما هي الوظيفة التي تُستخدم لتغيير حالة الأحرف في V_Lname؟
ما هي الوظيفة التي تُستخدم لتغيير حالة الأحرف في V_Lname؟
- Initcap (correct)
- Upper
- Trim
- Lower
ماذا يعني التعبير 'Like V_Lname' في جملة SQL؟
ماذا يعني التعبير 'Like V_Lname' في جملة SQL؟
- تُستخدم لمطابقة قيمة محددة فقط
- توجد تطابقات جزئية تسمح بإضافة أحرف إضافية (correct)
- توجد تطابقات دقيقة فقط
- توجد مطابقة متقدمة
ما الذي يتم تخزينه في المتغير V_Name بعد تنفيذ الجملة SELECT؟
ما الذي يتم تخزينه في المتغير V_Name بعد تنفيذ الجملة SELECT؟
- أول اسم للموظف الذي يتطابق مع الشروط (correct)
- آخر اسم للموظف
- اسم الموظف بالكامل
- قيمة الراتب للموظف
ما هو الشرط الذي يجب أن يتحقق في جملة SQL لاختيار الموظف؟
ما هو الشرط الذي يجب أن يتحقق في جملة SQL لاختيار الموظف؟
ما هي اللغة المستخدمة في الكود المقدم؟
ما هي اللغة المستخدمة في الكود المقدم؟
ما هو نوع البيانات للمتغير v_job؟
ما هو نوع البيانات للمتغير v_job؟
ما هي القيمة الافتراضية للمتغير v_total_sal؟
ما هي القيمة الافتراضية للمتغير v_total_sal؟
ما هي القيمة الثابتة لـ C-TAX-RATIO؟
ما هي القيمة الثابتة لـ C-TAX-RATIO؟
ماذا يعني V_Flag في تعريف المتغير؟
ماذا يعني V_Flag في تعريف المتغير؟
ماذا يحدث إذا كانت الحالة صحيحة؟
ماذا يحدث إذا كانت الحالة صحيحة؟
ما الذي يتم تنفيذه إذا كانت الحالة غير صحيحة؟
ما الذي يتم تنفيذه إذا كانت الحالة غير صحيحة؟
ما هي القيمة المستخدمة إذا لم تكن هناك حالة محددة؟
ما هي القيمة المستخدمة إذا لم تكن هناك حالة محددة؟
كيف يتم تنظيم الشروط والأفعال في العملية المذكورة؟
كيف يتم تنظيم الشروط والأفعال في العملية المذكورة؟
ما الذي يحدد الإجراء الذي سيتم تنفيذه في حالة معينة؟
ما الذي يحدد الإجراء الذي سيتم تنفيذه في حالة معينة؟
ما هي النتيجة التي ستظهر إذا كانت قيمة V_Myage أقل من 11؟
ما هي النتيجة التي ستظهر إذا كانت قيمة V_Myage أقل من 11؟
ما هي قيمة V_Myage في الشيفرة المقدمة؟
ما هي قيمة V_Myage في الشيفرة المقدمة؟
ما هو الغرض من استخدام جملة IF في الشيفرة؟
ما هو الغرض من استخدام جملة IF في الشيفرة؟
ماذا يحدث في جملة ELSE في الشيفرة؟
ماذا يحدث في جملة ELSE في الشيفرة؟
كيف يتم كتابة جملة IF في PL/SQL؟
كيف يتم كتابة جملة IF في PL/SQL؟
ما هي ميزة الــ Overloading في البرمجة؟
ما هي ميزة الــ Overloading في البرمجة؟
ما الهدف من استخدام Parameters في الحزم؟
ما الهدف من استخدام Parameters في الحزم؟
كيف يمكن تمييز بين نوعية الـ Subprogramme في البرمجة؟
كيف يمكن تمييز بين نوعية الـ Subprogramme في البرمجة؟
ما هو التأثير السلبي عند استخدام Overloading بشكل غير صحيح؟
ما هو التأثير السلبي عند استخدام Overloading بشكل غير صحيح؟
ما هي إحدى الفوائد الأساسية لاستخدام الحزم في PL/SQL؟
ما هي إحدى الفوائد الأساسية لاستخدام الحزم في PL/SQL؟
ما هي الغرض من البرنامج الفرعي المذكور في المحتوى؟
ما هي الغرض من البرنامج الفرعي المذكور في المحتوى؟
أي من الخيارات التالية تعتبر جزءًا من أجزاء البرنامج الفرعي؟
أي من الخيارات التالية تعتبر جزءًا من أجزاء البرنامج الفرعي؟
ما هي العناصر التي يتضمنها تحديد المواصفات حسب المحتوى؟
ما هي العناصر التي يتضمنها تحديد المواصفات حسب المحتوى؟
كيف يمكن تصنيف جسم البرنامج الفرعي المذكور؟
كيف يمكن تصنيف جسم البرنامج الفرعي المذكور؟
ما الذي يميز مواصفة حزمة البرنامج الفرعي؟
ما الذي يميز مواصفة حزمة البرنامج الفرعي؟
Flashcards
v_job varchar2 (15)
v_job varchar2 (15)
هو متغير من نوع نص (varchar2) له طول 15 حرفًا.
v_count binary-integer := 0
v_count binary-integer := 0
هو متغير من نوع عددي ثنائي (binary-integer) تعيين قيمته الأولية صفر.
v_total_sal number (7.2) := 3.17
v_total_sal number (7.2) := 3.17
هو متغير من نوع عددي (number) يحتوي على 7 أرقام قبل الفاصلة العشرية و 2 أرقام بعدها. قيمته الأولية 3.17 .
INITCAP
INITCAP
Signup and view all the flashcards
V_Lname Varchar2(20)
V_Lname Varchar2(20)
Signup and view all the flashcards
V_Lname := Initcap( ' KING' )
V_Lname := Initcap( ' KING' )
Signup and view all the flashcards
V_Name Varchar2(20)
V_Name Varchar2(20)
Signup and view all the flashcards
Select First_Name into V_Name
Select First_Name into V_Name
Signup and view all the flashcards
عبارة IF
عبارة IF
Signup and view all the flashcards
شرط IF
شرط IF
Signup and view all the flashcards
تعليمات IF
تعليمات IF
Signup and view all the flashcards
تعليمات ELSE
تعليمات ELSE
Signup and view all the flashcards
END IF
END IF
Signup and view all the flashcards
IF...THEN
IF...THEN
Signup and view all the flashcards
Condition
Condition
Signup and view all the flashcards
Action
Action
Signup and view all the flashcards
True
True
Signup and view all the flashcards
False
False
Signup and view all the flashcards
Subprogramme
Subprogramme
Signup and view all the flashcards
Package
Package
Signup and view all the flashcards
Overloading
Overloading
Signup and view all the flashcards
Package Variables
Package Variables
Signup and view all the flashcards
Dependency between Packages
Dependency between Packages
Signup and view all the flashcards
Test Package
Test Package
Signup and view all the flashcards
Study Notes
PL/SQL Course
- This course covers PL/SQL, a procedural language extension to SQL
- It includes features of procedural programming to enhance SQL
- SQL statements are embedded within PL/SQL code
- Code is stored in the database and called upon for execution
- Variables and constants, along with conditional statements (IF statements) and loops, are used
- PL/SQL offers modular programming (nested blocks, and libraries for reusability)
- Integration with Oracle products like JDeveloper
- Portability across different operating systems
- Exception handling for error management
Introduction to PL/SQL
- PL/SQL extends SQL with procedural features
- SQL queries can be included within PL/SQL code
- Stored code in databases is directly callable
- PL/SQL enables variable and constant declarations
- Conditional statements (IF-THEN-ELSE) and loops for repetitive tasks
- Code can be written and executed once, then used multiple times
- Modularity, integration, portability and exception handling are features of PL/SQL
- It's implemented within Oracle Database
PL/SQL Block Structure
- Declarative Section: Variable definitions, cursors
- Executable Section: SQL statements, PL/SQL statements
- Exception Section: Error handling
- Each block requires BEGIN and END keywords
- Variables, cursors and constants are optional aspects of declaration
- SQL and PL/SQL statements are located here
- Exception handling can be done here
PL/SQL Block Types
- Anonymous Block: A block without a name, executed where defined
- Subprograms: Blocks that accept parameters, stored in databases (procedures and functions)
Writing Executable Statements
- Single-line comments begin with "--"
- Multi-line comments start with "/" and end with "/"
- Comments improve code readability and maintainability
- PL/SQL supports SQL functions (e.g., decode, group functions) for use within blocks
SQL Functions in PL/SQL
- Integration of SQL functions into PL/SQL code using the syntax:
InitCap(String)
for example - Example calls include
InitCap('king')
Nested Blocks
- Inner blocks can access variables in outer blocks, but outer blocks cannot access variables in inner blocks directly
- Sub-block can have own declaration or values for same variables as outer block.
Operators in PL/SQL
- Similar to SQL, PL/SQL supports logical, arithmetic and concatenation operators
- Parentheses dictate order of operations
Qualifiers
are used to refer to particular variables, so that variables with same names from different blocks are not confused. (outer vs inner blocks)
Interacting with the Oracle Server
- Data manipulation statements (INSERT, UPDATE, DELETE) are supported
- SQL statements are executed through PL/SQL.
SQL Cursors (Implicit and Explicit)
- Implicit cursors: implicitly declared and managed by Oracle for SQL statements
- Explicit cursors: declared and managed by the programmer for greater control and to handle data efficiently
Handling Exceptions
- Predefined exceptions: Oracle-provided error messages
- User-defined exceptions: programmer-defined error messages for better presentation of errors
- PL/SQL code provides an Exception handling section where errors can be managed and handled by programmer
PL/SQL Program Units
- Stored Procedures: Reusable code blocks for executing more complex operations
- Stored Functions: Reusable blocks that return a value
Working with Composite Data Types
- Records: complex data structures with multiple fields
- Collections (Index-By Tables, Nested Tables, and Varrays): organize multiple related values
PL/SQL Collections
- Index-By Tables: collections with named indexes for efficient access to elements
- Nested Tables: collections with similar data types, stored within other data structures
- Varrays: collections with fixed size and better performance for homogeneous data types
Using PL/SQL Collections with Index-By Tables and other Types
- Using PL/SQL collections, such as Index-by Tables and other type, within the code
Creating Packages
- Packages: Bundles of procedures, functions, and variables for enhanced code organization and reuse
Viewing PL/SQL Objects in Data Dictionary
- Tools for viewing and examining PL/SQL objects (procedures, functions, and packages) saved in the database
More Package Concepts and Overloading
- Package overloading: allows using the same name for multiple subprograms (procedures or functions) within a package, differentiating them through parameter counts or parameter types
PL/SQL Procedures and Functions with Parameters
- Procedures and Functions: reusable blocks of PL/SQL code that can accept parameters
- Parameters can be passed as IN, OUT, or IN OUT, defining how they are used in procedures
Pass by Value, Pass by Reference; IN, OUT, IN OUT parameters
- IN, OUT, IN OUT are used to define how parameters are used in procedures
- Using Positional notation, Named notation, or Combination notation for passing parameters
Forward Declarations
- Necessary if procedures or functions are used before they are defined in the code
Contact Information
- Contact information for the course instructor is included
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.