Informatica Placement Questions for Freshers

Informatica placement questions from Informatica placement papers will be discussed here. These will be very useful for students preparing for Informatica recruitment process.

Informatica Placement Questions with Answers

Informatica online test pattern consists of two rounds – Programming MCQs round & Coding round. Informatica placement questions for both these round are discussed below. Before you get starting with solving them, check out Informatica recruitment process.

Informatica Programming Questions

This is the first round of the Informatica recruitment process. This round consists of 30 programming MCQs which need to be solved in 45 minutes of time. Also, there is no negative marking involved. Informatica programming round syllabus is as given below.

Topic Expected number of questions
Operating System 5-8
Database Management (DBMS) 4-5
Data Structures 5-8
Algorithms 5-8

You can practice programming MCQs related to these topics here:

  • Operating System
  • Database Management
  • Data Structures
  • Algorithms

Informatica Coding Questions

Informatica coding round is the second round of Informatica recruitment process.Only students who clear the first round will be eligible for this round. This round consists of 4 coding questions which need to be solved in a duration of 90 mins.

Below are some of the sample Informatica coding questions taken from previous year Informatica placement papers.

1)Given an input island matrix, where 0 represents water and 1 represents land. Find the total number of islands that are formed by connected 1s.

2)Find the median of two sorted arrays of the same size.

3)Given an array and a value, find if there is a subset of the given set with the sum equal to the given sum.

4)Finding the non-repeating element in a given array

5)Given weights and values of n items, the task is to put these items in a knapsack of capacity W to get the maximum total value in the knapsack.In this problem, 0-1 means that we can either put the complete item in the knapsack or ignore it.

6)Find the height of a binary tree.

7)Given an input array arr = {5, 15, -30, 10, -5, 40, 10}.

The contiguous sub-array with maximum sum consists of elements 10, -5, 40, 10. Print their sum.

Output: 55

Java solution:

import java.util.*;
public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[n];
        for(int i = 0; i < n; i++)
        {
            arr[i] = sc.nextInt();
        }
        System.out.println(maxSubsequenceSum(arr));        
    }
    public static int maxSubsequenceSum(int[] X) {
        int max = X[0];
        int sum = X[0];
        for (int i = 1; i < X.length; i++) {
            sum = Math.max(X[i], sum + X[i]);
            max = Math.max(max, sum);
        }
        return max;
    }
}

8)Check if a number can be written as a sum of k prime numbers.

Here, the given number is 10 and the value of k is 2. We need to check whether 10 can be represented using the sum of 2 prime numbers or not.

Yes, 10 can be represented as 5 + 5, where 5 is a prime number.Hence, the output is Yes.If not, then the output is No.

Java solution:

import java.util.*;
public class Prime{
    public static boolean isprime(int x)
    {
        for (int i = 2; i * i <= x; i++)
            if (x % i == 0)
             
                return false;
        return true;
    }
    public static boolean isSum(int N, int K)
    {
        if (N < 2 * K)
            return false;
        if (K == 1)
            return isprime(N);
             
        if (K == 2)
        {
            if (N % 2 == 0)
                return true;
            return isprime(N - 2);
        }
        return true;
    }
     public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        if (isSum(n, k))
            System.out.print("Yes");
        else
            System.out.print("No");
    }
}

9) Lexicographic rank of a string

Given a string, find its rank among all its permutations sorted lexicographically. For example, consider a string abc. Permutations of the given string after lexicographical order is:

  • abc
  • acb
  • bac
  • bca
  • cab
  • cba

From the above combinations, the rank of abc is 1, the rank of acb is 2, and rank of cba is 6.Another example, consider a string she. The rank of this string is 6.

One simple solution is to initialize rank as 1, generate all permutations in lexicographic order. After generating a permutation, check if the generated permutation is the same as a given string, if same, then return rank, if not, then increment the rank by 1.

In the input string, S is the first character. There are a total of 3 characters and 2 of them are smaller than S. So there can be 2 * 2! smaller strings where first character is smaller than S, like following

  • h x x
  • h x x
  • e x x
  • e x x

Repeat the same process for h, rank is 2 * 2! + 1 * 1! +..

Repeat the same process for e, rank is 2 * 2! + 1 * 1! + 0 * 0!

