Articles

Unit Balance

EN

Unit balance in Standard of Iron is defined by executable simulation inputs: shipped troop data, nation overrides, combat multipliers, formation/stance behavior, production/economy values, and deterministic matchup fixtures run through tools/balance_sim...

Rafts

EN

A raft is a fixed crossing on a river: a log raft on a guide rope stretched between the two banks. It carries one unit at a time from one bank to the other. The Rhône crossing (218 BC) is the first battle of The Barcid Road campaign, and the rafts are what let Hannibal's army cross a river with no b...

Siege Presentation

EN

Roman and Carthaginian ballistas and catapults use reinforced timber carriages, open spoked wheels with iron tyres, bronze straps and hubs, and short moving standards. The presentation scale is 1.35x for ballistas and 1.20x for catapults, applied after the troop profile's scale; simulation footprint...

Minimap

EN

The HUD minimap combines four cached raster layers with one live QML overlay. The split is designed around invalidation: stable pictures of world state are rebuilt only when their inputs change, while continuously animated signals stay on the scene graph...

Hill Shapes

EN

A terrain entry of type hill uses its shape field to define the tactical footprint of raised ground. Maps can author organic mounds, straight ridges, arcs, elbows, rings, traced paths, or exact painted cell masks...

Transactions Intro

EN

A bookstore checkout changes several facts: stock decreases, an order is created, and the purchased items are recorded. Those changes belong together. An order without its items is incomplete; a stock reduction without an order loses inventory...

Consistency

EN

In ACID, consistency means that correct transactions take the database from a valid state to another valid state. A valid state satisfies the system's required rules. The database enforces declared constraints; the application must correctly implement rules that are not fully expressed by those cons...

Durability

EN

Durability means that a successfully committed transaction survives the failures covered by the database's configuration and storage assumptions. It is the reason an application can rely on a successful commit acknowledgment after a crash. It does not promise survival after every durable copy is des...

Atomicity

EN

Atomicity means that a transaction's changes are committed as one unit. If the transaction is rolled back, none of those changes remain committed. The operations still execute one after another; atomicity does not mean they take place at the same instant...

Indexing

EN

An index is an additional access path to data. It can reduce the rows and pages examined by a query, but it also consumes storage and must be maintained when indexed data changes. Start with the queries you need to support, then verify the resulting plans...

Primary Key vs Secondary Key

EN

A key expresses an identification rule. An index is a physical access structure. The two are related because engines often use indexes to enforce keys, but they are not interchangeable...

Query Optimization Techniques

EN

A query can return the correct result and still do far more work than necessary. Optimization means reducing that work while preserving the result the application needs. Start with one measured problem, not a checklist of indexes to add everywhere...

Working with Billion Row Table

EN

A billion rows is not a magic threshold at which one architecture becomes mandatory. A narrow, well-indexed billion-row table with selective queries can be easier to operate than a much smaller table with wide rows, poor access patterns, heavy churn, or global scans. Start from data size, row width...

Indexing Strategies

EN

Index access methods suit different operations. This note compares B-tree, bitmap, hash, and full-text indexes using named engines. For composite index design, covering queries, and maintenance, see Database Indexing...

Introduction to Orm

EN

An object-relational mapper (ORM) is a library that maps application objects to relational tables and generates SQL for common database operations...

Popular Orm Tools

EN

ORMs solve similar problems, but they expose very different programming models. Some are tightly integrated with a web framework, some implement a language ecosystem standard, and some deliberately stay close to SQL...

Relationship Loading and Query Performance

EN

ORM performance problems usually come from the SQL workload generated by application code: too many round trips, too many rows, large joins, missing indexes, or transactions that stay open too long...

Transactions Concurrency and Unit of Work

EN

ORMs make database access convenient, but concurrent requests still operate on a shared database. Two application workers can read the same row, make different decisions, and attempt conflicting writes...

Deadlocks

EN

A deadlock occurs when two or more transactions are waiting for one another in a cycle and none can continue unless one of the transactions is aborted or otherwise forced to release its resources...

Serializable vs Repeatable Read

EN

Imagine two requests hit an application at almost exactly the same time...

Shared vs Exclusive Locks

EN

Locks coordinate concurrent access to database resources...

Two Phase Locking

EN

Two-Phase Locking, usually abbreviated 2PL, is a concurrency-control protocol for making interleaved transactions behave like some serial execution...

Data Control Language Dcl

EN

Data Control Language (DCL) manages database privileges through statements such as GRANT and REVOKE. A privilege is permission to perform a particular operation on a particular resource...

Intro to Sql

EN

SQL, or Structured Query Language, lets you describe the data you want or the change you want to make. For example, “show Alice's orders” becomes a SELECT query; “record a new customer” becomes an INSERT statement...

Data Manipulation Language Dml

EN

Data Manipulation Language (DML) works with table data. SELECT reads rows, INSERT adds them, UPDATE changes them, and DELETE removes them. The table's structure remains in place unless a separate schema-changing command alters it...

Aggregate Functions

EN

An aggregate calculates one result from several rows. SUM adds values, COUNT counts them, and AVG calculates their average. Without grouping, one aggregate can summarize the whole input. With GROUP BY, it summarizes each group separately...

Data Definition Language Ddl

EN

Data Definition Language (DDL) defines database objects. A table definition says which columns exist, what kinds of values they accept, and which rules apply. It is different from inserting the current rows into that table...

Transaction Control Language Tcl

EN

A checkout involves more than one write. The bookstore must record an order, record its lines, and reduce stock. If an application stops between those operations, a partially recorded purchase can be misleading...

Triggers

EN

A trigger is database logic invoked automatically by a specified event. Unlike a procedure, which a caller explicitly invokes, a trigger can run because an application inserts, updates, or deletes rows...

Stored Procedures and Functions

EN

A view names a query. A stored routine names database code that can accept inputs and perform work. Two common kinds are procedures and functions. Their syntax, return values, transaction rules, and privileges depend on the engine...

Window Functions

EN

A window function calculates a value across rows related to the current row while retaining those rows in the result. Use it for rankings, running totals, and comparisons with earlier or later rows. OVER defines the partition, order, and, where applicable, frame...

Hierarchical Data

EN

A bookstore's categories form a hierarchy: Books contains Computing, and Computing contains Databases and Programming. A tree represents that structure using nodes and parent–child relationships. A root has no parent. A leaf has no children. A node's descendants are its children, their children, and...

Joins Subqueries and Views

EN

The bookstore's tables separate customers, orders, products, and order lines. A query puts the relevant facts together without permanently copying them. This note explains three tools: a join combines matching rows, a subquery uses another query inside a statement, and a view names a reusable query...

Sqlite

EN

SQLite is a self-contained, serverless, and zero-configuration SQL database engine that's known for its simplicity and efficiency. Unlike traditional databases that require a separate server to operate, SQLite operates directly on ordinary disk files. This makes it an ideal choice for small to mediu...

Clickhouse

EN

ClickHouse is a column-oriented SQL database designed for analytical workloads over large datasets. It is commonly used for...