Nookipedia:Project Database

Welcome to Project Database, the Nookipedia Project dedicated to establishing and maintaining a database covering the.

Cargo
Nookipedia uses Cargo, a MediaWiki extension that provides a way to store data from templates into a database. This means that we can define data about a subject in just one location, and then re-use it across the wiki through querying. It also enables external users to re-use our data, through the MediaWiki API, api.nookipedia.com, and other services.

Basics
On the wiki, editors can interact with Cargo through parser functions:
 * - Defines the schema for a table. Placed within the  part of a template.
 * - Stores one row of data to a Cargo table. Placed within the  part of a template.
 * - Queries Cargo data tables, using SQL components.
 * - Defines a template as adding rows to a table declared elsewhere.
 * - displays the results of multiple queries in one place.

For full usage documentation, see mw:Extension:Cargo/Storing data and mw:Extension:Cargo/Querying data. For usage examples here on Nookipedia see Furniture/New Horizons.

Best practices

 * All table and column names should be completely lowercase, with words being separated by an underscore.
 * All table and column names should be singular, not plural. An exception is when a column's values are lists (e.g. a column that holds arrays of materials may be called ).
 * Column names that refer to the same data should generally be consistent between tables, especially for the same "category" of tables.
 * For example, our item tables refer to the width and length of items as  and , while our critter tables refer to these values as   and  . The reason for the difference is to clarify that the width of a critter refers to its tank size, and not the critter itself. The important thing here is that the column names are consistent between all item tables across all games, and all critter tables across all games.
 * Values should be plain text (no HTML or wikitext), unless that column is explicitly being used for display.
 * This is so that the data can be queried elsewhere (on both the wiki and externally) without having to worry about formatting issues.
 * Example 1: nh_furniture has columns,  , and  . The first two hold an integer and string respectively; the last one holds the value inside of Template:Currency, for easy reference on the wiki.
 * Example 2: In Template:NHFishInfo, the  parameter stores the catchphrase as a normal string, while   stores the catchphrase with any included HTML. The nh_fish Cargo table stores the former, while the template displays the latter.

List of tables
The following table lists tables, descriptions, and their status. Note that this table is manually updated. Last update: 00:34, September 7, 2020 (EDT) - incomplete


 * A full up-to-date list of tables (and their associated declare/attachment templates) is available at Special:CargoTables.

{| class="wikitable sortable" ! Status ! API ! Table Name ! style="width:15%"|Description ! style="min-width:235px;"| Structure ! Notes
 * cf_villager
 * villagers
 * nh_art
 * art
 * nh_bug
 * bugs
 * Missing rarity data (common name for rarity percentages TBD).
 * nh_clothing
 * clothing
 * nh_clothing_variation
 * clothing variations
 * nh_fish
 * fish
 * Missing rarity data (common name for rarity percentages TBD).
 * nh_furniture
 * furniture
 * nh_furniture_variation
 * furniture variations
 * bugs
 * Missing rarity data (common name for rarity percentages TBD).
 * nh_clothing
 * clothing
 * nh_clothing_variation
 * clothing variations
 * nh_fish
 * fish
 * Missing rarity data (common name for rarity percentages TBD).
 * nh_furniture
 * furniture
 * nh_furniture_variation
 * furniture variations
 * nh_clothing_variation
 * clothing variations
 * nh_fish
 * fish
 * Missing rarity data (common name for rarity percentages TBD).
 * nh_furniture
 * furniture
 * nh_furniture_variation
 * furniture variations
 * Missing rarity data (common name for rarity percentages TBD).
 * nh_furniture
 * furniture
 * nh_furniture_variation
 * furniture variations
 * nh_furniture
 * furniture
 * nh_furniture_variation
 * furniture variations
 * nh_furniture_variation
 * furniture variations
 * nh_furniture_variation
 * furniture variations
 * furniture variations


 * nh_sea_creature
 * sea creatures
 * Missing rarity data (common name for rarity percentages TBD).
 * villager
 * villagers
 * nh_villager
 * villagers (using in villager endpoint)
 * }
 * villager
 * villagers
 * nh_villager
 * villagers (using in villager endpoint)
 * }
 * nh_villager
 * villagers (using in villager endpoint)
 * }
 * nh_villager
 * villagers (using in villager endpoint)
 * }
 * villagers (using in villager endpoint)
 * }
 * }
 * }

General

 * Wikidata:Glossary
 * Wikibase Help:FAQ

Inputting data

 * Help:Properties
 * Help:Basic membership properties

Retrieving data

 * How to use data on Wikimedia projects
 * Extension:Wikibase Client/Lua
 * Wikipedia:Lua