Rank = 2 * 2! + 1 * 1! + 0 * 0! = 5

Note that the above computations find count of smaller strings. Therefore rank of given string is count of smaller strings plus 1. The final rank = 1 + 5 = 6

C solution:

#include <stdio.h>#include <string.h>
int fact(int n)
{
    return (n <= 1) ? 1 : n * fact(n - 1);
}
int findSmaller(char* str, int low, int high)
{
    int countRight = 0, i;
 
    for (i = low + 1; i <= high; ++i)
        if (str[i] < str[low])
            ++countRight;
 
    return countRight;
}
int findRank(char* str)
{
    int len = strlen(str);
    int mul = fact(len);
    int rank = 1;
    int countRight;
 
    int i;
    for (i = 0; i < len; ++i) {
        mul /= len - i;
        countRight = findSmaller(str, i, len - 1);
        rank += countRight * mul;
    }
    return rank;
}
int main()
{
    char str[50];
    scanf("%s", str);
    printf("%d", findRank(str));
    return 0;
}

10)Find ceil value in a BST.

Ceil: Rounds x upward, returning the smallest integral value that is not less than x.

There are numerous applications where we need to find the floor (ceil) value of a key in a binary search tree. For example, consider designing a memory management system in which free nodes are arranged in BST.

Ceil Value Node: Node with smallest data larger than or equal to the key value.

Imagine we are moving down the tree, and assume we are at the root node. The comparison yields three possibilities,

  1. A)Root data is equal to key. We are done, root data is ceil value.
  2. B)Root data < key value, certainly the ceil value cant be in the left subtree. Proceed to search on right subtree as a reduced problem instance.
  3. C)Root data > key value, the ceil value may be in the left subtree. We may find a node with is larger data than the key value in the left subtree, if not the root itself will be ceil node.

Here is the code for cell value.

C solution:

#include <stdio.h>#include <stdlib.h>
struct node {
    int key;
    struct node* left;
    struct node* right;
};
struct node* newNode(int key)
{
    struct node* node = (struct node*)malloc(sizeof(struct node));
    node->key = key;
    node->left = NULL;
    node->right = NULL;
    return (node);
}
int Ceil(struct node* root, int input)
{
    if (root == NULL)
        return -1;
    if (root->key == input)
        return root->key;
    if (root->key < input)
        return Ceil(root->right, input);
    int ceil = Ceil(root->left, input);
    return (ceil >= input) ? ceil : root->key;
}
int main()
{
    struct node* root = newNode(8);
 
    root->left = newNode(4);
    root->right = newNode(12);
 
    root->left->left = newNode(2);
    root->left->right = newNode(6);
 
    root->right->left = newNode(10);
    root->right->right = newNode(14);
 
    for (int i = 0; i < 16; i++)
        printf("%d %d\n", i, Ceil(root, i));
 
    return 0;
}

Practice more coding questions

DBMS | Interview Questions

DBMS | Interview Questions

Interviews are the most important step that will help you land your dream job. Preparing for your interview will help you appear calm, cool and collected. Here are a few DBMS Interview Questions that will help you prepare for your interview.

DBMS Interview Questions

Q1. Explain the terms database and DBMS. Also, mention the different types of DBMS.

Ans 1. A database could be defined as a prearranged collection of figures known as data.

DBMS short for Database Management Systems refers to the applications that are designed which enable user interaction with other applications. In simpler words, it could also be defined as a software application which interacts with databases, applications, and users to capture and analyze the required data. The data stored in the database could be retrieved, deleted and modified based on the client’s needs.

The different types of DBMS are:

  • Relational DBMS (RDBMS): RDBMS uses a structure that allows the users to, access data with another piece of data in a database and data is stored in the form of tables in RDBMS
  • Hierarchical DBMS: Its structure resembles that of a tree, where the nodes represent records and the branches of the tree represent fields.
  • Network DBMS: Network DBMS supports many-to-many relations where multiple member records can be linked.
  • Object-oriented DBMS: An object is a small individual software that is used to store pieces of data and the instructions for the actions to be done with the data

Q2. What are the advantages of DBMS?

