Load: Used to retrieve an entity instance from the database based on its identifier, throwing an exception if not found.
Get: Used to retrieve an entity instance from the database based on its identifier, returning null if not found.
Load: It returns a proxy object without hitting the database until a method is called on it.
Get: It returns the actual object from the database immediately.
Load: Throws an ObjectNotFoundException if the object is not found in the database.
Get: Returns null if the object is not found in the database.
📦 MySQL is a widely-used relational database management system (RDBMS) that uses Structured Query Language (SQL) to manage and manipulate data. SQL is divided into several categories, each serving a specific purpose: DDL, DML, DQL, TCL, and DCL. 1. Data Definition Language (DDL) DDL commands are used to define and manage database structures such as tables, indexes, and schemas. The main DDL commands include CREATE, ALTER, DROP, and TRUNCATE. ⭐ CREATE: This command creates a new database object. CREATE TABLE students ( id INT PRIMARY KEY, name VARCHAR(100), age INT ); ⭐ ALTER : This command modifies an existing database object. ALTER TABLE students ADD COLUMN email VARCHAR(100); ⭐ DROP : This command deletes an existing database object. DROP TABLE students; ⭐ TRUNCATE : This command removes all records from a table without deleting the table itself. TRUNCATE TABLE students;

Comments
Post a Comment