PCS Infotech Papers: Sample Questions 17 - 18 of 25

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 17

» Database » MySQL



Is the Following Statement True or False?

A package without body is possible




Advantages of Using packages

Advantages of Using Packages

Advantages of Using packages

  • Package without body declares global cursor and constant that can use by other function, procedures or packages.

  • Procedures in body are private subprograms accessible only by subprograms inside the package not from outside.

  • If public item includes cursors or subprograms, then the package must have a body.

  • The body defines queries for public cursor and code for public subprogram.

Use of Packages:

  • Modularity

  • Easier application design

  • Hidden implementation details

  • Added functionality

  • Better Performance

  • Easier to Grant Roles

Question number: 18

» Database » MySQL



Is the Following Statement True or False?

Subprograms have equal scope as variables




Define what are PL/SQL subprogram

Define What Are PL/SQL Subprogram

Define what are PL/SQL subprogram?

  • Subprogram is a named PL/SQL block that can invoked.

  • Their values can differ for each invocation.

  • Subprogram is either a procedure or a function.

    • Procedure performs an action

    • Functions compute and return a value.

Use of subprogram:

  • Modularity:

    • Manageable, well-define modules.

  • Easier Application design:

    • Details of the subprogram can be written in parallel to main program.

  • Maintainability:

    • Change the implementation details of a subprogram without its invokers.

  • Packageability:

    • Subprograms grouped into package.

  • Reusability:

    • Number of applications in many different environments can use the same package subprogram or stored subprogram.

  • Better Performance:

    • Subprogram is compiled and stored in executable form.

    • Division of work reduces network traffic and improves response times.