Ans 2. The advantages of DBMS are:

  • Data Independence: This feature helps enable to change the structure of the data without affecting the structure of any of the running application programs.
  • Sharing of Data: Multiple users can use data from the same database simultaneously which proves to be useful for larger organizations.
  • Integrity constraints: This allows the data to be stored in a database in a refined manner.
  • Redundancy control: DBMS has a mechanism that helps control the redundancy of data by integrating all the data into a single database.
  • Provide backup and recovery facility: DBMS has this feature of ‘backup and recovery’ that automatically creates the data backup and restore the data as and when required.

Q3. What are the various kinds of interactions catered by DBMS?

Ans 3. DBMS caters various kinds of interactions, they are:

  • Data definition
  • Update
  • Retrieval
  • Administration

Q4. What is SQL?

Ans 4. SQL stands for Structured Query Language is an ANSI standard language updates database and commands for accessing.

Q5. What do you understand by query optimization?

Ans 5. Query optimization could be defined as the phase which identifies a plan for evaluation query that has the least estimated cost and it comes into the picture when there are a lot of algorithms and methods to execute the same task.

The advantages of query optimization are:

  • Faster output
  • A larger number of queries can be executed in comparatively less time
  • Reduction in time and space complexity

Q6. What are the different levels of abstraction in the DBMS?

Ans 6. There are 3 levels of data abstraction, namely

  • Physical Level: This is the lowest level of the data abstraction and this shows how the data is stored in the database.
  • Logical Level: This is the next level of the data abstraction and this shows the type of the data and the relationship among the data that is stored in the database.
  • View Level: The view level is the highest in the data abstraction and this shows or states only a part of the database.

Q7. Define Normalization.

Ans 7. Normalization is the process of analyzing relational schemas which are based on their respective functional dependencies and the primary keys so that they fulfil certain properties.

Properties:

  • To minimize data redundancy.
  • To minimize the anomalies of Insert, Delete and Update.

Q8. Define Denormalization.

Ans 8. Denormalization could be defined by boosting up database performance, adding redundant data which in turn helps rid of complex data.

Q9. What do you understand by the terms Entity, Entity Type, and Entity Set in DBMS?

Ans 9.

  • Entity: An entity could be defined as a real-world object that has attributes, which are nothing but characteristics of that particular object. Consider, an employee can be an entity and this can have attributes such as empid, empname, etc.
  • Entity Type: Entity type is nothing but a collection of entities, having the same attributes. Generally, an entity type refers to one or more related tables in a particular database. Consider this, An employee can have attributes such as empid, empname, department, etc.
  • Entity Set: An entity set is the collection of all the entities of a particular entity type in a database. For example, a set of employees, a set of companies, and a set of people can come under an entity set.

 Q10. What are the different types of normalization?

Ans 10. There are many successive levels of normalization and they are known as normal forms. Each consecutive normal form is dependent on the previous one. Given below are the first three normal forms.

  • First Normal Form: In 1NF there are no repeating groups within rows
  • Second Normal Form: In 2NF every non-key (supporting) column value is dependent on the whole primary key.
  • Third Normal Form: In the 3NF, dependencies solely on the primary key and no other non-key (supporting) column value.

Q11. Explain the concepts of a Primary key and Foreign Key.

Ans 11. Primary Key uniquely identifies the records in a database table while Foreign Key, on the other hand, is used to link two or more tables together.

Example: Consider 2 tables – Employee and Department. Both have one common field/column as ‘ID’ where ID is the primary key of the Employee table while this happens to be the foreign key for the Department table.

 

Q12. Explain the concept of ACID properties in DBMS?

Ans 12. ACID properties are a combination of Atomicity, Consistency, Isolation, and Durability properties. These properties prove to be very helpful in allowing a safe and secure way of sharing the data amongst multiple users.

  • Atomicity: When changes are being done to the data it feels as though a single operation is performed. In other words, either all the changes are performed, or none of them is performed.
  • Consistency: Data must be in a consistent state at the beginning of the transaction as well as the end of the transaction.
  • Isolation: As the name itself suggests, this ensures that each transaction that occurs is in isolation with others. Simply put a transaction which has started but not yet completed should be in isolation with others, this is done so that the other transaction does not get impacted with this transaction.
  • Durability: In the event of system failure, after the transaction is completed, changes to the data persist and are not undone. Hence, due to this property data is always in a durable state.

 

