Explore topic-wise InterviewSolutions in Current Affairs.

This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.

1.

Explain The Distinction Between Total And Partial Constraints?

Answer»

In a total DESIGN constraint, each higher-level entity MUST belong to a lower-level entity SET. The same NEED not be true in a partial design constraint. For instance, some EMPLOYEES may belong to no work-team.

In a total design constraint, each higher-level entity must belong to a lower-level entity set. The same need not be true in a partial design constraint. For instance, some employees may belong to no work-team.

2.

Explain The Distinction Between Condition-defined And User-defined Constraints. Which Of These Constraints Can The System Check Automatically?

Answer»

In a generalization–specialization hierarchy, it must be possible to decide which entities are members of which lower level entity sets. In a condition defined design constraint, membership in the lower level entity-sets is evaluated on the BASIS of whether or not an entity satisfies an explicit condition or predicate.User-defined lower-level entity sets are not constrained by a membership condition; rather, entities are ASSIGNED to a given entity set by the database user.

Condition-defined CONSTRAINTS alone can be AUTOMATICALLY handled by the system. Whenever any tuple is inserted into the database, its membership in the various lower level entity-sets can be automatically decided by evaluating the respective membership predicates. Similarly when a tuple is updated, its membership in the various entity sets can be re-evaluated automatically.

In a generalization–specialization hierarchy, it must be possible to decide which entities are members of which lower level entity sets. In a condition defined design constraint, membership in the lower level entity-sets is evaluated on the basis of whether or not an entity satisfies an explicit condition or predicate.User-defined lower-level entity sets are not constrained by a membership condition; rather, entities are assigned to a given entity set by the database user.

Condition-defined constraints alone can be automatically handled by the system. Whenever any tuple is inserted into the database, its membership in the various lower level entity-sets can be automatically decided by evaluating the respective membership predicates. Similarly when a tuple is updated, its membership in the various entity sets can be re-evaluated automatically.

3.

A Weak Entity Set Can Always Be Made Into A Strong Entity Set By Adding To Its Attributes The Primary Key Attributes Of Its Identifying Entity Set. Outline What Sort Of Redundancy Will Result If We Do So?

Answer»

The primary key of a weak ENTITY SET can be inferred from its relationship with the STRONG entity set. If we add primary key attributes to the weak entity set, they will be present in both the entity set and the relationship set and they have to be the same. HENCE there will be REDUNDANCY.

The primary key of a weak entity set can be inferred from its relationship with the strong entity set. If we add primary key attributes to the weak entity set, they will be present in both the entity set and the relationship set and they have to be the same. Hence there will be redundancy.

4.

An E-r Diagram Can Be Viewed As A Graph.what Do The Following Mean In Terms Of The Structure Of An Enterprise Schema? the Graph Is Disconnected.< the Graph Is Acyclic.

Answer»
  1. If a pair of entity sets are CONNECTED by a path in an E-R diagram, the entity sets are related, though PERHAPS indirectly. A DISCONNECTED graph implies that there are pairs of entity sets that are unrelated to each other. If we split the graph into connected components, we have, in effect, a separate database corresponding to each connected component.
  2. As indicated in the answer to the previous part, a path in the graph between a pair of entity sets indicates a (possibly indirect) relationship between the two entity sets. If there is a cycle in the graph then every pair of entity sets on the cycle are related to each other in at least two distinct WAYS. If the E-R diagram is ACYCLIC then there is a unique path between every pair of entity sets and, thus, a unique relationship between every pair of entity sets.

5.

We Can Convert Any Weak Entity Set To A Strong Entity Set By Simply Adding Appropriate Attributes.why, Then, Do We Have Weak Entity Sets?

Answer»

We have weak entities for several reasons:

  • We want to avoid the DATA duplication and consequent possible INCONSISTENCIES caused by duplicating the KEY of the strong entity.
  • Weak entities reflect the logical STRUCTURE of an entity being DEPENDENT on another entity.
  • Weak entities can be deleted automatically when their strong entity is deleted.
  • Weak entities can be stored physically with their strong entities.

We have weak entities for several reasons:

6.

Construct An E-r Diagram For A Car-insurance Company Whose Customers Own One Or More Cars Each. Each Car Has Associated With It Zero To Any Number Of Recorded Accidents?

Answer»

 

 

7.

Explain The Distinctions Among The Terms Primary Key, Candidate Key, And Super Key?

Answer»

A super key is a set of one or more attributes that, taken collectively, allows us to identify UNIQUELY an entity in the entity set. A super key may contain EXTRANEOUS attributes. If K is a super key, then so is any super set of K. A super key for which no PROPER subset is also a super key is CALLED a candidate key. It is possible that several distinct sets of attributes could serve as candidate keys. The primary key is one of the candidate keys that is chosen by the database designer as the principal means of identifying entities within an entity set.

A super key is a set of one or more attributes that, taken collectively, allows us to identify uniquely an entity in the entity set. A super key may contain extraneous attributes. If K is a super key, then so is any super set of K. A super key for which no proper subset is also a super key is called a candidate key. It is possible that several distinct sets of attributes could serve as candidate keys. The primary key is one of the candidate keys that is chosen by the database designer as the principal means of identifying entities within an entity set.

