3i Infotech Papers: Sample Questions 738 - 740 of 1245

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

Question number: 738

» Database » MySQL

Essay Question▾

Describe in Detail

Will the outputs of the TRUNCATE TABLE EMP and DELETE FROM EMP two commands differ?

Explanation

  • Both will result in deleting all the rows in the table EMP.

TRUNCATE TABLE EMP:

Define Truncate Command

Define Truncate Command

Define Truncate Command

  • This is faster and uses lesser resources.

  • It does not delete the structure of the table.

Syntax:

TRUNCATE TABLE table_name;

DELETE FROM EMP

Define DELETEcommand

Define DELETEcommand

Define DELETEcommand

  • Delete statement is used to delete rows from a table.

  • To specify rows in the table use the WHERE condition.

Syntax:

DELETE FROM table_name [WHERE condition];

Question number: 739

» Operating System » Unix

Short Answer Question▾

Write in Short

How the kernel handles the fork () system call in traditional Unix and in the system V Unix, while swapping?

Explanation

On Fork:

  • Kernel in traditional unix will make the duplicate copy of the parents address space and attaches it to the child process, while swapping.

  • Kernel in system V Unix, manipulates the region table, page table, and pfdata table entries by incrementing the reference count of the region table of shared regions.

Question number: 740

» Database » MySQL

Essay Question▾

Describe in Detail

What is meant by query optimization?

Explanation

Process of query optimization.

Process of Query Optimization.

Process of query optimization.

  • A query optimizer is a critical database management system (DBMS) component that is analyses Structured Query Language (SQL) queries for efficient execution mechanisms.

  • The query optimizer cannot be accessed directly: queries submitted to database server, and parsed by parser, are passed to the query optimizer.

  • Depending on circumstance, a query optimizer selects different query plans for the same query.

  • For example, when user runs a query that selects half of a table’s data

    • The user runs the query when the server is heavily tasked.

    • The query optimizer may decide to use a query plan, the query plan calls on the created table indexes to satisfy the query- based on limited resources.

  • The same query run at another time with more resources, the query optimizer could determine that resource limitation is not an issue.

    • Table indexes would not be used- with full table loading to server memory.