Q13. What are the different types of joins in SQL?

 

Ans 13. There are 4 types of Joins in SQL. They are

  • Inner Join: The inner join is used to fetch the data among the tables which are common in both the tables.
  • Left Join: The left join returns all the rows from the table which is on the left side of the join but only the matching rows from the table which is on the right side of the join.
  • Right Join: The right join returns all the rows from the table which is on the right side of the join but only the matching rows from the table which is on the left side of the join.
  • Full Join: The full join returns the rows from all the tables on which the join condition has put and the rows which do not match hold null values.
DBMS Interview Questions – Placement Preparation Material for B.Tech /MCA /BCA students

DBMS Interview Questions – Placement Preparation Material for B.Tech /MCA /BCA students

DBMS Interview Questions

A list of top frequently asked DBMS interview questions and answers are given below.

1) What is DBMS?

DBMS is a collection of programs that facilitates users to create and maintain a database. In other words, DBMS provides us an interface or tool for performing different operations such as the creation of a database, inserting data into it, deleting data from it, updating the data, etc. DBMS is a software in which data is stored in a more secure way as compared to the file-based system. Using DBMS, we can overcome many problems such as- data redundancy, data inconsistency, easy access, more organized and understandable, and so on. There is the name of some popular Database Management System- MySQL, Oracle, SQL Server, Amazon simple DB (Cloud-based), etc.


2) What is a database?

A Database is a logical, consistent and organized collection of data that it can easily be accessed, managed and updated. Databases, also known as electronic databases are structured to provide the facility of creation, insertion, updating of the data efficiently and are stored in the form of a file or set of files, on the magnetic disk, tapes and another sort of secondary devices. Database mostly consists of the objects (tables), and tables include of the records and fields. Fields are the basic units of data storage, which contain the information about a particular aspect or attribute of the entity described by the database. DBMS is used for extraction of data from the database in the form of the queries.


3) What is a database system?

The collection of database and DBMS software together is known as a database system. Through the database system, we can perform many activities such as-

The data can be stored in the database with ease, and there are no issues of data redundancy and data inconsistency.

The data will be extracted from the database using DBMS software whenever required. So, the combination of database and DBMS software enables one to store, retrieve and access data with considerate accuracy and security.

Join Our Official Telegram Channel For Instant Job Notifications


4) What are the advantages of DBMS?

  • Redundancy control
  • Restriction for unauthorized access
  • Provides multiple user interfaces
  • Provides backup and recovery
  • Enforces integrity constraints
  • Ensure data consistency
  • Easy accessibility
  • Easy data extraction and data processing due to the use of queries

5) What is a checkpoint in DBMS?

The Checkpoint is a type of mechanism where all the previous logs are removed from the system and permanently stored in the storage disk.

There are two ways which can help the DBMS in recovering and maintaining the ACID properties, and they are- maintaining the log of each transaction and maintaining shadow pages. So, when it comes to log based recovery system, checkpoints come into existence. Checkpoints are those points to which the database engine can recover after a crash as a specified minimal point from where the transaction log record can be used to recover all the committed data up to the point of the crash.


6) When does checkpoint occur in DBMS?

A checkpoint is like a snapshot of the DBMS state. Using checkpoints, the DBMS can reduce the amount of work to be done during a restart in the event of subsequent crashes. Checkpoints are used for the recovery of the database after the system crash. Checkpoints are used in the log-based recovery system. When due to a system crash we need to restart the system then at that point we use checkpoints. So that, we don’t have to perform the transactions from the very starting.

Access Original Aptitude Questions of Top IT companies


7) What do you mean by transparent DBMS?

The transparent DBMS is a type of DBMS which keeps its physical structure hidden from users. Physical structure or physical storage structure implies to the memory manager of the DBMS, and it describes how the data stored on disk.


8) What are the unary operations in Relational Algebra?

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

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


9) What is RDBMS?

RDBMS stands for Relational Database Management Systems. It is used to maintain the data records and indices in tables. RDBMS is the form of DBMS which uses the structure to identify and access data concerning the other piece of data in the database. RDBMS is the system that enables you to perform different operations such as- update, insert, delete, manipulate and administer a relational database with minimal difficulties. Most of the time RDBMS use SQL language because it is easily understandable and is used for often.