8.

Consider A Two-dimensional Integer Array Of Size N ×m That Is To Be Used In Your Favorite Programming Language. Using The Array As An Example, Illustrate The Difference? Between The Three Levels Of Data Abstraction, And between A Schema And Instances?

Answer»

LET tgrid be a two-dimensional integer array of size n × m.

    • The physical level would simply be m × n (probably consecutive) storage locations of whatever size is specified by the implementation (e.g., 32 bits each).
    • The conceptual level is a grid of boxes, each possibly CONTAINING an integer, which is n boxes high by m boxes WIDE.
    • There are 2m×n possible views. For example, a view might be the entire array, or particular row of the array, or all n rows but only columns 1 through i.
    • Consider the following Pascal DECLARATIONS: type tgrid = array[1..n, 1..m] of integer; var vgrid1, vgrid2 : tgrid Then tgrid is a schema, whereas the value of VARIABLES vgrid1 and vgrid2 are instances.
    • To illustrate further, consider the schema array[1..2, 1..2] of integer. Two instances of this scheme are:

Let tgrid be a two-dimensional integer array of size n × m.

9.

List Six Major Steps That You Would Take In Setting Up A Database For A Particular Enterprise?

Answer»

Six MAJOR STEPS in setting up a database for a particular enterprise are:

  • Define the high level requirements of the enterprise (this step generates a document known as the system requirements specification.)
  • Define a model containing all appropriate types of data and data relationships.
  • Define the integrity constraints on the data.
  • Define the physical level.
  • For each known problem to be solved on a regular BASIS (e.g., tasks to be carried out by clerks or Web users) define a user interface to carry out the TASK, and write the necessary application programs to implement the user interface.
  • Create/initialize the database.

Six major steps in setting up a database for a particular enterprise are:

10.

List Seven Programming Languages That Are Procedural And Two That Are Non Procedural. Which Group Is Easier To Learn And Use?

Answer»

PROGRAMMING LANGUAGE classification:

  • Procedural: C, C++, Java, Basic, Fortran, Cobol, Pascal
  • Non-procedural: Lisp and Prolog

Note: Lisp and Prolog support some procedural constructs, but the core of both these languages is non-procedural. In THEORY, non-procedural languages are easier to learn, because they let the programmer concentrate on what needs to be done, rather than how to do it. This is not always true in practice, especially if procedural languages are learned FIRST.

Programming language classification:

Note: Lisp and Prolog support some procedural constructs, but the core of both these languages is non-procedural. In theory, non-procedural languages are easier to learn, because they let the programmer concentrate on what needs to be done, rather than how to do it. This is not always true in practice, especially if procedural languages are learned first.

11.

What Are Five Main Functions Of A Database Administrator?

Answer»

Five MAIN functions of a database ADMINISTRATOR are:

  • To create the scheme definition
  • To define the storage structure and access methods
  • To modify the scheme and/or physical organization when necessary
  • To grant authorization for data access
  • To SPECIFY INTEGRITY constraints

Five main functions of a database administrator are:

12.

List Five Responsibilities Of A Database Management System?

Answer»

A general purpose database manager (DBM) has FIVE responsibilities:

  1. INTERACTION with the FILE manager.
  2. integrity enforcement.
  3. security enforcement.
  4. backup and RECOVERY.
  5. concurrency control.

A general purpose database manager (DBM) has five responsibilities:

13.

Explain The Difference Between Physical And Logical Data Independence?

Answer»
  • Physical data independence is the ability to modify the physical scheme without MAKING it necessary to rewrite application PROGRAMS. Such modifications include changing from unblocked to blocked record storage, or from sequential to random ACCESS files.
  • Logical data independence is the ability to modify the conceptual scheme without making it necessary to rewrite application programs. Such a MODIFICATION might be adding a field to a record; an application program’s view hides this change from the program.

14.

This Chapter Has Described Several Major Advantages Of A Database System. What Are Two Disadvantages?

Answer»

Two DISADVANTAGES associated with database systems are listed below.

  1. Setup of the database SYSTEM requires more knowledge, MONEY, skills, and time.
  2. The complexity of the database may RESULT in poor PERFORMANCE.

Two disadvantages associated with database systems are listed below.

15.

List Four Significant Differences Between A File-processing System And A Dbms?

Answer»

Some main differences between a database management system and a file-processing system are:

  • Both systems contain a COLLECTION of DATA and a set of programs which access that data. A database management system coordinates both the physical and the logical access to the data, whereas a file-processing system coordinates only the physical access.
  • A database management system REDUCES the amount of data duplication by ensuring that a physical piece of data is available to all programs authorized to have access to it,whereas data written by one program in a file-processing system may not be READABLE by another program.
  • A database management system is designed to allow flexible access to data (i.e., queries), whereas a file-processing system is designed to allow predetermined access to data (i.e., compiled programs).
  • A database management system is designed to coordinate multiple users accessing the same data at the same time. A file-processing systemis USUALLY designed to allow one or more programs to access different data files at the same time. In a file-processing system, a file can be accessed by two programs concurrently only if both programs have read-only access to the file.

Some main differences between a database management system and a file-processing system are: