Tag

Database Design

1 views collected around this technical thread.

Cognitive Technology Team
Cognitive Technology Team
Jun 12, 2025 · Databases

How Materialized Views Boost Query Performance and Simplify Data Access

This article explains the materialized view pattern, describing why pre‑populated views are created when source data formats hinder efficient queries, how they improve performance as disposable caches, and the key considerations, trade‑offs, and scenarios for adopting this approach.

CachingDatabase Designdata consistency
0 likes · 11 min read
How Materialized Views Boost Query Performance and Simplify Data Access
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jun 12, 2025 · Databases

How to Find Cross‑College Teaching Anomalies with SQL – An Interview Challenge

An interview-style SQL challenge asks you to identify records where a professor teaches a course belonging to a different college than their own, providing table definitions, sample data, and the expected result, while inviting readers to devise the correct query.

Cross-CollegeDatabase DesignInterview
0 likes · 4 min read
How to Find Cross‑College Teaching Anomalies with SQL – An Interview Challenge
Code Ape Tech Column
Code Ape Tech Column
Jun 9, 2025 · Backend Development

Build a Unified SpringBoot Tree Utility for Menus, Comments, and More

This guide explains how to design a database schema with optional tree_path, define a generic ITreeNode interface, implement a versatile TreeNodeUtil class in SpringBoot, and demonstrates comprehensive tests—including building, filtering, and path generation—for reusable multi‑level structures such as menus, comments, departments, and categories.

Database DesignJavaMulti-level
0 likes · 12 min read
Build a Unified SpringBoot Tree Utility for Menus, Comments, and More
IT Services Circle
IT Services Circle
May 23, 2025 · Databases

MySQL Index Limits: Maximum Number of Indexes, Columns per Index, and Design Guidelines

This article explains MySQL's index limits for InnoDB and MyISAM engines, detailing the maximum number of indexes per table, the maximum columns per index, and provides practical recommendations on how many indexes a table should have to balance performance and maintenance.

Database DesignIndexesInnoDB
0 likes · 6 min read
MySQL Index Limits: Maximum Number of Indexes, Columns per Index, and Design Guidelines
Architect
Architect
May 21, 2025 · Databases

Designing Short Numeric ID Generation Using MySQL Auto‑Increment and Segment Allocation

The article examines the challenges of generating short, user‑friendly numeric account IDs, evaluates Snowflake and MySQL auto‑increment approaches, discusses deadlock issues with REPLACE INTO, and presents a final segment‑based solution that allocates ID blocks per login server while avoiding waste and concurrency problems.

Database DesignDistributed SystemsID generation
0 likes · 12 min read
Designing Short Numeric ID Generation Using MySQL Auto‑Increment and Segment Allocation
Architect
Architect
May 17, 2025 · Databases

Storing 2 Billion Phone Numbers: Why VARCHAR(20) Is Preferable to INT/BIGINT

The article explains why using a VARCHAR(20) column to store billions of phone numbers is safer and more flexible than INT or BIGINT, covering range limits, data integrity, query convenience, interview expectations, and common pitfalls such as insufficient field length, charset issues, missing indexes, and lack of encryption.

BIGINTData IntegrityDatabase Design
0 likes · 10 min read
Storing 2 Billion Phone Numbers: Why VARCHAR(20) Is Preferable to INT/BIGINT
Zhuanzhuan Tech
Zhuanzhuan Tech
May 15, 2025 · Databases

Dynamic Extension of Fields in Billion‑Row Tables: Challenges and Practical Solutions

This article examines the difficulties of adding new fields to a core billion‑row MySQL table—including locking, page splitting, and index degradation—and presents a configuration‑driven, three‑layer architecture that uses JSON extension fields, extension tables, and Elasticsearch to achieve safe, scalable dynamic schema evolution.

Database DesignDynamic SchemaJSON Field
0 likes · 8 min read
Dynamic Extension of Fields in Billion‑Row Tables: Challenges and Practical Solutions
macrozheng
macrozheng
May 8, 2025 · Databases

Why Storing 2 Billion Phone Numbers Requires VARCHAR(20) Over INT: Interview Insights

The article examines an interview question about storing 2 billion phone numbers, explains why int cannot hold 11‑digit numbers, advocates using VARCHAR(20) for flexibility and data integrity, and outlines common pitfalls and best practices for database design.

BIGINTDatabase DesignMySQL
0 likes · 8 min read
Why Storing 2 Billion Phone Numbers Requires VARCHAR(20) Over INT: Interview Insights
Raymond Ops
Raymond Ops
Apr 30, 2025 · Databases

Master Database Normalization: Understanding 1NF, 2NF, 3NF and Their Trade‑offs

This article explains why database normalization is essential, defines the first three normal forms with examples, discusses their advantages and disadvantages, and illustrates table relationships and practical design considerations to help you create efficient, low‑redundancy relational databases.

1NF2NF3NF
0 likes · 9 min read
Master Database Normalization: Understanding 1NF, 2NF, 3NF and Their Trade‑offs
Java Tech Enthusiast
Java Tech Enthusiast
Apr 30, 2025 · Databases

Storing 2 Billion Phone Numbers: Int vs String, Schema Design and Pitfalls

When designing a schema for two‑billion phone numbers, use a VARCHAR(20) column with utf8mb4 Unicode, a unique index, and proper validation/encryption rather than a 32‑bit INT, because strings preserve leading zeros, international prefixes, extensions, and support business extensibility, fault tolerance, and future changes.

BIGINTDatabase DesignInterview
1 likes · 7 min read
Storing 2 Billion Phone Numbers: Int vs String, Schema Design and Pitfalls
Architect's Guide
Architect's Guide
Apr 25, 2025 · Databases

Solutions for MySQL Auto Increment ID Exhaustion

This article discusses the problem of MySQL auto‑increment ID exhaustion and presents six practical solutions—including changing column type to BIGINT, using UUIDs, segmenting ID generation, composite keys, adjusting auto‑increment steps, and database sharding—to ensure scalability and uniqueness.

Database DesignID ExhaustionMySQL
0 likes · 6 min read
Solutions for MySQL Auto Increment ID Exhaustion
Architecture Digest
Architecture Digest
Apr 11, 2025 · Databases

Performance Issues of Using UUID as Primary Key in MySQL and Optimization Strategies

The article explains why using UUIDs as primary keys in MySQL large tables leads to poor index efficiency, slower inserts and queries, and costly index refreshes on updates, and then presents practical optimization techniques such as ordered UUIDs, binary storage, hybrid auto‑increment keys, and table partitioning.

Database DesignIndex PerformanceMySQL
0 likes · 7 min read
Performance Issues of Using UUID as Primary Key in MySQL and Optimization Strategies
Cognitive Technology Team
Cognitive Technology Team
Mar 26, 2025 · Databases

InnoDB Index Types, Physical Structure, Sorted Index Build, and Full‑Text Indexing

This article explains InnoDB clustered and secondary indexes, their physical B‑tree storage, page‑size and fill‑factor settings, the three‑phase sorted index build process, and the design, tables, cache, document‑ID handling, transaction semantics, and monitoring of InnoDB full‑text indexes.

Database DesignFull-Text SearchIndexes
0 likes · 17 min read
InnoDB Index Types, Physical Structure, Sorted Index Build, and Full‑Text Indexing
macrozheng
macrozheng
Mar 25, 2025 · Databases

Why Auto‑Increment Beats UUID in MySQL: Performance & Index Insights

This article investigates MySQL’s recommendation against UUIDs, comparing auto‑increment, UUID, and random snowflake keys through insertion speed tests and index structure analysis, revealing why auto‑increment keys outperform others, while also discussing the drawbacks of each approach.

Database DesignMySQLUUID
0 likes · 10 min read
Why Auto‑Increment Beats UUID in MySQL: Performance & Index Insights
Java Architect Essentials
Java Architect Essentials
Mar 24, 2025 · Databases

Why MySQL Discourages UUID as Primary Key: Performance Comparison with Auto‑Increment and Random Keys

This article investigates MySQL's recommendation against using UUIDs or non‑sequential keys as primary keys by creating three tables, benchmarking insert and query speeds with Spring Boot/JdbcTemplate, analyzing index structures, and discussing the trade‑offs of auto‑increment, UUID, and random long keys.

Database DesignIndexingMySQL
0 likes · 11 min read
Why MySQL Discourages UUID as Primary Key: Performance Comparison with Auto‑Increment and Random Keys
Code Ape Tech Column
Code Ape Tech Column
Feb 13, 2025 · Databases

Using SQL‑92 Row‑by‑Row Comparison in MySQL to Query Multi‑Agency Product Sales

The article explains how to design a MySQL table for product sales statistics and compares several query strategies—including loop queries, OR concatenation, mixed filtering, and finally SQL‑92 row‑by‑row comparison—to efficiently retrieve sales data for multiple business units and their dynamic product lists while respecting development constraints.

Database DesignMySQLRow Comparison
0 likes · 7 min read
Using SQL‑92 Row‑by‑Row Comparison in MySQL to Query Multi‑Agency Product Sales
macrozheng
macrozheng
Jan 22, 2025 · Databases

Do Varchar Lengths Really Impact MySQL Storage and Query Performance?

This article experimentally investigates whether the length of VARCHAR columns (e.g., 50 vs 500) affects MySQL storage size and query performance, covering table creation, bulk data insertion, storage queries, index and full‑table scans, and explains the underlying reasons for any differences observed.

Database DesignMySQLVARCHAR
0 likes · 10 min read
Do Varchar Lengths Really Impact MySQL Storage and Query Performance?
Selected Java Interview Questions
Selected Java Interview Questions
Dec 13, 2024 · Backend Development

Implementing Multi‑Tenant Architecture with Spring Boot and Spring Cloud

This article explains the concept, advantages, and technical choices of multi‑tenant architecture, then details a design using Spring Boot and Spring Cloud, covering database strategies, deployment isolation, tenant management, code examples, and step‑by‑step implementation for SaaS applications.

Backend DevelopmentDatabase DesignMicroservices
0 likes · 13 min read
Implementing Multi‑Tenant Architecture with Spring Boot and Spring Cloud
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Nov 21, 2024 · Databases

Common MySQL Data Types and Selection Guidelines

This article explains MySQL's various numeric, date/time, and string data types, discusses their characteristics such as signed/unsigned integers, floating‑point precision, fixed‑point accuracy, and provides practical best‑practice recommendations for choosing optimal types in database design.

Data TypesDatabase DesignDateTime
0 likes · 6 min read
Common MySQL Data Types and Selection Guidelines
Java Tech Enthusiast
Java Tech Enthusiast
Nov 14, 2024 · Databases

Activiti Workflow Engine Database Design

Activiti is a BPMN workflow engine that provides components such as Process, Repository, Runtime, Task, and History services, stores definitions, runtime data, and history in a relational database schema, and is used by deploying BPMN diagrams, starting instances, and managing tasks via its Java API.

ActivitiBPMNDatabase Design
0 likes · 21 min read
Activiti Workflow Engine Database Design