Difference between revisions of "Nookipedia:Project Database"

From Nookipedia, the Animal Crossing wiki
(Leader, bolding)
(Starting Cargo info)
Line 2: Line 2:
 
{{DISPLAYTITLE:Project Database}}
 
{{DISPLAYTITLE:Project Database}}
  
Welcome to '''Project Database''', the Nookipedia Project dedicated to establishing and maintaining a database covering the {{SER}}. Check out the pinned note on our #wiki channel [https://nookipedia.com/wiki/Nookipedia:Discord over on Discord] to vote and help us pick a name for the new project. This page will be updated with more information once the wikibase installation has been completed, so check back soon.
+
Welcome to '''Project Database''', the Nookipedia Project dedicated to establishing and maintaining a database covering the {{SER}}.
 +
 
 +
==Cargo==
 +
Nookipedia uses [[mw:Extension:Cargo|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 [http://api.nookipedia.com api.nookipedia.com] and other services.
 +
 
 +
===Basics===
 +
On the wiki, editors can interact with Cargo through parser functions:
 +
* <code>#cargo_declare</code> - Defines the schema for a table. Placed within the <code>noinclude</code> part of a template.
 +
* <code>#cargo_store</code> - Stores one row of data to a Cargo table. Placed within the <code>include</code> part of a template.
 +
* <code>#cargo_query</code> - Queries Cargo data tables, using SQL components.
 +
* <code>#cargo_attach</code> - Defines a template as adding rows to a table declared elsewhere.
 +
* <code>#cargo_compound_query</code> - 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]].
 +
 
 +
===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 <code>materials</code>).
 +
* Values should be plain text (no HTML or wikimarkup), 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.
 +
** An example of this in practice is [[Template:NHFishInfo]]; the `catchphrase` parameter stores the catchphrase as a normal sentence, while `catchphrase-display` stores the catchphrase with any included HTML.
 +
 
 +
===List of tables===
 +
{{Construction}}
 +
 
 +
A full up-to-date list of tables (and their associated declare/attachment templates) is available at [[Special:CargoTables]].
 +
 
 +
The following table lists tables, descriptions, and their status. Note that this table is manually updated,
 +
{|
 +
|-
 +
| {{Table cell|Green}}
 +
| '''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.
 +
|-
 +
| {{Table cell|Yellow}}
 +
| '''Beta''': This table is approaching completion. Structure is near finalized, and/or nearly all data has been populated.
 +
|-
 +
| {{Table cell|Gray}}
 +
| '''Dev''': This table is brand new. Columns may be added, removed, or changed, and/or is still missing a lot of data.
 +
|}
 +
 
 +
{| class="wikitable sortable"
 +
|-
 +
! Table
 +
! Description
 +
! Status
 +
! API {{note|A check in the API column indicates that the table is queried via [https://api.nookipedia.com api.nookipedia.com]}}
 +
! Notes
 +
|-
 +
| nh_fish
 +
| {{NH}} fish
 +
| {{Table cell|Green}}
 +
| {{Table cell| Yes}}
 +
| Queried by [https://api.nookipedia.com/ Nookipedia API]. Missing rarity data (common name for rarity percentages has to be determined).
 +
|-
 +
|-
 +
| nh_bug
 +
| {{NH}} fish
 +
| {{Table cell|Green}}
 +
| {{Table cell| Yes}}
 +
| Queried by [https://api.nookipedia.com/ Nookipedia API]. Missing rarity data (common name for rarity percentages has to be determined).
 +
|-
 +
| nh_sea_creature
 +
| {{NH}} sea creatures
 +
| {{Table cell|Green}}
 +
| {{Table cell| Yes}}
 +
| Queried by [https://api.nookipedia.com/ Nookipedia API]. Missing rarity data (common name for rarity percentages has to be determined).
 +
|}
  
 
==Helpful links==
 
==Helpful links==
Line 17: Line 83:
 
*[https://www.mediawiki.org/wiki/Extension:Wikibase_Client/Lua Extension:Wikibase Client/Lua]
 
*[https://www.mediawiki.org/wiki/Extension:Wikibase_Client/Lua Extension:Wikibase Client/Lua]
 
*[https://en.wikipedia.org/wiki/Wikipedia:Lua Wikipedia:Lua]
 
*[https://en.wikipedia.org/wiki/Wikipedia:Lua Wikipedia:Lua]
 +
 +
==Notes==
 +
{{Note list}}
  
 
<br>
 
<br>
 
{{Nookipedia}}
 
{{Nookipedia}}
 
[[Category:Projects]]
 
[[Category:Projects]]

Revision as of 05:08, August 8, 2020

Tom Nook NH Character Icon.png
This project is led by SuperHamster.
As the leader, SuperHamster directs the project and its objectives. You can contact them directly on their talk page to discuss the project.
Tom Nook NH Character Icon.png
This project is led by SuperHamster.
As the leader, SuperHamster directs the project and its objectives. You can contact them directly on their talk page to discuss the project.


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 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 the noinclude part of a template.
  • #cargo_store - Stores one row of data to a Cargo table. Placed within the include 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.

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).
  • Values should be plain text (no HTML or wikimarkup), 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.
    • An example of this in practice is Template:NHFishInfo; the `catchphrase` parameter stores the catchphrase as a normal sentence, while `catchphrase-display` stores the catchphrase with any included HTML.

List of tables

Lloid NH.png
This article or section is in the process of an expansion or major restructuring.
You are welcome to assist in its construction by editing it as well. If this article or section has not been edited in several days, please remove this template.
Lloid NH.png
This article or section is in the process of an expansion or major restructuring.
You are welcome to assist in its construction by editing it as well. If this article or section has not been edited in several days, please remove this template.

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

The following table lists tables, descriptions, and their status. Note that this table is manually updated,

Green 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.
Yellow Beta: This table is approaching completion. Structure is near finalized, and/or nearly all data has been populated.
Gray Dev: This table is brand new. Columns may be added, removed, or changed, and/or is still missing a lot of data.
Table Description Status API [nb 1] Notes
nh_fish Animal Crossing: New Horizons fish Green Yes Queried by Nookipedia API. Missing rarity data (common name for rarity percentages has to be determined).
nh_bug Animal Crossing: New Horizons fish Green Yes Queried by Nookipedia API. Missing rarity data (common name for rarity percentages has to be determined).
nh_sea_creature Animal Crossing: New Horizons sea creatures Green Yes Queried by Nookipedia API. Missing rarity data (common name for rarity percentages has to be determined).

Helpful links

General

Inputting data

Retrieving data

Notes

  1. A check in the API column indicates that the table is queried via api.nookipedia.com