Giter Site home page Giter Site logo

mysql-dump-of-restaurants-table's Introduction

MySQL-dump-of-restaurants-table

MySQL dump of restaurants table. A collection of JSON documents

For demo purpose only

Popular restaurant example collection/table from another popular NoSQL solution.

1/ Unzip the file with your favourite tool

2/ Load the data inside your MySQL database:

mysql> CREATE DATABASE restaurant;

mysql> USE restaurant;

mysql> SOURCE /tmp/restaurants.sql

Misc

mysql> DESC restaurants;

+-------+---------------+------+-----+---------+------------------+

| Field | Type | Null | Key | Default | Extra |

+-------+---------------+------+-----+---------+------------------+

| doc | json | YES | | NULL | |

| _id | varbinary(32) | NO | PRI | NULL | STORED GENERATED |

+-------+---------------+------+-----+---------+------------------+

mysql> SHOW CREATE TABLE restaurants\G

*************************** 1. row ***************************

Table: restaurants

Create Table: CREATE TABLE restaurants (

doc json DEFAULT NULL,

_id varbinary(32) GENERATED ALWAYS AS (json_unquote(json_extract(doc,_utf8mb4'$._id'))) STORED NOT NULL,

PRIMARY KEY (_id)

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci

mysql> SHOW TABLE STATUS\G

*************************** 1. row ***************************

Name: restaurants

Engine: InnoDB

Version: 10

Row_format: Dynamic

Rows: 23907

Avg_row_length: 814

Data_length: 19464192

Max_data_length: 0

Index_length: 0

Data_free: 2097152

Auto_increment: NULL

Create_time: 2018-07-18 17:54:40

Update_time: NULL

Check_time: NULL

Collation: utf8mb4_0900_ai_ci

Checksum: NULL

Create_options:

    Comment: 

mysql-dump-of-restaurants-table's People

Contributors

freshdaz avatar

Watchers

 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.