Backend Expert Roadmap
Backend Expert Roadmap
Backend
Expert
with these Interview Questions
*Disclaimer*
Everyone learns uniquely.
www.bosscoderacademy.com 2
Q.1 EASY
EASY
What are the different languages present
in DBMS?
www.bosscoderacademy.com 3
Q.2 EASY
EASY
What are ACID properties?
ACID properties are a set of properties that ensure reliable and secure
transactions among databases. To maintain data consistency, ACID
properties are followed. ACID stands for Atomicity, Consistency,
Isolation, Durability.
www.bosscoderacademy.com 4
Q.3 MEDIUM
MEDIUM
the process of dividing the larger table into smaller tables and linking
database.
www.bosscoderacademy.com 5
) BCNF: It is known as Boyce Codd Normal Form which is a strict
version of 3NF. A relation is said to be in BCNF if it is in 3NF and for
every functional dependency X->Y, X is a super key of the table. It is
also called the 3.5 Normal Form.
) 4NF: It is known as the fourth normal form. A relation is said to be
in 4NF if it is in BCNF and there is no multivalued dependency in
the table.
) 5NF: It is known as the fifth normal form. A relation is said to be in
5NF if it is in 4NF and it cannot be further decomposed into smaller
tables.
www.bosscoderacademy.com 6
Q.4 EASY
EASY
What is an ER diagram?
www.bosscoderacademy.com 7
Q.5 MEDIUM
MEDIUM
Give the resulting tables arising from
applying Joins on the following tables in
SQL
Employees Table:
id name department_id
1
Alice
101
2
Bob
102
3
Charlie
101
4 David 103
Departments Table:
id department_id
101
HR
102
IT
103
Marketing
104 Sales
www.bosscoderacademy.com 8
Inner Join:
SQL Query:
SQL
FROM employees
departments.id;
Output:
name department_name
Alice
HR
Bob
IT
Charlie
HR
David Marketing
www.bosscoderacademy.com 9
Left Join (Left Outer Join):
! Returns all rows from the left table and the matched rows from
SQL Query:
SQL
FROM employees
departments.id;
Output:
name department_name
Alice
HR
Bob
IT
Charlie
HR
David Marketing
www.bosscoderacademy.com 10
Right Join (Right Outer Join):
# Returns all rows from the right table and the matched rows from
SQL Query:
SQL
FROM employees
departments.id;
Output:
name department_name
Alice
HR
Bob
IT
Charlie
HR
David
Marketing
NULL Sales
www.bosscoderacademy.com 11
Full Outer Join:
Returns all rows when there is a match in either the left or right
table.
SQL Query:
SQL
FROM employees
employees.department_id = departments.id;
Output:
name department_name
Alice
HR
Bob
IT
Charlie
HR
David
Marketing
NULL Sales
www.bosscoderacademy.com 12
Self Join:
tables.
SQL Query:
SQL
FROM employees e1
Output:
name manager
Alice
NULL
Bob
NULL
Charlie
Alice
David NULL
www.bosscoderacademy.com 13
Q.6 EASY
EASY
What is statelessness in REST?
www.bosscoderacademy.com 14
Q.7 HARD
HARD
What are Idempotent methods in REST?
www.bosscoderacademy.com 15
Q.8 MEDIUM
MEDIUM
What is CAP Theorem?
becoming unavailable
stop the system
Pick two
Memcache Big table Redis (Oracle SQL Server MySQL)
P A
AP Category
Clients may read inconsistent data
www.bosscoderacademy.com 16
Q.9 MEDIUM
MEDIUM
What is CAP Theorem?
SQL Injection:
SQL injection is a cyber attack where an attacker injects malicious SQL
code into a website's input fields, exploiting vulnerabilities in the code.
The aim is to manipulate the executed SQL query, gaining unauthorized
access to, modifying, or deleting data, and potentially executing
administrative operations on the database.
Example:
In a login form with the SQL query:
SQL
SQL
www.bosscoderacademy.com 17
Resulting in:
SQL
The double hyphen (-- ) comments out the rest of the query, allowing
unauthorized access.
Prevention
`p Input Validationo
Rp Security Audits
www.bosscoderacademy.com 18
Q.10 MEDIUM
MEDIUM
What is the difference between
clustered and non clustered indexes?
Feature Clustered Index Non-Clustered Index
Speed Faster Slower
Memory Requires less memory Requires more memory
Usage
Data Storage Main data is the clustered Index is a copy of data
index itself
Number of
Indexes Only one per table Multiple per table
Allowed
Disk Storage Stores data on disk Does not inherently store
data on disk
Storage Stores pointers to blocks, not Stores both values and
Structure data pointers to data
Leaf Nodes Actual data in leaf nodes Leaf nodes may contain
included columns, not data
Order Clustered key defines order Index key defines order in the
Definition in the table index
Default for Primary keys are clustered Composite keys with unique
constraints act as non-
Primary Keys indexes by default clustered indexes
www.bosscoderacademy.com 19
Q.11 EASY
EASY
What is a web server?
www.bosscoderacademy.com 20
Q.12 ME
ME DD
IUM
IUM
"Empid":101,
“empid” is the name (column)
"lastname":"Sharma",
1 is the value (for this row)
"firstname":"Rahul",
"title":"Programmer",
"titleofcourtesy":"MS.",
"birthdate":"12-09-1997",
"hiredate":"18-06-2010",
"address":"Sector 19 Chandigarh",
"postalcode":"500025",
"country":"USA",
"phone":"8768561213"
Comma separates this first
},
www.bosscoderacademy.com 2 1
Example products include MongoDB, CouchDB, and BaseX.
BaseX.
The Edge explains the relationship between two nodes. Edges can also
nodes.
s
d
n
i e
r
F
)
..
,.
L
ik
..
,.
Person e
ss
s
(r
re
a
d
ti
d
n
g
(a
. ) ,r
..
n
e
w
sI
i e
ie
e
v
e
iv
,r
..
L
g
.)
i n
t
r a
(
s
e
i k
L
Restaurant
City
LocatedIn (address,...,...)
www.bosscoderacademy.com 22
--> Key Value Data-Model
In this model every data element in the database is stored as a key value
pair.
with only two columns, the key and and the value.
Username Rahul
ID 101
Madhya
State
Pradesh
Pincode 500035
www.bosscoderacademy.com 23
--> Column Oriented Databases
www.bosscoderacademy.com 24
Q.13 EASY
EASY
How do you create a simple server in
Node.js that returns Hello World?
res.end('Hello World\n');
www.bosscoderacademy.com 25
Q.14 MEDIUM
MEDIUM
What is MVC Architecture?
The Model-View-Controller (MVC) framework is an architectural/design
pattern that separates an application into three main logical
components Model, View, and Controller. It comprises three main
components: Controller, Model, and View.
Controller: The controller focuses on processing business logic and
handling incoming requests. The controller instructs the model,
manipulates data, and collaborates with the view to produce the final
output.
View: Responsible for the application's UI logic, the view generates the
user interface based on data collected through the controller. It
interacts solely with the controller, ensuring separation of concerns.
www.bosscoderacademy.com 26
Q.15 MEDIUM
MEDIUM
What is API Rate Limiting? Give a few
rate limiting algorithms.
www.bosscoderacademy.com 27
Fixed Window Counter:
www.bosscoderacademy.com 28
Q.16 MEDIUM
MEDIUM
How can you select which webservice to
use between REST and SOAP?
When deciding between SOAP and REST for web services, consider the
following factors:
www.bosscoderacademy.com 29
Synchronous/Asynchronous Requests:
/ SOAP: Supports both sync and async.5
/ REST: Supports only synchronous calls.
J Statelessness Requirement:
/ SOAP: No.5
/ REST: Yes.
k Security Level:
/ SOAP: Preferred for high-security needs.5
/ REST: Security depends on underlying implementation.
Transaction Support:
/ SOAP: Provides advanced support for transactions.5
/ REST: Limited transaction support.
Ì Bandwidth/Resource Usage:
/ SOAP: High bandwidth due to XML data overhead.5
/ REST: Uses less bandwidth.
www.bosscoderacademy.com 30
Q.17 EASY
EASY
What is DRY principle in software
development?
Here's an example:
Without DRY:
def validate_email(email):
return False
return True
if not validate_email(email):
user.email = email
def send_confirmation_email(email):
if not validate_email(email):
# send email...
www.bosscoderacademy.com 31
In this example, the email validation logic is repeated three times. Any
change to this logic would require three edits, increasing the risk of
errors and inconsistencies.
With DRY:
def validate_email(email):
return False
return True
if not validate_email(email):
user.email = email
def send_confirmation_email(email):
if not validate_email(email):
www.bosscoderacademy.com 32
Q.18 MEDIUM
MEDIUM
What is the difference between first
party and third party cookies?
Both first-party and third-party cookies are small files stored on your
computer by websites you visit. They track your activity and
preferences, but they do so in different ways.
First-party cookies are created by the website you're on and can only
be accessed by that website. They're like a little note that the website
leaves on your computer to remember you next time you visit. They're
used for things like:
u Keeping track of your login information so you don't have to type it
in every timey
u Remembering what items you've added to your shopping carty
u Tailoring the website to your preferences, such as language or font
size
www.bosscoderacademy.com 33
Feature First-party cookies Third-party cookies
Who can Only the website that Any website that uses the
access them? created them same third-party code
Privacy concerns
www.bosscoderacademy.com 34
Q.19 MEDIUM
MEDIUM
Describe the RESTful API design
principles.
RESTful APIs follow six guiding principles:
Uniform Interface: Consistent resource naming and actions using
HTTP methods (GET, POST, PUT, DELETE).
] Client-Server: Separation of concerns between clients making
requests and servers handling them.
T Statelessness: Each request contains all information needed, servers
don't "remember" past requests.
Q Cacheable: Resources can be cached by clients or intermediaries
for better performance.
m Layered System: Intermediaries can be placed between clients and
servers without affecting communication.
L Code on Demand (Optional): Servers can send executable code to
clients to extend functionality.
These principles lead to well-designed, predictable, and scalable APIs.
www.bosscoderacademy.com 35
Q.20 MEDIUM
MEDIUM
Describe the RESTful API design
principles.
The SOLID principles are a set of five principles in object-oriented
design that aim to enhance the maintainability, flexibility, and scalability
of software:
¡ Single Responsibility Principle (SRP)
~ A class should have only one responsibility, promoting modular
and understandable code.
f Open/Closed Principle (OCP)
~ Software entities should be open for extension but closed for
modification, facilitating adaptability through interfaces and
abstract classes.
\ Liskov Substitution Principle (LSP)
~ Objects of a superclass should be replaceable with objects of a
subclass without affecting program correctness, ensuring
consistency in polymorphism.
X Interface Segregation Principle (ISP)
~ A class should not be forced to implement interfaces it does not
use, promoting focused and non-bloated interfaces.
Dependency Inversion Principle (DIP):
~ High-level modules should not depend on low-level modules;
both should depend on abstractions, reducing coupling and
improving flexibility.
www.bosscoderacademy.com 36
Q.21 HARD
HARD
What are the advantages and
disadvantages of microservices
architecture?
Key Concepts:
T Independence: Each service has specific business function.
Developed & scaled separately.X
T Modularity: Breaking down a large, monolithic application into
smaller, manageable pieces.
Advantages of Microservices:
« Agility and Speed: Faster development and deployment cycles due
to independent services.X
« Scalability: Individual services can be scaled up or down
independently based on demand.X
« Resilience: Failure of one service doesn't cripple the entire app.X
« Technology Choice: Each service can use the best tool for the job
without affecting others.
www.bosscoderacademy.com 37
Disadvantages of Microservices:
I Complexity: Increased overhead in managing infrastructure,
communication, and monitoring.E
I Testing: Testing complex distributed systems can be challenging
and time-consuming.E
I Debugging: Identifying and fixing issues across services can be
difficult.E
I Cost: Initial setup and ongoing maintenance can be more expensive
than monolithic.
www.bosscoderacademy.com 38
Q.22 MEDIUM
MEDIUM
What is the difference between
horizontal and vertical scaling?
www.bosscoderacademy.com 39
Processing large datasets efficiently.
www.bosscoderacademy.com 40
Q.23 MEDIUM
MEDIUM
What is the difference between HTTP
methods GET and POST?
Host: example.com
Host: example.com
Content-Type: application/x-www-form-urlencoded
param1=value1¶m2=value2
www.bosscoderacademy.com 41
Feature GET POST
Bookmarks Yes No
Idempotency Yes No
www.bosscoderacademy.com 42
Q.24 MEDIUM
MEDIUM
How can you maintain API Security?
Maintaining API security is crucial in today's digital landscape, where
data breaches and unauthorized access can have severe consequences.
Here are some key practices to keep your APIs secure:
| Implement Token-based Authentication: Ensure secure access to
services and resources by assigning tokens to trusted identities.
| Employ Encryption and Signatures: Safeguard your data with
encryption, such as TLS, and require signatures to verify the
legitimacy of users accessing and modifying the data.
| Identify and Address Vulnerabilities: Stay vigilant by regularly
updating operating systems, networks, drivers, and API
components. Utilize sniffers to detect security issues and potential
data leaks.
| Implement Quotas and Throttling: Set usage limits on API calls and
monitor historical usage patterns. Unusual spikes in API calls may
indicate misuse or errors, and implementing throttling rules can
protect against abuse and potential Denial-of-Service attacks.
| Utilize an API Gateway: Deploy an API gateway as a central point
for managing and securing API traffic. A robust gateway enables
authentication, control, and analysis of API usage.
www.bosscoderacademy.com 43
Q.25 HARD
HARD
something on www.google.com?
MI Query Submission:
your search query and other information (IP address, browser type,
etc.).
recognition.
www.bosscoderacademy.com 44
Serving the Results:
- The search engine selects the top results and retrieves the necessary
data from the database.6
- This data is formatted into HTML snippets with titles, descriptions,
and links to the original pages.6
- The HTML response is sent back to your browser.
B Displaying the Results:
- Your browser receives and interprets the HTML response, displaying
the search results page with the ranked snippets.6
- You can then click on the snippets to visit the relevant websites.
www.bosscoderacademy.com 45
Why
Bosscoder?
750+ Alumni placed at Top
Product-based companies.
Explore More