Giter Club home page Giter Club logo

world.db's Introduction

Welcome to world.db

A Free Open World Database & Schema

Usage

Get a copy of the world.db file. That's it.

Demo

Try the world.db Web Admin demo running on Heroku worlddb.herokuapp.com.

Tables, Schema

The world.db includes the following tables:

  • countries
  • regions
  • cities

[add schema pic here]

countries Table

CREATE TABLE "countries" (
  "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  "title" varchar(255) NOT NULL,
  "key" varchar(255) NOT NULL,
  "tag" varchar(255) NOT NULL,
  "synonyms" varchar(255),
  "pop" integer,
  "area" integer,
  "created_at" datetime NOT NULL,
  "updated_at" datetime NOT NULL
);

regions Table

CREATE TABLE "regions" (
  "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  "title" varchar(255) NOT NULL,
  "key" varchar(255) NOT NULL,
  "synonyms" varchar(255),
  "country_id" integer NOT NULL,
  "pop" integer, "area" integer,
  "created_at" datetime NOT NULL,
  "updated_at" datetime NOT NULL
);

cities Table

CREATE TABLE "cities" (
  "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  "title" varchar(255) NOT NULL,
  "key" varchar(255) NOT NULL,
  "synonyms" varchar(255),
  "country_id" integer NOT NULL,
  "region_id" integer,
  "pop" integer,
  "area" integer,
  "capital" boolean DEFAULT 'f' NOT NULL,
  "created_at" datetime NOT NULL,
  "updated_at" datetime NOT NULL
);

Command Line Tool

worlddb - world.db command line tool, version 0.2.0

Usage: worlddb [options]
    -c, --create                     Create DB Schema
        --delete                     Delete all records
        --load                       Use Loader for Builtin World Data
    -i, --include PATH               Data Path (default is .)
    -v, --version                    Show version
        --verbose                    Show debug trace
    -h, --help                       Show this message


Examples:
    worlddb at/cities                      # import austrian regions n cities
    worlddb -c                             # create database schema

Build Your Own world.db Version

Step 1: Create an empty database, that is, world.db. Issue the command:

worlddb --create

Step 2: Add your countries, regions and cities of choice. For example, let's use the Austrian and German cities and regions:

sportdb --include <your_path_to_fixtures> at/cities de/cities

That's it.

Real World Usage

world.db.admin - A free, open source web admin tool for world.db in Ruby on Rails (version 3.2 and up).

sport.db - A free, open sports database & schema.

Sportbook - A free, open source sports betting pool in Ruby on Rails (version 3.2 and up).

Alternatives

worlddb - Open World Database alpha; includes country, region & city names in many languages names and latitude and longitude numbers and country's iso 2-letter code.

License

The world.db schema, data and scripts are dedicated to the public domain. Use it as you please with no restrictions whatsoever.

Questions? Comments?

Send them along to the Open Sports Database & Friends Forum/Mailing List. Thanks!

world.db's People

Contributors

geraldb avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.