Most important HR Interview Questions


10) How many types of database languages are?

There are four types of database languages:

  • Data Definition Language (DDL) e.g., CREATE, ALTER, DROP, TRUNCATE, RENAME, etc. All these commands are used for updating the data that?s why they are known as Data Definition Language.
  • Data Manipulation Language (DML) e.g., SELECT, UPDATE, INSERT, DELETE, etc. These commands are used for the manipulation of already updated data that’s why they are the part of Data Manipulation Language.
  • DATA Control Language (DCL) e.g., GRANT and REVOKE. These commands are used for giving and removing the user access on the database. So, they are the part of Data Control Language.
  • Transaction Control Language (TCL) e.g., COMMIT, ROLLBACK, and SAVEPOINT. These are the commands used for managing transactions in the database. TCL is used for managing the changes made by DML.

Database language implies the queries that are used for the update, modify and manipulate the data.


11) What do you understand by Data Model?

The Data model is specified as a collection of conceptual tools for describing data, data relationships, data semantics and constraints. These models are used to describe the relationship between the entities and their attributes.

There is the number of data models:

  • Hierarchical data model
  • network model
  • relational model
  • Entity-Relationship model and so on.

12) Define a Relation Schema and a Relation.

A Relation Schema is specified as a set of attributes. It is also known as table schema. It defines what the name of the table is. Relation schema is known as the blueprint with the help of which we can explain that how the data is organized into tables. This blueprint contains no data.

A relation is specified as a set of tuples. A relation is the set of related attributes with identifying key attributes

See this example:

Let r be the relation which contains set tuples (t1, t2, t3, …, tn). Each tuple is an ordered list of n-values t=(v1,v2, …., vn).


13) What is a degree of Relation?

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

Follow us on Telegram for more Placement Preparation & Job Posts !


14) What is the Relationship?

The Relationship is defined as an association among two or more entities. There are three type of relationships in DBMS-

One-To-One: Here one record of any object can be related to one record of another object.

One-To-Many (many-to-one): Here one record of any object can be related to many records of other object and vice versa.

Many-to-many: Here more than one records of an object can be related to n number of records of another object.


15) What are the disadvantages of file processing systems?

  • Inconsistent
  • Not secure
  • Data redundancy
  • Difficult in accessing data
  • Data isolation
  • Data integrity
  • Concurrent access is not possible
  • Limited data sharing
  • Atomicity problem

16) What is data abstraction in DBMS?

Data abstraction in DBMS is a process of hiding irrelevant details from users. Because database systems are made of complex data structures so, it makes accessible the user interaction with the database.

For example: We know that most of the users prefer those systems which have a simple GUI that means no complex processing. So, to keep the user tuned and for making the access to the data easy, it is necessary to do data abstraction. In addition to it, data abstraction divides the system in different layers to make the work specified and well defined.

Download Our APP !


17) What are the three levels of data abstraction?

Following are three levels of data abstraction:

Physical level: It is the lowest level of abstraction. It describes how data are stored.

Logical level: It is the next higher level of abstraction. It describes what data are stored in the database and what the relationship among those data is.

View level: It is the highest level of data abstraction. It describes only part of the entire database.

For example- User interacts with the system using the GUI and fill the required details, but the user doesn’t have any idea how the data is being used. So, the abstraction level is entirely high in VIEW LEVEL.

Then, the next level is for PROGRAMMERS as in this level the fields and records are visible and the programmers have the knowledge of this layer. So, the level of abstraction here is a little low in VIEW LEVEL.

And lastly, physical level in which storage blocks are described.


18) What is DDL (Data Definition Language)?

Data Definition Language (DDL) is a standard for commands which defines the different structures in a database. Most commonly DDL statements are CREATE, ALTER, and DROP. These commands are used for updating data into the database.


19) What is DML (Data Manipulation Language)?

DData Manipulation Language (DML) is a language that enables the user to access or manipulate data as organized by the appropriate data model. For example- SELECT, UPDATE, INSERT, DELETE.

There is two type of DML:

Procedural DML or Low level DML: It requires a user to specify what data are needed and how to get those data.

Non-Procedural DML or High level DML:It requires a user to specify what data are needed without specifying how to get those data.

