3i Infotech Papers: Sample Questions 512 - 514 of 1245

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

Question number: 512

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

What is cloning?

Explanation

  • An object carries copying in two ways

    • Set itself to be a copy of another object

    • Return a copy of itself- this is called cloning.

  • Cloning makes an exact copy of an object.

Image of the cloning

Image of the Cloning

Given the image is cloning example

Question number: 513

» Database » MySQL

Essay Question▾

Describe in Detail

Which date function is used to find the difference between two dates?

Explanation

Brifily define MONTH BETWEEN

Brifily Define MONTH Between

Brifily define MONTH BETWEEN

  • MONTH_BETWEEN is used to find the difference between two dates.

  • Start date is put in the first cell and end date in another.

  • This function returns the number of month between date 1 and date 2.

  • When the two dates have same day component, then the return value is a whole number.

  • Return value might thus include a fraction that considers the difference in the days on 31-day month.

  • Return date is positive when the first date is later than the second date otherwise it is negative.

Return value:

NUMBER

Syntax:

MONTHS_BETWEEN (date1, date2)

Question number: 514

» Database » MySQL

Essay Question▾

Describe in Detail

What is database Trigger?

Explanation

Define what is trigger.

Define What is Trigger.

Define what is trigger.

  • A database trigger is stored code that is executed immediately after a predefined event.

  • It is used to ensure the coordinated performance of related actions.

  • Although implementation varies, all major relational databases support triggers.

  • When an associated DML statement is executed a trigger is triggered automatically.

  • Triggers are used to maintain the referential integrity of data by changing the data in a systematic fashion.

  • Triggers help the database designer ensure certain actions, such as maintaining an audit file, are completed regardless of which program or user makes changes to the data.

Types of Triggers:

  • Row Level Triggers

  • Statement Level Triggers

  • Before Triggers

  • After Triggers

Types of Triggers

Types of Triggers

Types of Triggers