
as you said you are working in agile methodology but in this project we are working in waterfall model, how will you manage a requirement in waterfall i give you a requirement ?
While I have extensive experience working in Agile environments, I fully understand and can adapt to the Waterfall model.
If I receive a requirement in a Waterfall project,
I would begin by thoroughly analyzing the requirement during the Requirements Gathering phase, ensuring all details and expectations are clearly documented and signed off in Software Requirements Specification (SRS).
Next, I would move to the Design phase, where I would create detailed technical specifications, architecture diagrams, and database designs that align with the requirement as High-Level Design (HLD) and Low-Level Design (LLD).
Once the design is finalized, I would proceed to the Implementation phase, writing clean, modular, and maintainable code based strictly on the design specifications.
After development, I would engage in the Testing phase, conducting unit testing followed by system and integration testing, ensuring the requirement is fully met without defects. I would document all results and address any issues in coordination with the QA team.
Finally, during the Deployment and Maintenance phases, I would support the deployment process, provide post-release support, and ensure the application performs reliably in production.
The key to success in the Waterfall model is disciplined documentation, clear communication, and strict adherence to each phase before moving to the next — and I am fully capable of following that structured approach.
Most of the time requirement is fixed in waterfall, but sometime if we have late changes in requirements in waterfall, I handle changes methodically by first assessing the impact of the change on the existing design, code, timeline, and cost. I then document the change request clearly and communicate it to the relevant stakeholders, including project managers and business analysts. If the change is approved through the formal change control process, I ensure that the updates are reflected in all relevant documentation and that any affected phases—such as design, development, and testing—are revised accordingly. My focus remains on maintaining traceability, avoiding scope creep, and ensuring that the quality and timelines are preserved as much as possible within the Waterfall structure.
You are working in Restful api, tell me if you are developing a restful services, what step you will follow ?
Well there are many design process to develop an restful api but i am using springboot to develop restful api
usually i follow below process
1 - Create Project
Create a project in Maven/Gradle with all required dependencies.
2 - Define the Entity Class (Model Layer)
3 - Create the Repository Interface
4 - Create the Service Layer
5 - Create the REST Controller
6 - Configure application.properties
Suppose you have multiple database, how will you handle this in your project ?
We are using multiple databases in my project to perform different actions
Our primary database is MySQL-based and gives us all the information regarding the Base Component
The secondary database is also MySQL, but it is present on another server for logging purposes.
1. Define two DataSources in application.properties
2. Create Entity Packages
Separate your entities:
- Primary DB entities -
com.example.primary.entities - Secondary DB entities -
com.example.secondary.entities
This step is quite important because based on these package only Entity Manager able to map correct database.
3. Configure Primary DataSource (@Primary)
4. Configure Secondary DataSource
5. Use Repositories Normally
Just inject and use your repositories like normal:
so
To handle multiple databases in Hibernate/JPA, I define separateDataSource,EntityManagerFactory, andTransactionManagerbeans for each DB, configure their respective entity and repository packages, and use Spring’s@EnableJpaRepositoriesto bind them properly.
How will handle EntityManagerFactory in your spring-boot project ?
This pattern is commonly used to manage multiple databases in a Spring Boot application. By defining separate configurations with dedicated EntityManagerFactory, DataSource, and TransactionManager beans, we ensure that each database is cleanly separated and independently managed. Through the use of @EnableJpaRepositories, we bind specific packages of repositories to their corresponding database configurations. This allows Spring to handle each persistence context correctly behind the scenes, ensuring reliable data access and transaction management across multiple databases.
Here is a basic implementation
basePackages will point to entity repository package so that spring boot initializer can easily map it.
@Primary annotation and Bean name will give an alias which will help our datasource in repository class
Configuration properties with prefix will take information from application.properties and connected based on property provided.
How will you set relationship in hibernate ?
To set relationships in Hibernate (or JPA), you define associations between entity classes using annotations like @OneToOne, @OneToMany, @ManyToOne, and @ManyToMany.
These annotations help Hibernate understand how your entities are related in the database and how to manage those relationships.
1. One-to-One
Example: One Employee has one Address
2. One-to-Many / Many-to-One
Example: One Department has many Employees
3. Many-to-Many
Example: One Student can enroll in many Courses, and each Course can have many Students.
Key Annotations & Concepts
Annotation | Description |
| One-to-one relationship |
| One-to-many relationship (parent side) |
| Many-to-one relationship (child side) |
| Many-to-many relationship |
| Defines foreign key column |
| Used for many-to-many join tables |
| Propagate changes (like save/delete) |
| Used on inverse side to avoid circular mapping |
Suppose if i have 2 table, one table has foreign relation with other. If i want to delete data from table1 then will it delete data from table2 ?
By default, Hibernate does NOT delete child records when you delete the parent — unless you explicitly configure it to do so using the cascade attribute.How to Enable Child Deletion Automatically
In the Parent Entity, you must set:
Explanation:
cascade = CascadeType.ALL: Allows Hibernate to cascade operations likepersist,remove, etc.orphanRemoval = true: Tells Hibernate to delete child records if they are no longer associated with the parent.
With this setup, deleting the parent will also delete the child records.
If You try Without Cascade/OrphanRemoval
If you don't use cascade = REMOVE or CascadeType.ALL, and try to delete the parent, Hibernate will throw a constraint violation error (foreign key still exists in the child table).
In Angular, How will you consume this Rest api also how will you show both table data in UI ?
Accessing both the parent and child table data in an Angular component.
We can implement below step
1. Define Models (Interfaces)
2. Create Angular Service to Call API
3. Consume the Service in Component
4. Display Data in HTML Template
Provide me with an example where you did database performance tuning ?
In one of my recent projects for a government client (WISDot), we had a module that generated real-time reports from a large dataset — involving multiple joins between employee, project, and audit tables. The performance started to degrade significantly as data grew, especially under concurrent users.
Problem Identified:
- Page load time for report generation exceeded 10 seconds.
- SQL queries were doing full table scans.
- N+1 query issue was present due to lazy loading of associated entities in Hibernate.
- No proper indexing on frequently filtered columns.
- Unoptimized use of
DISTINCT,INclauses, and unnecessaryJOINs.
Actions Taken:
1. Analyzed Slow Queries Using EXPLAIN PLAN & Hibernate Logs
- Identified which queries had poor execution plans.
- Enabled Hibernate SQL logging to trace inefficient queries.
2. Resolved N+1 Problem
- Used Hibernate's
@EntityGraphandJOIN FETCHin JPQL:
3. Created Proper Indexes
- Added indexes on columns used in
WHERE,JOIN, andORDER BY:
4. Used Pagination
- Replaced full data fetch with
Pageable:
5. Refactored Queries
- Rewrote heavy nested queries using CTEs (Common Table Expressions) for better clarity and optimization.
- Reduced unnecessary joins and columns in SELECT clause.
6. Analyzed with SonarQube & Query Profiler
- Used SonarQube and database profiling tools to track performance metrics and ensure query complexity was reduced.
Results:
- Reduced average report generation time from 10+ seconds to under 2 seconds.
- CPU utilization decreased due to lighter DB load.
- Query performance improved by over 70%.
- Application became responsive even with 10,000+ records and multiple users.
Well, as this was a basic screening round.
I am done with my question.
Do you have any questions for me
Well, I only asked. What will be the next step ?
but you can ask below questions (ask only 1 or 2 questions)
What are the next steps after this round?
Will there be any hands-on technical rounds or coding assessments in the next stages?
Is there a timeline you’re aiming for to close this position?
What does a typical day or week look like for someone in this QA automation role?
Which testing tools and frameworks are most commonly used by your QA team?
How is the QA team structured? Will this role involve more individual work or team collaboration?
Is there a balance between manual and automation testing, or is the focus mostly on automation?
How large is the current QA automation suite, and how often is it maintained or updated?
How closely does the QA team work with developers and product owners?
Are there regular grooming or sprint planning sessions that QA participates in?
Is there a dedicated DevOps or SRE team, or does QA also participate in deployments and monitoring?
Does the company support learning or certification opportunities in QA, cloud, or DevOps?
What kind of growth path is there for QA professionals in this organisation?
Are there opportunities to move into roles like QA lead, SDET, or even DevOps/SRE from this position?
What vision team is having with automation testing in a feature with AI-ML tools

