MySQL Data Definition and Manipulation: A Practical Guide

Database Fundamentals A database represents a structured collection of organized information. Contemporary applications—from e-commerce platforms to enterprise resource systems and social media applications—depend on databases for persistent data storage and retrieval. The visual presentation in browsers or mobile apps merely reflects data that ...

Posted on Tue, 22 Sep 2026 16:23:12 +0000 by maxime

Solving the Continuous Check-in Bonus Calculation Problem in SQL

Problem Overview This problem involves calculating bonus coins earned from consecutive daily check-ins. The challenge lies in correctly identifying continuous check-in periods and applying bonus rules at specific intervals. Table Structure Table: tb_user_log Core Concepts Bonus Rules Base: 1 coin per day Every 3rd consecutive day: +2 bonus coi ...

Posted on Tue, 22 Sep 2026 16:18:29 +0000 by something

Essential MySQL Database Operations

Data Representation Units Computers use fundamental units for data storage and processing: Bit: Smallest storage unit (binary digit like 11001100) Byte: Basic data processing unit (1 Byte = 8 bits) Character: Human-readable symbols (letters, numbers, punctuation) UTF-8 encoding examples: English characters: 1 byte Chinese characters: 3 bytes ...

Posted on Tue, 22 Sep 2026 16:08:59 +0000 by FRSH

Fundamental SQL Operations and Advanced Query Techniques in MySQL

Defining a New Table CREATE TABLE members ( member_id INT PRIMARY KEY AUTO_INCREMENT, fullname VARCHAR(50) NOT NULL UNIQUE, years_old INT DEFAULT 0, contact_email VARCHAR(100), joined_at DATETIME DEFAULT CURRENT_TIMESTAMP ); Inserting Records Single Row Insertion -- Insert specific fields INSERT INTO members (fullname, years_old, con ...

Posted on Sun, 20 Sep 2026 16:26:24 +0000 by yodasan000

Hive-Based Analytics Pipeline for Titanic Survival Data

Connect to the Hive metastore using Beeline: ./beeline -u jdbc:hive2://node2:10000 -n root -p Initialize the analytics environment: CREATE DATABASE IF NOT EXISTS maritime_analytics; USE maritime_analytics; Establish an external staging table pointing to HDFS storage: CREATE EXTERNAL TABLE external_titanic_stage ( pid INT, survived_fla ...

Posted on Thu, 17 Sep 2026 15:59:40 +0000 by alapimba

Monitoring Active Tables with SHOW OPEN TABLES in openGauss

Command Overview The SHOW OPEN TABLES statement retrieves a list of all non-temporal tables currently opened within the database instance. Important Distinction When comparing this command to MySQL, note that while MySQL populates the Database field with the catalog name, openGauss fills this column with the schema name associated with the tabl ...

Posted on Wed, 16 Sep 2026 16:20:18 +0000 by AnarKy

Advanced SQL: Relational Modeling, Joins, and Programmatic Data Operations

Relational Schema Design When tracking academic performance, a marks table typically requires references to both learners and courses rather than storing redundant textual data. CREATE TABLE marks ( mark_id INT PRIMARY KEY AUTO_INCREMENT, pupil_ref INT, course_ref INT, mark_value DECIMAL(5,2) ); The pupil_ref and course_ref col ...

Posted on Tue, 15 Sep 2026 16:47:42 +0000 by Qbasicboy

Practical SQL Techniques and Query Patterns for Common Scenarios

Essential SQL Functions Field Value Transformation with CASE WHEN CASE WHEN provides conditional logic similar to if-then statements in programming languages. Syntax variant 1: CASE column_name WHEN 'result1' THEN 'display1' WHEN 'result2' THEN 'display2' END AS alias Syntax variant 2: CASE WHEN condition1 THEN result1 WHEN condition ...

Posted on Tue, 15 Sep 2026 16:14:13 +0000 by edwardoka

Implementing CRUD Operations with MyBatis

Building upon foundational MyBatis knowledge, this guide demonstrates how to implement Create, Read, Update, and Delete (CRUD) operations using MyBatis with a clean and maintainable structure. The implementation requires updates to three core components: the DAO enterface, its corresponding XML mapper, and test cases. All CRUD methods are conso ...

Posted on Mon, 14 Sep 2026 16:28:30 +0000 by andycole

SQL Query Essentials: From Basic Selection to Complex Joins

Selecitng Data Basic SELECT Statements SELECT * FROM customers WHERE customer_id = 1 ORDER BY first_name; Selecting Specific Columns SELECT first_name, last_name, points, points + 10, points / 10 + 100, (points + 10) * 100 AS discount_factor, (points + 10) * 100 AS 'discount factor' FROM customers; Note: Use ...

Posted on Mon, 14 Sep 2026 16:04:42 +0000 by marque