Filtering data in SQL

Filtering data in SQL is done mainly with the WHERE clause (and sometimes HAVING for aggregated results). It allows you to extract only the rows that meet certain conditions. Here’s a breakdown of the most common filtering techniques: 🔹 1. Basic Filtering with WHERE SELECT * FROM employees WHERE department = 'Sales'; SELECT *…

0 Comments

Modifying data in SQL

Modifying data in SQL typically involves changing existing records in a database. There are a few main SQL statements used for modifying data: UPDATE, DELETE, and sometimes INSERT (if adding new rows). Here’s a detailed breakdown: 1. UPDATE Used to modify existing records in a table. Syntax: UPDATE table_name SET column1 = value1, column2…

0 Comments

Operators in SQL

In SQL, operators are symbols or keywords used to perform operations on data, such as comparisons, arithmetic, logical checks, and pattern matching. They are used mainly in queries (e.g., inside the WHERE, SELECT, and HAVING clauses). Here’s a breakdown of the main types of SQL operators: 1. Arithmetic Operators Used for mathematical calculations. +…

0 Comments

Data Definition Language in SQL

In SQL, DDL stands for Data Definition Language. DDL is used to define, modify, and manage the structure of database objects such as tables, indexes, and schemas. Unlike DML (Data Manipulation Language), DDL focuses on the structure of the data rather than the data itself. Here are the main DDL commands in SQL: CREATEUsed…

0 Comments

Data types in SQL

In SQL, data types define the kind of values a column, variable, or parameter can hold. Different database systems (MySQL, PostgreSQL, SQL Server, Oracle, etc.) have slightly different sets, but they all fall into similar categories. Here’s a structured breakdown of common SQL data types: 1. Numeric Data Types Used to store numbers. Integer…

0 Comments

Spring Security Flow

🏗️ Detailed Spring Security Flow Schema [1] HTTP Request │ ▼ ┌───────────────────────────┐ │ Security Filter Chain │ │ (DelegatingFilterProxy) │ └───────────────────────────┘ │ ▼ +----------------------------+ | Example Filters in Chain: | | - SecurityContextPersistenceFilter (loads SecurityContext) | | - UsernamePasswordAuthenticationFilter (handles login form) | | - BasicAuthenticationFilter (for Basic Auth) | | - BearerTokenAuthenticationFilter (for…

0 Comments

Spring Boot Annoatations

1. @Autowired Used for dependency injection (Spring automatically injects the required bean). By default, it matches by type. @Component class Engine { public String start() { return "Engine started"; } } @Component class Car { @Autowired private Engine engine; public void drive() { System.out.println(engine.start() + " - Car is driving"); } } @Component class…

0 Comments

Resilience4j in Spring Boot

Spring Boot + Resilience4j is a popular combo for building fault-tolerant, resilient microservices.Resilience4j provides resilience patterns like: CircuitBreaker – prevents cascading failures by stopping calls when downstream is unhealthy. Retry – automatically retries failed calls. RateLimiter – limits number of requests. Bulkhead – limits concurrent calls. TimeLimiter – sets timeouts for calls. ✅ Step…

0 Comments

Quartz in Spring Boot

🔹 What is Quartz? Quartz is a powerful, open-source job scheduling library. It lets you schedule tasks (jobs) to run: At a fixed interval At a specific time Using cron expressions 🔹 Add Quartz Dependency In a Spring Boot (Maven) project, include: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-quartz</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-quartz</artifactId> </dependency> 🔹 Define a Quartz…

0 Comments

Exception handling in Spring Boot

In Spring Boot, exception handling is usually done with the @ControllerAdvice and @ExceptionHandler annotations. This helps you catch exceptions globally and return proper responses (e.g., JSON error messages) instead of exposing stack traces. Here’s a simple example: 1. Create a Custom Exception package com.example.demo.exception; public class ResourceNotFoundException extends RuntimeException { public ResourceNotFoundException(String message) {…

0 Comments

End of content

No more pages to load