Difference between revisions of "Nookipedia:Project Database"
(→List of tables: Partial update (WIP)) |
SuperHamster (talk | contribs) (→List of tables: Updating table statuses) |
||
Line 51: | Line 51: | ||
! Notes | ! Notes | ||
|- | |- | ||
− | | | + | | {{Table cell|Gray}} |
− | | | + | | {{Table cell|No}} |
| '''[[Special:CargoTables/cf_villager|cf_villager]]''' | | '''[[Special:CargoTables/cf_villager|cf_villager]]''' | ||
| {{CF|short}} villagers | | {{CF|short}} villagers | ||
Line 71: | Line 71: | ||
| - | | - | ||
|- | |- | ||
− | | | + | | {{Table cell|Yellow}} |
− | | | + | | {{Table cell|No}} |
| '''[[Special:CargoTables/nh_art|nh_art]]''' | | '''[[Special:CargoTables/nh_art|nh_art]]''' | ||
| {{NH|short}} art | | {{NH|short}} art | ||
Line 101: | Line 101: | ||
|- | |- | ||
| {{Table cell|Green}} | | {{Table cell|Green}} | ||
− | | {{Table cell| Yes}} | + | | {{Table cell|Yes}} |
| '''[[Special:CargoTables/nh_bug|nh_bug]]''' | | '''[[Special:CargoTables/nh_bug|nh_bug]]''' | ||
| {{NH|short}} bugs | | {{NH|short}} bugs | ||
Line 154: | Line 154: | ||
| Missing rarity data (common name for rarity percentages TBD). | | Missing rarity data (common name for rarity percentages TBD). | ||
|- | |- | ||
− | | | + | | {{Table cell|Yellow}} |
− | | | + | | {{Table cell|No}} |
| '''[[Special:CargoTables/nh_clothing|nh_clothing]]''' | | '''[[Special:CargoTables/nh_clothing|nh_clothing]]''' | ||
| {{NH|short}} clothing | | {{NH|short}} clothing | ||
Line 193: | Line 193: | ||
| - | | - | ||
|- | |- | ||
− | | | + | | {{Table cell|Green}} |
− | | | + | | {{Table cell|No}} |
| '''[[Special:CargoTables/nh_clothing_variation|nh_clothing_variation]]''' | | '''[[Special:CargoTables/nh_clothing_variation|nh_clothing_variation]]''' | ||
| {{NH|short}} clothing variations | | {{NH|short}} clothing variations | ||
Line 213: | Line 213: | ||
|- | |- | ||
| {{Table cell|Green}} | | {{Table cell|Green}} | ||
− | | {{Table cell| Yes}} | + | | {{Table cell|Yes}} |
| '''[[Special:CargoTables/nh_fish|nh_fish]]''' | | '''[[Special:CargoTables/nh_fish|nh_fish]]''' | ||
| {{NH|short}} fish | | {{NH|short}} fish | ||
Line 273: | Line 273: | ||
| Missing rarity data (common name for rarity percentages TBD). | | Missing rarity data (common name for rarity percentages TBD). | ||
|- | |- | ||
− | | | + | | {{Table cell|Green}} |
− | | | + | | {{Table cell|No}} |
| '''[[Special:CargoTables/nh_furniture|nh_furniture]]''' | | '''[[Special:CargoTables/nh_furniture|nh_furniture]]''' | ||
| {{NH|short}} furniture | | {{NH|short}} furniture | ||
Line 327: | Line 327: | ||
| - | | - | ||
|- | |- | ||
− | | | + | | {{Table cell|Green}} |
− | | | + | | {{Table cell|No}} |
| '''[[Special:CargoTables/nh_furniture_variation|nh_furniture_variation]]''' | | '''[[Special:CargoTables/nh_furniture_variation|nh_furniture_variation]]''' | ||
| {{NH|short}} furniture variations | | {{NH|short}} furniture variations | ||
Line 348: | Line 348: | ||
|- | |- | ||
| {{Table cell|Green}} | | {{Table cell|Green}} | ||
− | | {{Table cell| Yes}} | + | | {{Table cell|Yes}} |
| '''[[Special:CargoTables/nh_sea_creature|nh_sea_creature]]''' | | '''[[Special:CargoTables/nh_sea_creature|nh_sea_creature]]''' | ||
| {{NH|short}} sea creatures | | {{NH|short}} sea creatures | ||
Line 402: | Line 402: | ||
|- | |- | ||
| {{Table cell|Green}} | | {{Table cell|Green}} | ||
− | | {{Table cell| Yes}} | + | | {{Table cell|Yes}} |
| '''[[Special:CargoTables/villager|villager]]''' | | '''[[Special:CargoTables/villager|villager]]''' | ||
| {{SER}} villagers | | {{SER}} villagers | ||
Line 452: | Line 452: | ||
|- | |- | ||
| {{Table cell|Green}} | | {{Table cell|Green}} | ||
− | | {{Table cell| Yes}} | + | | {{Table cell|Yes}} |
| '''[[Special:CargoTables/nh_villager|nh_villager]]''' | | '''[[Special:CargoTables/nh_villager|nh_villager]]''' | ||
| {{NH|short}} villagers (using in villager endpoint) | | {{NH|short}} villagers (using in villager endpoint) |
Revision as of 01:31, September 7, 2020
Welcome to Project Database, the Nookipedia Project dedicated to establishing and maintaining a database covering the Animal Crossing series.
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:
#cargo_declare
- Defines the schema for a table. Placed within thenoinclude
part of a template.#cargo_store
- Stores one row of data to a Cargo table. Placed within theinclude
part of a template.#cargo_query
- Queries Cargo data tables, using SQL components.#cargo_attach
- Defines a template as adding rows to a table declared elsewhere.#cargo_compound_query
- 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
materials
). - 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
width
andlength
, while our critter tables refer to these values astank_width
andtank_length
. 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.
- For example, our item tables refer to the width and length of items as
- 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
buy1_price
,buy1_currency
, andbuy1_wikitext
. 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
catchphrase
parameter stores the catchphrase as a normal string, whilecatchphrase-display
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
Production: This table's structure is finalized, and has been fully populated with data. It can reliably be used for querying on-wiki or externally. | |
Beta: This table is approaching completion. Structure is near finalized, and/or nearly all data has been populated. | |
Dev: This table is brand new. Columns may be added, removed, or changed, and/or is still missing a lot of data. |
- A full up-to-date list of tables (and their associated declare/attachment templates) is available at Special:CargoTables.
Status | API [nb 1] | Table Name | Description | Structure | Notes | ||
---|---|---|---|---|---|---|---|
cf_villager | City Folk villagers |
|
- | ||||
nh_art | New Horizons art |
|
- | ||||
nh_bug | New Horizons bugs |
|
Missing rarity data (common name for rarity percentages TBD). | ||||
nh_clothing | New Horizons clothing |
|
- | ||||
nh_clothing_variation | New Horizons clothing variations |
|
- | ||||
nh_fish | New Horizons fish |
|
Missing rarity data (common name for rarity percentages TBD). | ||||
nh_furniture | New Horizons furniture |
|
- | ||||
nh_furniture_variation | New Horizons furniture variations |
|
- | ||||
nh_sea_creature | New Horizons sea creatures |
|
Missing rarity data (common name for rarity percentages TBD). | ||||
villager | Animal Crossing series villagers |
|
- | ||||
nh_villager | New Horizons villagers (using in villager endpoint) |
|
- |
Helpful links
General
Inputting data
Retrieving data
Notes
- ↑ A check in the API column indicates that the table is queried via api.nookipedia.com
Nookipedia | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|