0% found this document useful (0 votes)
4 views2 pages

SpringBoot_SQL_QuickNotes

This document provides a quick overview of Spring Boot features, tools, and SQL basics. It highlights key Spring Boot functionalities such as auto-configuration, production readiness, and integration capabilities, along with essential SQL commands and examples. Additionally, it distinguishes between various SQL operations and constraints, offering practical query examples for common use cases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

SpringBoot_SQL_QuickNotes

This document provides a quick overview of Spring Boot features, tools, and SQL basics. It highlights key Spring Boot functionalities such as auto-configuration, production readiness, and integration capabilities, along with essential SQL commands and examples. Additionally, it distinguishes between various SQL operations and constraints, offering practical query examples for common use cases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Spring Boot & SQL Quick Notes

1. Spring Boot Features


- Auto Configuration
- Standalone Applications (Embedded Tomcat)
- Spring Initializr (start.spring.io)
- No XML Configuration Required
- Production-Ready with Spring Boot Actuator
- Starter Dependencies (spring-boot-starter-*)
- Externalized Configuration (application.properties/yml)
- Built-in Testing Support
- Rapid Development for Microservices
- Easy Integration with JPA, Kafka, Eureka, etc.

2. Spring Boot Tools


- Spring Boot Actuator
Provides monitoring & management endpoints like /actuator/health, /metrics.
- Spring Boot DevTools
Enables auto-restart, LiveReload, disables caching during dev.
- Spring Boot CLI
Command-line tool for running Spring apps using Groovy.
- Spring Boot Starters
Predefined dependency sets (web, data-jpa, security, etc.)

3. SQL Basics
- DML: SELECT, INSERT, UPDATE, DELETE
- DDL: CREATE, ALTER, DROP, TRUNCATE
- DELETE vs TRUNCATE: DELETE supports WHERE and rollback; TRUNCATE is faster, removes all row
- Constraints: PRIMARY KEY, UNIQUE, NOT NULL, CHECK, DEFAULT, FOREIGN KEY
- Joins: INNER, LEFT, RIGHT, FULL (use UNION for FULL in MySQL)
- Subqueries: Used inside other queries (WHERE, FROM, SELECT)

4. SQL Query Examples


- Find user with ID 24:
SELECT * FROM users WHERE id = 24;
- 2nd Highest Salary:
SELECT DISTINCT salary FROM employees ORDER BY salary DESC LIMIT 1 OFFSET 1;
OR
SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(salary) FROM
employees);
- LIKE: SELECT * FROM users WHERE fname LIKE 'A%';
- BETWEEN: SELECT * FROM employees WHERE salary BETWEEN 40000 AND 80000;

You might also like