Top

Database

21.

What is DDL interpreter?

Ans:

DDL Interpreter interprets the DDL statements and records the generated statements in the table containing metadata.

22.

Explain the functionality of DML Compiler.

Ans:

The DML Compiler translates DML statements in a query language that the query evaluation engine can understand. DML Compiler is required because the DML is the family of syntax element which is very similar to the other programming language which requires compilation. So, it is essential to compile the code in the language which the query evaluation engine can understand and then work on those queries with proper output.

23.

What are the various types of relationships in a Database? Define them.

Ans:

There are 3 types of relationships in the Database:

  • One-to-one: One table has a relationship with another table having a similar kind of column. Each primary key relates to only one or no record in the related table.
  • One-to-many: One table has a relationship with another table that has primary and foreign key relations. The primary key table contains only one record that relates to none, one or many records in the related table.
  • Many-to-many: Each record in both the tables can relate to many numbers of records in another table.

24.

Explain the terms 'Attribute' and 'Relations'.

Ans:

Attribute is described as the properties or characteristics of an entity. For Example, Employee ID, Employee Name, Age, etc., can be attributes of the entity Employee.

Relation is a two-dimensional table containing a number of rows and columns where every row represents a record of the relation. Here, rows are also known as 'Tuples' and columns are known as 'Attributes'.

25.

What is a degree of Relation?

Ans:

The degree of relation is a number of attributes of its relation schema. A degree of relation is also known as Cardinality it is defined as the number of occurrences of one entity which is connected to the number of occurrences of other entities. There are three degree of relation they are one-to-one(1:1), one-to-many(1:M), many-to-one(M:M).

26.

What are the unary operations in Relational Algebra?

Ans:

PROJECTION and SELECTION are the unary operations in relational algebra. Unary operations are those operations that use single operands. Unary operations are SELECTION, PROJECTION, and RENAME.

As in SELECTION relational operators are used for example - =,<=,>=, etc.

27.

What is Relational Algebra?

Ans:

Relational Algebra is a Procedural Query Language that contains a set of operations that take one or two relations as input and produce a new relationship. Relational algebra is the basic set of operations for the relational model. The decisive point of relational algebra is that it is similar to the algebra which operates on the number.

There are few fundamental operations of relational algebra:

  • select
  • project
  • set difference
  • union
  • rename,etc.

28.

What is Relational Calculus?

Ans:

Relational Calculus is a Non-procedural Query Language that uses mathematical predicate calculus instead of algebra. Relational calculus doesn't work on mathematics fundamentals such as algebra, differential, integration, etc. That's why it is also known as predicate calculus.

There are two types of relational calculus:

  • Tuple relational calculus

  • Domain relational calculus

29.

Define the relationship between 'View' and Data Independence'.

Ans:

View is a virtual table that does not have its data on its own rather the data is defined from one or more underlying base tables.

Views account for logical data independence as the growth and restructuring of base tables are not reflected in views.

30.

Explain the Data Dictionary.

Ans:

The data dictionary is a set of information describing the content and structure of the tables and database objects. The job of the information stored in the data dictionary is to control, manipulate and access the relationship between database elements.

Loading…
Tags: Database Interview Questions and Answers || Database Sort Questions and Answers || Database Detailed Questions and Answers || Database Tutorial