Tag

Unique Constraint

0 views collected around this technical thread.

Soul Technical Team
Soul Technical Team
Oct 9, 2023 · Databases

Understanding SQLite Log Modes and Fixing Duplicate Message ID Issues in Chat Applications

This article explains SQLite's Rollback and WAL logging modes, compares their performance and concurrency characteristics, investigates a real‑world problem where duplicate IM message IDs appear after app upgrades, and presents a step‑by‑step solution using UNIQUE constraints and index checks to prevent repeated inserts.

Chat ApplicationRollbackSQLite
0 likes · 26 min read
Understanding SQLite Log Modes and Fixing Duplicate Message ID Issues in Chat Applications
Top Architect
Top Architect
Jul 11, 2021 · Databases

Handling Duplicate Inserts in MySQL: Strategies and MyBatis Batch Example

The article discusses efficient ways to perform bulk inserts in MySQL while avoiding duplicate records, covering techniques such as INSERT IGNORE, ON DUPLICATE KEY UPDATE, INSERT…SELECT…WHERE NOT EXISTS, REPLACE INTO, and demonstrates a practical MyBatis implementation with a unique mobile_number constraint.

INSERT IGNOREMyBatisMySQL
0 likes · 5 min read
Handling Duplicate Inserts in MySQL: Strategies and MyBatis Batch Example
360 Zhihui Cloud Developer
360 Zhihui Cloud Developer
May 13, 2021 · Databases

Why MongoDB’s Unique Index Fails When Index Keys Exceed 1024 Bytes

The article reproduces a MongoDB issue where queries using a hashed shard key return no results and a compound unique index silently accepts duplicate documents, explains that the failIndexKeyTooLong parameter allows oversized index entries to be stored without indexing, and shows how to reproduce and fix the problem.

Hash ShardingMongoDBUnique Constraint
0 likes · 34 min read
Why MongoDB’s Unique Index Fails When Index Keys Exceed 1024 Bytes
Qunar Tech Salon
Qunar Tech Salon
Jun 11, 2017 · Databases

Techniques for Removing Duplicate Rows and Adding Unique Constraints in PostgreSQL

This article examines common scenarios where duplicate rows prevent creating unique constraints, presents eight SQL‑based methods—including array functions, window functions, NOT IN/EXISTS, combined IN/NOT IN, EXISTS/NOT EXISTS, single‑statement deletes, and table‑copy approaches—provides test data, performance comparisons, and practical guidance for DBA operations.

Database AdministrationPostgreSQLSQL Optimization
0 likes · 10 min read
Techniques for Removing Duplicate Rows and Adding Unique Constraints in PostgreSQL