Fading Coder

One Final Commit for the Last Sprint

Deploying a Multi-Primary and Replica MySQL Architecture via Docker

Network Topology and Port Allocasion Node Role Host IP Mapped Port Primary-A 192.168.153.19 3321 Replica-A 192.168.153.19 3322 Primary-B 192.168.153.19 3323 Replica-B 192.168.153.19 3324 Directory Initialization and Image Retrieval Execute the following shell commands to fetch the database image and...

MySQL Indexing Principles

InnoDB Internals InnoDB Internal Architecture The Data Structure and Algorithm Behind MySQL Indexing B-Trees and B+ Trees Why B+ Trees are Used for Indexing Databases use B+ trees for indexing because: Insertion and deletion operations in a B+ tree occur only on leaf nodes. Each node is the size of...

Java Interview Knowledge Base

Java Interview Knowledge Base
1. Java Basics 1.1 What are the data types in Java? Primitive types: byte (1), char (2), short (2), int (4), long (8), double (8), float (4), boolean (1) Reference types: classes, interfaces, enums, arrays 1.2 Differences between object-oriented and procedural programming? Both are development parad...

Multi-Table Queries, Functions, Subqueries, and Table Management in MySQL

Multi-table queries, also known as join queries, retrieve data from two or more related tables simultaneously. This requires the tables to be logically connected through common fields, such as a shared department ID, which may or may not be a formal foreign key. Understanding Cartesian Product Issue...

MySQL SQL Query Performance Optimization Techniques

Bulk Data Insert Optimization Three key strategies for efficient bulk loading: Data Ordering: Since InnoDB tables store data in primary key order, sorting import data by primary key sequence significantly improves load performance. Disable Unique Validation: Turn off constraint checking for unique c...

MySQL 5.6 Binary Installation and Service Configuration on CentOS 7

System Preparation Execute the following on a CentOS 7 host. First eliminate conflicts with the distribution’s default database packages: yum -y remove mariadb* Install the supporting libraries and build utilities required by the generic Linux binary: yum -y install autoconf bison ncurses-devel liba...

Essential MySQL Concepts for Beginners

Database and Table Operations Basic database creation and table management examples: -- Create database with UTF8 charset CREATE DATABASE IF NOT EXISTS school_db DEFAULT CHARACTER SET utf8mb4; USE school_db; -- Create student profile table CREATE TABLE IF NOT EXISTS student_profiles ( student_id SMA...

Developing an Online Matchmaking Service Using Spring Boot and Vue

The system offers a complete solution for managing matchmaking-related activities, including wedding company listings, booking and favoriting, marriage case studies with bookmarking, user profiles, matchmaking interactions such as messages and favorites, and administrative tools. It is implemented w...

MySQL Functions, Procedures, Triggers, and Shell Script Integration

MySQL Functions Creating Database and Department Table USE UNIVERSITY_DB; CREATE TABLE departments( dept_name VARCHAR(20), budget BIGINT(20), building VARCHAR(20) ); INSERT INTO departments VALUES('Electrical Engineering',15000,'Building A'); INSERT INTO departments VALUES('Telecommunications',45000...

MySQL Database Stress Testing with mysqlslap and sysbench

MySQL Built-in Stress Testing with mysqlslap MySQL ships with a native benchmarking utility called mysqlslap that simluates client load without requiring additional installation. Basic Usage mysqlslap --auto-generate-sql \ --concurrency=100,200 \ --iterations=5 \ --number-char-cols=30 \ --number-int...