# App/Databases/Overview

From XOWA: the free, open-source, offline wiki application

XOWA stores wiki data in SQLite databases. These databases can be classified as either Wikitext or HTML

## SQLite

XOWA uses SQLite database files to store its data.

- Files have an extension of either ".xowa" or ".sqlite3". Note that ".xowa" files are just plain old sqlite3 databases with a renamed extension.
- Files are limited to 2 GB. Note that SQLite can easily handle files greater than 100 GB. The 2 GB limit is imposed for the following two constraints:
  - 2 GB limit for SQLite files on Android. I've not found any documentation that states this, but opening a file larger than 2 GB file always fails.
  - 4 GB limit for FAT32 on flash cards. FAT32 is an old file-system format. However, it is the only format that is supported natively by all major operating systems. I install a set of wikis on a 200 GB FAT32-formatted microSD card and carry it around from machine to machine

Various programs can be used to read SQLite3.

- sqlite3 command shell: This is the official shell for SQLite. Instructions are available here: the https://www.sqlite.org/cli.html . Download is available here: https://www.sqlite.org/download.html
- SQLite browser. This is a free, open-source GUI that can be useful for those who don't want just a command-line shell. See: http://sqlitebrowser.org/

## XOWA Database sets: Wikitext vs HTML

There are two types of database sets for XOWA: Wikitext and HTML

### Wikitext

- Wikitext is a custom language by MediaWiki to generate HTML. For example, two apostrophes are used for italics: `''italics''`
- Wikitext databases will have `-text-` in the file name. For example, `en.wikipedia.org-text-ns.000.xowa`
- Users can generates this Wikitext set by using either Dashboard/Import/Online or Dashboard/Import/Offline
- Wikitext databases have been supported since the very start of XOWA. As such, they have a full set of functionality
- However, Wikitext databases are slower. They need to take the Wikitext and convert it to HTML. As such, Wikitext databases don't work for Android, nor for other low-spec machines like Raspberry Pi

### HTML

- HTML is the raw text as used by a web browser. For example, the following is used for italics: `<i>italics</i>`
- HTML databases will have `-html-` in the file name. For example, `en.wikipedia.org-html.xowa`
- Users can generate this HTML database using Dev/Command-line/Thumbs. However, for most users, they will just download the already-generated HTML databases from http://archive.org through Special:XowaDownloadCentral
- HTML databases have only been supported recently (as of 2016-06). As such, they are missing a small percentage of functionality. The most significant piece of that functionality is Popups, but there may be other features.
- HTML databases are fast, as they don't need to convert Wikitext to HTML. As such, HTML databases are used for Android and recommended for Raspberry Pi

### XOWA

- Main page
- Screenshots
- Video
- Download XOWA
- Download wikis

### Getting started

- Requirements
- Installation
- Simple Wikipedia
- English Wikipedia
- Other Wikipedias

### Android

- Setup
- Video

### Help

- About
- Contents
- Media
- Feedback

### Blog

- Current

### Links

- Wikimedia dumps
- XOWA @ archive.org
- English Wikipedia

### Donate

- archive.org
- Wikipedia
- XOWA