How to get ready for Off-Campus Placements | 2021


20) Explain the functionality of DML Compiler.

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 query evaluation engine can understand and then work on those queries with proper output.


21) What is Relational Algebra?

Relational Algebra is a Procedural Query Language which 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:


22) What is Relational Calculus?

Relational Calculus is a Non-procedural Query Language which 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 is two type of relational calculus:

  • Tuple relational calculus
  • Domain relational calculus

23) What do you understand by query optimization?

The term query optimization specifies an efficient execution plan for evaluating a query that has the least estimated cost. The concept of query optimization came into the frame when there were a number of methods, and algorithms existed for the same task then the question arose that which one is more efficient and the process of determining the efficient way is known as query optimization.

There are many benefits of query optimization:

  • It reduces the time and space complexity.
  • More queries can be performed as due to optimization every query comparatively takes less time.
  • User satisfaction as it will provide output fast

24) What do you mean by durability in DBMS?

Once the DBMS informs the user that a transaction has completed successfully, its effect should persist even if the system crashes before all its changes are reflected on disk. This property is called durability. Durability ensures that once the transaction is committed into the database, it will be stored in the non-volatile memory and after that system failure cannot affect that data anymore.


25) What is normalization?

Normalization is a process of analysing the given relation schemas according to their functional dependencies. It is used to minimize redundancy and also used to minimize insertion, deletion and update distractions. Normalization is considered as an essential process as it is used to avoid data redundancy, insertion anomaly, updation anomaly, deletion anomaly.

There most commonly used normal forms are:

  • First Normal Form(1NF)
  • Second Normal Form(2NF)
  • Third Normal Form(3NF)
  • Boyce & Codd Normal Form(BCNF)

    Follow us on LinkedIn !


26) What is Denormalization?

Denormalization is the process of boosting up database performance and adding of redundant data which helps to get rid of complex data. Denormalization is a part of database optimization technique. This process is used to avoid the use of complex and costly joins. Denormalization doesn’t refer to the thought of not to normalize instead of that denormalization takes place after normalization. In this process, firstly the redundancy of the data will be removed using normalization process than through denormalization process we will add redundant data as per the requirement so that we can easily avoid the costly joins.


27) What is functional Dependency?

Functional Dependency is the starting point of normalization. It exists when a relation between two attributes allow you to determine the corresponding attribute’s value uniquely. The functional dependency is also known as database dependency and defines as the relationship which occurs when one attribute in a relation uniquely determines another attribute. It is written as A->B which means B is functionally dependent on A.


28) What is the E-R model?

E-R model is a short name for the Entity-Relationship model. This model is based on the real world. It contains necessary objects (known as entities) and the relationship among these objects. Here the primary objects are the entity, attribute of that entity, relationship set, an attribute of that relationship set can be mapped in the form of E-R diagram.

In E-R diagram, entities are represented by rectangles, relationships are represented by diamonds, attributes are the characteristics of entities and represented by ellipses, and data flow is represented through a straight line.


Download Our APP !

29) What is an entity?

The Entity is a set of attributes in a database. An entity can be a real-world object which physically exists in this world. All the entities have their attribute which in the real world considered as the characteristics of the object.

For example: In the employee database of a company, the employee, department, and the designation can be considered as the entities. These entities have some characteristics which will be the attributes of the corresponding entity.


30) What is an Entity type?

An entity type is specified as a collection of entities, having the same attributes. Entity type typically corresponds to one or several related tables in the database. A characteristic or trait which defines or uniquely identifies the entity is called entity type.

For example, a student has student_id, department, and course as its characteristics.


31) What is an Entity set?

The entity set specifies the collection of all entities of a particular entity type in the database. An entity set is known as the set of all the entities which share the same properties.

For example, a set of people, a set of students, a set of companies, etc.


32) What is an Extension of entity type?

An extension of an entity type is specified as a collection of entities of a particular entity type that are grouped into an entity set.


33) What is Weak Entity set?

An entity set that doesn’t have sufficient attributes to form a primary key is referred to as a weak entity set. The member of a weak entity set is known as a subordinate entity. Weak entity set does not have a primary key, but we need a mean to differentiate among all those entries in the entity set that depend on one particular strong entity set.


34) What is an attribute?

An attribute refers to a database component. It is used to describe the property of an entity. An attribute can be defined as the characteristics of the entity. Entities can be uniquely identified using the attributes. Attributes represent the instances in the row of the database.

For example: If a student is an entity in the table then age will be the attribute of that student.

Campus Placement Guaranteed !


35) What are the integrity rules in DBMS?

Data integrity is one significant aspect while maintaining the database. So, data integrity is enforced in the database system by imposing a series of rules. Those set of integrity is known as the integrity rules.

There are two integrity rules in DBMS:

Entity Integrity : It specifies that “Primary key cannot have a NULL value.”

Referential Integrity: It specifies that “Foreign Key can be either a NULL value or should be the Primary Key value of other relation


36) What do you mean by extension and intension?

Extension: The Extension is the number of tuples present in a table at any instance. It changes as the tuples are created, updated and destroyed. The actual data in the database change quite frequently. So, the data in the database at a particular moment in time is known as extension or database state or snapshot. It is time dependent.

Intension: Intension is also known as Data Schema and defined as the description of the database, which is specified during database design and is expected to remain unchanged. The Intension is a constant value that gives the name, structure of tables and the constraints laid on it.


37) What is System R? How many of its two major subsystems?

System R was designed and developed from 1974 to 1979 at IBM San Jose Research Centre. System R is the first implementation of SQL, which is the standard relational data query language, and it was also the first to demonstrate that RDBMS could provide better transaction processing performance. It is a prototype which is formed to show that it is possible to build a Relational System that can be used in a real-life environment to solve real-life problems.

Following are two major subsystems of System R:

  • Research Storage
  • System Relational Data System

38) What is Data Independence?

Data independence specifies that “the application is independent of the storage structure and access strategy of data.” It makes you able to modify the schema definition at one level without altering the schema definition in the next higher level.

It makes you able to modify the schema definition in one level should not affect the schema definition in the next higher level.

There are two types of Data Independence:

Physical Data Independence: Physical data is the data stored in the database. It is in the bit-format. Modification in physical level should not affect the logical level.

For example: If we want to manipulate the data inside any table that should not change the format of the table.

Logical Data Independence: Logical data in the data about the database. It basically defines the structure. Such as tables stored in the database. Modification in logical level should not affect the view level.

For example: If we need to modify the format of any table, that modification should not affect the data inside it.

NOTE: Logical Data Independence is more difficult to achieve.


39) What are the three levels of data abstraction?

Following are three levels of data abstraction:

Physical level: It is the lowest level of abstraction. It describes how data are stored.

Logical level: It is the next higher level of abstraction. It describes what data are stored in the database and what relationship among those data.

View level: It is the highest level of data abstraction. It describes only part of the entire database.

For example- User interact with the system using the GUI and fill the required details, but the user doesn’t have any idea how the data is being used. So, the abstraction level is absolutely high in VIEW LEVEL.

Then, the next level is for PROGRAMMERS as in this level the fields and records are visible and the programmer has the knowledge of this layer. So, the level of abstraction here is a little low in VIEW LEVEL.

And lastly, physical level in which storage blocks are described.

Practice Free Online Aptitude Tests !


40) What is Join?

The Join operation is one of the most useful activities in relational algebra. It is most commonly used way to combine information from two or more relations. A Join is always performed on the basis of the same or related column. Most complex queries of SQL involve JOIN command.

There are following types of join:

  • Inner joins: Inner join is of 3 categories. They are:
    • Theta join
    • Natural join
    • Equi join
  • Outer joins: Outer join have three types. They are:

41) What is 1NF?

1NF is the First Normal Form. It is the simplest type of normalization that you can implement in a database. The primary objectives of 1NF are to:

  • Every column must have atomic (single value)
  • To Remove duplicate columns from the same table
  • Create separate tables for each group of related data and identify each row with a unique column

42) What is 2NF?

2NF is the Second Normal Form. A table is said to be 2NF if it follows the following conditions:

  • The table is in 1NF, i.e., firstly it is necessary that the table should follow the rules of 1NF.
  • Every non-prime attribute is fully functionally dependent on the primary key, i.e., every non-key attribute should be dependent on the primary key in such a way that if any key element is deleted, then even the non_key element will still be saved in the database.

43) What is 3NF?

3NF stands for Third Normal Form. A database is called in 3NF if it satisfies the following conditions:

  • It is in second normal form.
  • There is no transitive functional dependency.
  • For example: X->Z

Where:
X->Y
Y does not -> X
Y->Z so, X->Z


44) What is BCNF?

BCMF stands for Boyce-Codd Normal Form. It is an advanced version of 3NF, so it is also referred to as 3.5NF. BCNF is stricter than 3NF.

A table complies with BCNF if it satisfies the following conditions:

  • It is in 3NF.
  • For every functional dependency X->Y, X should be the super key of the table. It merely means that X cannot be a non-prime attribute if Y is a prime attribute.

45) Explain ACID properties

ACID properties are some basic rules, which has to be satisfied by every transaction to preserve the integrity. These properties and rules are:

ATOMICITY: Atomicity is more generally known as ?all or nothing rule.’ Which implies all are considered as one unit, and they either run to completion or not executed at all.

CONSISTENCY: This property refers to the uniformity of the data. Consistency implies that the database is consistent before and after the transaction.

ISOLATION: This property states that the number of the transaction can be executed concurrently without leading to the inconsistency of the database state.

DURABILITY: This property ensures that once the transaction is committed it will be stored in the non-volatile memory and system crash can also not affect it anymore.


46) What is stored procedure?

A stored procedure is a group of SQL statements that have been created and stored in the database. The stored procedure increases the reusability as here the code or the procedure is stored into the system and used again and again that makes the work easy, takes less time in processing and decreases the complexity of the system. So, if you have a code which you need to use again and again then save that code and call that code whenever it is required.


47) What is the difference between a DELETE command and TRUNCATE command?

DELETE command: DELETE command is used to delete rows from a table based on the condition that we provide in a WHERE clause.

  • DELETE command delete only those rows which are specified with the WHERE clause.
  • DELETE command can be rolled back.
  • DELETE command maintain a log, that’s why it is slow.
  • DELETE use row lock while performing DELETE function.

TRUNCATE command: TRUNCATE command is used to remove all rows (complete data) from a table. It is similar to the DELETE command with no WHERE clause.

  • The TRUNCATE command removes all the rows from the table.
  • The TRUNCATE command cannot be rolled back.
  • The TRUNCATE command doesn’t maintain a log. That’s why it is fast.
  • TRUNCATE use table log while performing the TRUNCATE function.

48) What is 2-Tier architecture?

The 2-Tier architecture is the same as basic client-server. In the two-tier architecture, applications on the client end can directly communicate with the database at the server side.

 


49) What is the 3-Tier architecture?

The 3-Tier architecture contains another layer between the client and server. Introduction of 3-tier architecture is for the ease of the users as it provides the GUI, which, make the system secure and much more accessible. In this architecture, the application on the client-end interacts with an application on the server which further communicates with the database system.

Get Free Job Alerts on eMail !


50) How do you communicate with an RDBMS?

You have to use Structured Query Language (SQL) to communicate with the RDBMS. Using queries of SQL, we can give the input to the database and then after processing of the queries database will provide us the required output.


51) What is the difference between a shared lock and exclusive lock?

Shared lock: Shared lock is required for reading a data item. In the shared lock, many transactions may hold a lock on the same data item. When more than one transaction is allowed to read the data items then that is known as the shared lock.

Exclusive lock: When any transaction is about to perform the write operation, then the lock on the data item is an exclusive lock. Because, if we allow more than one transaction then that will lead to the inconsistency in the database.


52) Describe the types of keys?

There are following types of keys:

Primary key: The Primary key is an attribute in a table that can uniquely identify each record in a table. It is compulsory for every table.

Candidate key: The Candidate key is an attribute or set of an attribute which can uniquely identify a tuple. The Primary key can be selected from these attributes.

Super key: The Super key is a set of attributes which can uniquely identify a tuple. Super key is a superset of the candidate key.

Foreign key: The Foreign key is a primary key from one table, which has a relationship with another table. It acts as a cross-reference between tables.

 

 

 

 

 

 

 

 

 

 

 

Get Access To Our Premium Courses
Install our application from PlayStore and get discounts on our new courses.

Pin It on Pinterest