3i Infotech Placement: Sample Questions 977 - 978 of 1245

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 977

Statement True-False▾

A database trigger does not apply to data loaded before the definition of the trigger

Choices

Choice (4)

a.

True

b.

False

c.

Question does not provide sufficient data or is vague

d.

All of the above

Edit

Answer

b.

Explanation

Define Types of Triggers
  • Database triggers are executed in response to events that occur in the database.
  • Like a stored procedure it is predefined before event occurs.
  • Enable database administrators to create additional relationships between separate databases.
  • It can execute before or after an INSERT, UPDATE, or DELETE operation.
  • If a trigger event occurs, the trigger՚s function is called at the appropriate time to handle the event.
  • Stored code executed immediately after a predefined event.
  • A database trigger does apply to data loaded before the definition of the trigger.
  • Mostly used for maintaining the integrity of the information on the database.

Question 978

Describe in Detail Essay▾

What are the traverses in binary tree?

Edit

Explanation

In-Order Traversal:

  • The left subtree is visited first, then the root and later the right sub-tree.
  • Outputs sorted key values in ascending order.

Algorithm

  • Recursively traverses left subtree.
  • Visit root node.
  • Recursively traverse right subtree.
Dfine In-Order Algorithm

Pre-order Traversal:

  • Root node is visited first, then the left subtree and finally the right subtree.

Algorithm:

  • Visit root node.
  • Recursively traverse left subtree.
  • Recursively traverse right subtree.
Define Pre-Order Traversal

Post-order Traversal

  • The root node is visited last, hence the name.
  • First we traverse the left subtree, then the right subtree and finally the root node.

Algorithm:

  • Recursively traverse left subtree.
  • Recursively traverse right subtree.
  • Visit root node.
Define Post-Order Traversal