Building a Normalized and Version-Managed Card Character Database: A Practical Modeling Guide
This article explains how to turn scattered, unstructured card character name lists into a maintainable data asset. It covers drawing clear boundaries between character entities, card definitions, and list entries; designing a stable five-object data model; normalizing names without erasing differences; managing batches and rebuilding lists; running an import pipeline from raw text to reviewable data; performing structural and semantic validation with change auditing; and designing search and display. The key takeaway is that a reliable database is defined not by having the most fields, but by clearly separating confirmed facts, unverified leads, and processing results generated for retrieval.
1. From a Character Roster to a Structured Database
Organizing card character data often starts with a continuously listed roster. The person keeping the record may store Chinese names, foreign-language names, translated variants, parenthetical notes, and batch numbers all at once. This format works for temporary memos but not for long-term maintenance: names lack clear boundaries, notes are mixed with formal names, a single subject may go by several names, and numeric markers may carry no clear meaning.
The main value of the raw material is to provide clues for character records, not a complete explanation of card rules. So the extension work should focus on “how to reliably record and manage card character data,” and you should not infer cost, power, skills, or match performance from names alone.
The goal of building the database is to convert these unstructured clues into data with a clear identity, source, and status. In the end, it should not only support lookup by name but also answer: which character does this record correspond to? Do different names belong to the same entity? Which organizing batch does the data belong to? Has a piece of information been verified? Have historical records changed?
2. Defining Data Boundaries: Characters, Cards, and Roster Entries
2.1 A Character Entity Is Not a Card Instance
A character represents an identity at the content level, while a card represents a usable object in the rules system. The two may be related but should not be treated as the same concept.
In a general card system, one character may correspond to cards of different versions and may also have multiple display styles. Conversely, a character roster does not prove that every name in it maps to a card that has been released or is currently available.
Therefore, it is recommended to manage character entities and card definitions separately. A character entity holds identity and name information; a card definition holds confirmed rule information; and display styles are recorded as a separate layer. This avoids mistaking display differences for rule differences, and avoids automatically assuming a character has a certain ability just because its name appears on a roster.
2.2 Roster Entries Preserve the Original Context
A roster entry is the fact that “a certain source recorded a name at a certain position.” It should be linked to a character entity rather than merged directly into a single table.
For example, an original record may contain two Chinese names and one foreign-language name. After cleaning, it can be linked to one character entity while preserving the original text, its position in the list, and parsing notes. This way, even if you later find that an alias was assigned incorrectly, you can return to the original record and re-evaluate, without depending on data that has already been overwritten.
2.3 Keep Unclear Markers First, Then Interpret Them
Grouping numbers, range numbers, and parenthetical markers may indicate batches, order, page numbers, or supplementary notes. If the source does not explain them, you must not decide on your own that they are levels, costs, or version ranges.
A reasonable approach is to first save them as “uninterpreted markers,” recording where they appear and their context. Once the meaning is confirmed, migrate them to the corresponding field. The principle of data organization is to ensure traceability first, then pursue structural completeness.
3. Building a Stable Data Model
A maintainable database can contain five core object types: character entities, name aliases, source records, roster entries, and card versions.
3.1 Character Entity
A character entity should use an internally stable identifier rather than the name itself as the primary key. Names may change due to translation conventions or data revisions, while the internal identifier should remain unchanged.
Suggested fields:
| Field | Meaning | Maintenance Principle |
|---|---|---|
| entity_id | Internal character identifier | Remains stable after creation |
| display_name | Current display name | Can be revised; history is retained |
| entity_status | Entity verification status | Distinguishes pending from confirmed |
| created_at | Record creation time | Records the actual write time |
| updated_at | Last update time | Updated with valid changes |
These fields are a general design example and do not represent the interface or fixed specification of any existing product.
3.2 Name Aliases
Name aliases should be stored separately, avoiding concatenating all names into one field. Each alias can record its owning entity, name text, language category, alias type, source, and verification status.
Alias types can be distinguished as primary display name, translated variant, abbreviation, historical name, and source original name. The purpose of classification is not to artificially elevate the authority of a certain name, but to aid retrieval and maintenance.
Note in particular that aliases are not necessarily globally unique. Two different characters may share the same abbreviation, and a name may be ambiguous. Therefore, you must not automatically merge entities just because the alias text is identical.
3.3 Source Records
Source records explain where information came from, when it was organized, and what processing it underwent. You can store the source category, collection time, original text fragment, and internal verification notes.
The collection time and the applicable time of the data must be distinguished. Data entered today may describe an earlier version of the rules, so the entry time cannot be treated directly as the time the rules took effect.
3.4 Card Versions
Card version records should be created only when reliable rule material exists. A version record can include the associated character, rule text, applicable scope, confirmation status, and change notes.
Missing data should be left empty or marked as “to be added”; it must not be replaced with a zero value. An unknown cost and a cost of zero are different facts, and an unknown power value and a power of zero must not be conflated either.
4. Name Normalization: Unify Format Without Erasing Differences
4.1 Separate Format Cleaning from Identity Judgment
Format cleaning handles spaces, parentheses, letter case, and separators; identity judgment handles whether multiple names belong to the same character. The former can usually be automated, while the latter often requires source verification.
For example, consecutive spaces can be collapsed, leading and trailing whitespace can be removed, and parentheses that are clearly typographic differences can be unified. But two names separated by a slash may indicate an alias or two independent objects, so you cannot always split and then merge them.
4.2 Keep Both Original and Retrieval Names
It is recommended to keep at least three layers:
- Original name: faithfully preserves the spelling in the source.
- Display name: used for page presentation, kept readable.
- Retrieval key: used for matching, applying limited format normalization.
A sample flow:
Input name→ Keep the original text→ Trim leading and trailing whitespace→ Unify symbols that are definitely typographic differences→ Generate a retrieval key→ Query candidate entities→ Confirm the association based on evidence
The retrieval key should not take on display duties, nor be treated as the sole basis for entity identity. Over-normalization may compress different names into the same value, causing incorrect merges.
4.3 Classify Parenthetical Content
Parentheses may contain foreign-language names, identity qualifiers, translation notes, or the recorder’s remarks. First determine the purpose, then move it into a structured field.
Content confirmed to be a foreign-language name can go into the name table; identity qualifiers should be kept in the identity description; uninterpretable remarks should remain in the parsing notes. Do not forcibly assign a definite meaning to uncertain text just to make every field have a value.
5. Batch Management and List Reconstruction
The value of grouping markers lies mainly in the organizing process, not in the character’s own attributes. The database should decouple batch information from character identity.
One entity can appear in multiple batches, and one batch can contain multiple entities. Roster entries should record their batch, original order, source position, and association status, so the system can regenerate the roster as it was during a given organizing session.
For range numbers of unclear meaning, record the full text and its position, and mark it “use to be confirmed.” If it is later confirmed to represent an entry index, convert it into an index range; if it is confirmed to represent organizing progress, file it under batch notes. Before verification, it should not be used for business filtering.
This design preserves the arrangement information of the raw material while avoiding turning temporary organizing habits into character attributes.
6. Import Pipeline: From Raw Text to Reviewable Data
6.1 Retaining Raw Data
Before importing, save a copy of the raw text that cannot be directly overwritten. Manage the cleaning results and the original text separately, making it easy to review the conversion process and to reprocess after parsing rules are adjusted.
6.2 Candidate Entry Identification
Identify candidate entries based on parenthesis pairing, line breaks, separators, and name structure. Since the original roster may lack a stable separation method, the parsing result should allow a “boundary to be confirmed” state rather than assuming all splits are correct by default.
6.3 Candidate Entity Matching
Prioritize exact matching using verified names. For similar names, you can generate candidate associations, but should not confirm them directly.
The purpose of candidate matching is to reduce the cost of manual lookup, not to replace factual judgment. Similar characters may just be spelling similarities and do not prove the same identity.
6.4 Manual Review and Publishing
Review should focus on name boundaries, alias assignment, duplicate entities, and unclear markers. Data that passes review then enters the formal retrieval view; pending data can be kept in an internal workspace to avoid mixing with confirmed information.
7. Quality Validation and Change Auditing
7.1 Structural Validation
Structural validation checks whether required fields are missing, whether entity identifiers are duplicated, whether roster entries are linked to valid batches, and whether aliases point to existing entities.
These checks are suitable to run during import and save, and can promptly catch format problems, but they cannot replace content verification.
7.2 Semantic Validation
Semantic validation focuses on whether the data matches business meaning. For example, whether the same source shows conflicting character assignments, whether an unverified record was mistakenly marked as confirmed, and whether missing rules were incorrectly filled with definite values.
When a conflict is found, save the conflicting content and its handling status rather than silently overwriting the old value.
7.3 Change Tracking
Name revisions, entity merges, and entity splits should all retain audit records, at least stating the modified object, the before-and-after content, the reason for the change, and the operation time.
Entity merges especially require caution. It is recommended to keep a mapping from the old identifier to the new one to prevent historical rosters from losing their references. If a mistaken merge is later discovered, the original structure should be restorable based on the audit records.
8. Search and Display Design
Search can be divided into three levels: exact name matching, alias matching, and similar-name candidates. The interface should clearly distinguish “entity matched” from “possibly related results,” avoiding making users mistake fuzzy search results for a definite correspondence.
The data page should prioritize showing the primary name, confirmed aliases, verification status, last data update time, and a source summary. If rule fields still lack a reliable basis, they should be clearly marked “to be added” rather than manufacturing completeness through default values.
When browsing by batch, respect the original order; when browsing by name, a unified sorting rule can be applied. Original order and retrieval sorting serve different purposes and should not override each other.
9. Implementation Order and Acceptance Focus
Initial construction does not need to complete all fields at once. You can first finish raw-text retention, entry splitting, stable identifiers, and alias management, then gradually add version tracking, conflict handling, and search optimization.
Acceptance should focus on four things: whether all formal records can be traced back to their source; whether a single entity’s aliases can be correctly retrieved; whether uncertain information is clearly marked; and whether historical rosters can still be reconstructed after changes.
In the end, a reliable card character database is not a table with the most fields, but one that can clearly distinguish “confirmed facts,” “leads yet to be verified,” and “processing results generated for retrieval.” With these three types of information as boundaries, scattered rosters can be transformed into a sustainably maintainable data asset.
