Database Standards That Keep Large Chinese Tech Teams From Breaking Production
Schema mistakes compound silently—a table that works fine at 100k rows becomes a liability at 5 million, and renaming a column in production means touching every service that references it. These rules encode the hard-won lessons of teams that run databases through Singles' Day traffic spikes, and they translate directly to any team whose data will outlive its initial feature.
Database tables are the least changeable layer in a stack—once a field name or type ships, every downstream consumer is locked in. This set of conventions, drawn from Alibaba and ByteDance practice, treats every DDL as a permanent decision. Naming rules mandate all-lowercase singular table names, `is_xxx` boolean columns backed by unsigned tinyint, and decimal for any monetary value. Every table gets `id`, `create_time`, and `update_time`; without the timestamp, post-mortems are blind. Index design caps at five per table, enforces unique indexes on business-unique columns, and bans function calls on indexed columns—one varchar-to-int implicit conversion on a 20-million-row table turned an 8-second query into a full scan. SQL rules forbid SELECT *, limit JOINs to three tables, and push computation to the application layer. ORM mapping requires stripping the `is` prefix from Java POJO boolean fields to avoid serialization failures. The piece also contrasts Alibaba’s conservative, mandatory-heavy style with ByteDance’s more flexible, recommendation-driven approach, noting that both converge on the same goal: making schema decisions that survive years of traffic growth without a rewrite.
The gap between Alibaba’s mandatory-heavy rules and ByteDance’s recommendation-heavy style reflects a real trade-off: stability-obsessed organizations encode rules as hard gates, while fast-iteration cultures treat them as defaults that teams can override with justification. Neither is wrong, but picking the wrong style for your team’s risk tolerance creates friction.
Implicit type conversion is the most insidious index killer because it produces no error—the query just silently degrades to a full scan. The 20-million-row table that took 8 seconds because an int was passed to a varchar column is a failure mode that code review alone rarely catches.
The `is_xxx` database column vs. no-`is`-prefix Java POJO rule exposes a leaky abstraction between persistence and application layers. It’s a small mapping detail that breaks serialization in frameworks like Dubbo and Jackson, and most teams only discover it in production.
Mandating `update_time` on every table is less about auditing and more about operational survivability: when a data corruption incident happens at 3 a.m., the first question is always ‘when did this change,’ and without that column the answer requires restoring backups and diffing.