3i Infotech Placement: Sample Questions 532 - 533 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 532

Edit

Appeared in Year: 2004

Write in Short

Short Answer▾

What is thread safe?

Explanation

  • Thread safe program state behaves correctly when multiple simultaneous threads are using a resource.
  • Term can be applied to a section of code, a method, a class, a library, an application, etc.

    Code is not thread safe when it relies on state not being changed by another thread without guaranteeing that the state cannot be changed by another thread (guaranteeing exclusion) . This can be done by:

    • Ensuring that concurrent threads use synchronized algorithms.
    • Confining the address of a shared object to one thread whenever an unsynchronized algorithm is active.

Question 533

Edit

Describe in Detail

Essay▾

What are Armstrong rules? How do we say that they are complete and/or sound

Explanation

Define Armstrong Rules
  • Armstrong՚s Axioms is a set of rules.
  • Provides a simple technique for reasoning about functional dependencies.
  • Used to infer all the functional dependencies on a relational database.

    The well-known inference rules for FD

  • Reflexivity:
    • If A is a set of attributes and B is a subset of A, then A holds B.
  • Augmentation
    • If A hold B and C is a set of attributes, then AC holds BC.
    • It means that attribute in dependencies does not change the basic dependencies.
  • Transitivity
    • If A holds B and B holds C, then A holds C.
    • If then
    • A hold means that A functionally determines B.
  • Union
    • If A holds B and A holds C, then A holds BC.
    • If and
  • Pseudo Transitivity
    • If A holds B and BC holds D, then AC holds D.
    • If
  • First three are known as Amstrong Rules.
  • They are sound because it is enough if a set of FDs satisfy these three. They are called complete because using these three rules we can generate the rest all inference rules

Developed by: