Tata Elxsi
Interview Questions and Answers
Q1. What design pattern you used
I have used the Singleton design pattern in my previous projects.
Used to ensure a class has only one instance and provides a global point of access to it
Helps in managing global resources efficiently
Example: Database connection manager in a web application
Q2. What is primary key
Primary key is a unique identifier for each record in a database table.
Primary key ensures each record in a table is unique
It can be a single column or a combination of columns
Primary key values cannot be NULL
Example: 'ID' column in a 'Users' table
Q3. What is foreign key
Foreign key is a field in a database table that links to a primary key in another table.
Foreign key ensures referential integrity between related tables
It helps maintain relationships between tables
Foreign key constraints can be used to enforce data integrity
Q4. What is unique key
A unique key is a field or combination of fields in a database table that uniquely identifies each record in the table.
A unique key ensures that no two records in a table have the same values for the specified key fields.
It can be a single field or a combination of multiple fields.
Unique keys are used to enforce data integrity and prevent duplicate records.
Examples: Primary key, Unique constraint
Q5. Different types of dbs
Different types of databases include relational, NoSQL, graph, and document databases.
Relational databases store data in tables with rows and columns (e.g. MySQL, PostgreSQL)
NoSQL databases are non-relational and can handle unstructured data (e.g. MongoDB, Cassandra)
Graph databases use graph structures for semantic queries (e.g. Neo4j, Amazon Neptune)
Document databases store data in documents (e.g. Couchbase, Firebase)
Q6. process and thread difference
Processes are independent entities while threads are lightweight sub-processes within a process.
Processes have their own memory space while threads share the same memory space within a process.
Processes are heavyweight in terms of resources while threads are lightweight.
Processes communicate with each other through inter-process communication mechanisms like pipes or sockets, while threads can communicate directly through shared memory.
Example: A web browser running multiple ...read more
Q7. Explaining oops
OOPs (Object-Oriented Programming) is a programming paradigm based on the concept of objects, which can contain data and code.
OOPs focuses on creating objects that interact with each other to solve complex problems
Key principles of OOPs include encapsulation, inheritance, and polymorphism
Encapsulation allows objects to hide their internal state and require all interaction to be performed through an object's methods
Inheritance allows objects to inherit attributes and methods f...read more
Interview Process at null
Top Technical Lead Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month