Implementing CRUD Operations with MyBatis XML Mappers
Implementing data persistence logic requires a clear mapping between Java objects and database tables. The following demonstration outlines the configuration and execution of Create, Read, Update, and Delete (CRUD) operations using MyBatis.
Entity Class Definition
First, define a Plain Old Java Object (POJO) to represent the data structure. T ...
Posted on Fri, 18 Sep 2026 16:28:18 +0000 by sungpeng
Building RESTful CRUD Services with Spring Boot and MyBatis
Environment Setup
Database Schema
Create a MySQL database named springboot and a table t_user to hold user records.
CREATE DATABASE `springboot`;
USE `springboot`;
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
`name` VARCHAR(10) DEFAULT NULL COMMENT 'User name',
`age` ...
Posted on Fri, 04 Sep 2026 16:48:03 +0000 by krishnam1981
Implementing CRUD Operations and Popup Interactions with LayUI
To streamline development of data management interfaces, creating reusable templates for CRUD (Create, Read, Update, Delete) operatiosn proves efficient. LayUI offers components for building such interfaces with consistent styling and behavior.
User List Interface The list view features search controls, action buttons, and a data table. Below i ...
Posted on Mon, 31 Aug 2026 16:33:55 +0000 by aviatorisu
Implementing CRUD Operations with MyBatis Annotations
While XML configuration remains the predominant approach in MyBatis, annotation-based development offers a streamlined alternative that is widely adopted across other frameworks in the ecosystem.
Defining Mapper Interfaces with Annotations
Annotate methods directly on the interface to specify SQL queries:
public interface UserDao {
@Se ...
Posted on Wed, 26 Aug 2026 16:12:43 +0000 by brokenshadows
Implementing CRUD Operations with EF Core in .NET Core
This implementation demonstrates a generic repository patttern for Entity Framework Core operations in a .NET Core application.
Creating the Service Library
Create a class library project named NetCoreDemo.Services to house the data access layer.
Defining the Base Service Interface
public interface IBaseService
{
T GetById<T>(string i ...
Posted on Fri, 31 Jul 2026 16:30:30 +0000 by bogdan
Connecting PHP to MySQL Database and Basic Operations
Connecting PHP to MySQL Dataabse
<?php
$serverName = "localhost";
$userName = "root";
$password = "root";
$databaseName = "mysql";
// Create connection
$connection = new mysqli($serverName, $userName, $password, $databaseName);
// Check connection
if ($connection->connect_error) {
die("Co ...
Posted on Thu, 23 Jul 2026 16:06:47 +0000 by ErnesTo
Building a PHP Student Management System with PDO and MySQL
Database Setup
Before implementing the application, set up the MySQL database and table structure:
CREATE DATABASE IF NOT EXISTS student_db;
USE student_db;
CREATE TABLE students (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50) NOT NULL,
gender VARCHAR(10),
interests VARCHAR(100),
location VARCHAR(50),
notes TEXT
) ...
Posted on Wed, 08 Jul 2026 17:01:00 +0000 by v1ral
Simplifying Role Data Access with MyBatis-Plus Service Wrappers
MyBatis-Plus streamliens service creation by extending the IService interface. Begin by declaring a role service contract:
public interface ISysRoleService extends IService<SysRole> {
}
The default implemantation uses ServiceImpl, which handles dependency injection of the maper:
@Service
public class SysRoleService extends ServiceImpl< ...
Posted on Sun, 21 Jun 2026 17:02:03 +0000 by a1amattyj
Fundamental Database Operations for MySQL
Connecting and Managing Sessions
-- Connect using full parameters
mysql -h 127.0.0.1 -P 3306 -u root -p
-- Short form when connecting locally
mysql -u root -p
-- -h : target host address (IP)
-- -P : TCP port number
-- -u : username for authentication
-- -p : prompts for password if none provided inline
-- Discard current malformed statement b ...
Posted on Fri, 19 Jun 2026 17:31:47 +0000 by dabigchz
MySQL Fundamentals and Common Operations
After a prolonged break from coding, I found myself struggling to recall basic SQL syntax 😅
Reviewing my old SQL notes and adding some updates 😂
Primary references:
MySQL Documentation: https://dev.mysql.com/doc/refman/8.0/en/tutorial.html
Yi Bai Tutorial: https://www.yiibai.com/mysql
"Learning SQL" by Alan Beaulieu
Basic Operatio ...
Posted on Tue, 09 Jun 2026 17:12:16 +0000 by tidalwave