Database-MySQL [3i Infotech Placement]: Sample Questions 42 - 43 of 162

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

Question 42

Edit

Describe in Detail

Essay▾

What do you mean by atomicity and aggregation?

Explanation

Atomicity

  • In a transaction involving two or more discrete pieces of information, either all of the pieces are committed or none are.
  • Users should not have to worry about the effect of incomplete transactions.
  • Achieved by complex mechanisms such as logging, or operating-system calls.

Aggregation

  • Data aggregation is any process in which information is gathered and expressed in a summary form, for purposes such as statistical analysis.
  • Relation between two entity is treated as a single entity.
  • For example- The relation between Center and Course, is acting as an entity in relation with Visitor.
Define the Relation between Center and Course, is Acting as an Entity in Relation with Visitor

Question 43

Edit

Describe in Detail

Essay▾

What is the difference between “procedure” and “function” procedure?

Explanation

Difference between Procedure and Function
ProcedureFunction
  • Procedure may or may not return a value or may return more than one value using the OUT parameter.
  • Function is mainly used in the case where it must return a value.
  • Procedure can not be called from the sql statements
  • Function can be called from SQL statements
  • Procedures are normally used for executing business logic.
  • Functions are normally used for computations
  • Procedure can return multiple values (max 1024) .
  • Function returns 1 value only.
  • Procedure returns always integer value by default zero
  • Function return type could be scalar or table or table values
  • Procedure is precompiled execution plan
  • Functions are not precompiled execution plan
  • A procedure may modify an object
  • Function can only return a value.

Developed by: