Demo databases

Ready to explore

10 demo databases, relational, graph and hybrid.

CoraDB comes with a set of demo databases ready to try out its capabilities: five graph databases, four relational ones, and one that combines relational tables with graph vertices and edges in the same database.
Together they ship with 278 demo queries.
Each database downloads as a zip with its SQL scripts (DDL, data and grants), demo queries, README and schema diagrams.

DatabaseModelTablesViewsNode typesEdge typesRecordsDemo queriesDownload
chinookRelational1100015,60723.zip
e-commerceHybrid306930,42030.zip
healthcareGraph0081172,83424.zip
movie-lensGraph00452,249,01439.zip
nba2014-2015Graph008936,91525.zip
northwindGraph00996,01325.zip
northwind-relRelational118003,30826.zip
olympics1988-2004Relational114003,57026.zip
sakilaRelational1500046,26836.zip
star-warsGraph006487124.zip

chinook

Relational Download chinook.zip 557 KB

Chinook models a digital-media store — an "iTunes"-style catalogue.
Customers buy tracks on invoices; tracks belong to albums by artists and are classified by genre and media type; a small staff of employees supports the customers and reports up a management chain; and tracks are grouped into user playlists.
It is loaded as a fully relational CoraDB database and queried with ordinary ANSI SQL.

11tables
0views
0node types
0edge types
15,607records
Schema diagram of the chinook demo database
Database schema · click to enlarge
Records by object
TypeObjectRecords
Tablesplaylist_track8,715
track3,503
invoice_line2,240
invoice412
album347
artist275
customer59
genre25
playlist18
employee8
media_type5
Total table rows15,607
Sample query

The 10 best-selling artists by revenue (through album -> track -> line).

SELECT ar.name AS artist, ROUND(SUM(il.unit_price * il.quantity), 2) AS revenue
FROM invoice_line il
JOIN track t ON t.track_id = il.track_id
JOIN album al ON al.album_id = t.album_id
JOIN artist ar ON ar.artist_id = al.artist_id
GROUP BY ar.artist_id, ar.name
ORDER BY revenue DESC
LIMIT 10;

You can find more demo queries in each demo database.

e-commerce

Hybrid Download e-commerce.zip 493 KB

A hybrid relational + graph dataset modelling an online athletic-apparel and gear store.
Customers place orders for products; products belong to categories and are made by brands and offered by suppliers; everything is anchored to geographic cities.
It also captures lightweight social signals — which brands a customer follows and which products they like.

The transactional side (orders, order_items) is stored as relational tables; the master/reference data (customers, products, categories, brands, suppliers, cities) is stored as graph vertices and edges, so a single query can combine both worlds.

3tables
0views
6node types
9edge types
30,420records
Schema diagram of the e-commerce demo database
Database schema · click to enlarge
Records by object
TypeObjectRecords
Tablesorders2,914
order_items11,230
countries25
Total table rows14,169
Nodesproduct2,123
customer1,000
city120
brand106
supplier29
category32
Total nodes3,410
Edgespart_of3,626
manufactures2,143
available_at2,123
follows1,934
likes1,851
resides_in1,000
located_at106
located_in29
distributes29
Total edges12,841
Sample query

Who are our 5 best customers by total amount spent, and what city are they in?

SELECT cu.company_name, ci.name AS city,
  SUM(oi.quantity * p.unit_price * (1 - oi.discount_pct / 100.0)) AS totalSpent
FROM MATCH
  (cu:customer)-[:resides_in]->(ci:city),
  orders o,
  order_items oi,
  product p
WHERE o.customer_id = cu.id
AND oi.order_id = o.id
AND oi.product_id = p.id
GROUP BY cu.id, cu.company_name, ci.name
ORDER BY totalSpent DESC
LIMIT 5;

You can find more demo queries in each demo database.

A pure graph dataset built from FDA Adverse Event Reporting System (FAERS) pharmacovigilance data.
Each case is a single adverse-event report, linked to the drugs involved (as primary suspect, secondary suspect, concomitant or interacting), the reactions the patient experienced, the resulting outcome, the patient’s age group, the therapy received, the reporting source and the manufacturer that registered the report.
Every object is a vertex or edge, making it a natural showcase for connected-data questions.

0tables
0views
8node types
11edge types
72,834records
Schema diagram of the healthcare demo database
Database schema · click to enlarge
Records by object
TypeObjectRecords
Nodescase4,307
reaction2,701
drug2,500
therapy1,721
manufacturer136
outcome6
age_group5
report_source5
Total nodes11,381
Edgeshas_reaction21,069
is_concomitant8,393
prescribed5,441
resulted_in4,461
falls_under4,307
registered4,307
reported_by4,307
is_primary_suspect3,830
is_secondary_suspect3,616
received1,721
is_interacting1
Total edges61,453
Sample query

Which manufacturers' primary-suspect drugs were involved in fatal cases, and how many?

SELECT m.name, COUNT(ca) AS deathCases
FROM MATCH
  (m:manufacturer)-[:registered]->(ca:`case`),
  (ca:`case`)-[:resulted_in]->(o:outcome),
  (ca:`case`)-[:is_primary_suspect]->(d:drug)
WHERE o.name = 'Death'
GROUP BY m.name
ORDER BY deathCases DESC
LIMIT 10;

You can find more demo queries in each demo database.

The classic MovieLens movie-rating dataset (GroupLens) loaded as a property graph, built by merging the MovieLens small and 1M releases into one dataset and enriched with film cast.
Viewers rate and tag movies, every movie belongs to one or more genres, and actors play in movies — a natural fit for recommendation-style traversals (co-ratings, taste profiles, genre overlap) alongside rating and demographic analytics.

0tables
0views
4node types
5edge types
2,249,014records
Schema diagram of the movie-lens demo database
Database schema · click to enlarge
Records by object
TypeObjectRecords
Nodesmovie10,676
actor8,152
viewer6,650
genre19
Total nodes25,497
Edgesrated1,101,045
tagged1,028,409
played_in66,705
has_genre23,310
is_friend_with4,048
Total edges2,223,517
Sample query

Combine actors + ratings: Tom Hanks's movies, best-rated first.

SELECT m.title, AVG(r.rating) AS avg_rating, COUNT(r) AS ratings
FROM MATCH (a:actor)-[:played_in]->(m:movie),
  (v:viewer)-[r:rated]->(m:movie)
WHERE a.name = 'Tom Hanks'
GROUP BY m.title
ORDER BY avg_rating DESC;

You can find more demo queries in each demo database.

A pure graph dataset covering a single NBA season (2014-2015) — the regular season, the playoffs and the All-Star Game.
It describes the teams, players, coaches, executives and referees of the league and connects them through the games and playoff series they took part in.
Most of the interesting information lives on the edges: per-game box-score statistics, season totals, per-game results and refereeing assignments.

0tables
0views
8node types
9edge types
36,915records
Schema diagram of the nba2014-2015 demo database
Database schema · click to enlarge
Records by object
TypeObjectRecords
Nodesgame1,311
player492
referee67
coach34
executive32
team30
series15
all_star_game1
Total nodes1,982
Edgesplays_in_game27,630
presides3,932
competes_in_game2,622
plays_for575
is_part_of_series81
coaches34
manages32
plays_in_all_star_game24
presides_all_star_game3
Total edges34,933
Sample query

Stephen Curry and LeBron James meetings in the finals.

SELECT DISTINCT p1.name, p2.name, s.round, g1.matchup
FROM MATCH
  (p1:player)-[:plays_in_game]->(g1:game),
  (g1:game)-[:is_part_of_series]->(s:series),
  (s:series)<-[:is_part_of_series]-(g2:game),
  (g2:game)<-[:plays_in_game]-(p2:player)
WHERE p1.name LIKE '%Curry%'
AND p2.name LIKE '%LeBron%';

You can find more demo queries in each demo database.

A graph version of Microsoft’s classic Northwind sample, modelling a small food-and-beverage trading company: customers place orders for products, products belong to categories and come from suppliers, orders are handled by employees and delivered by shippers, and employees are organized into sales territories and regions with a management hierarchy.
Here every object is a graph vertex or edge — even orders and order lines.

0tables
0views
9node types
9edge types
6,013records
Schema diagram of the northwind demo database
Database schema · click to enlarge
Records by object
TypeObjectRecords
Nodesorder830
customer91
product77
territory53
supplier29
employee9
category8
region4
shipper3
Total nodes1,104
Edgesorders2,155
purchased830
sold830
ships830
part_of77
supplies77
in_region53
in_territory49
reports_to8
Total edges4,909
Sample query

Which products are most often ordered together with "Chai"?

SELECT p2.product_name, COUNT(o) AS timesTogether
FROM MATCH (p1:product)<-[:orders]-(o:`order`),
  (o:`order`)-[:orders]->(p2:product)
WHERE p1.product_name = 'Chai'
GROUP BY p2.product_name
ORDER BY timesTogether DESC
LIMIT 10;

You can find more demo queries in each demo database.

northwind-rel

Relational Download northwind-rel.zip 540 KB

The classic Microsoft Northwind trading company as a fully relational CoraDB schema.
It records the company’s products (organized into categories and bought from suppliers), the customers who buy them, the orders those customers place (each order a set of line items in order_details, shipped by one of three shippers), and the employees who take the orders — including a reports-to management chain — together with the sales territories and regions those employees cover.
It showcases primary/foreign keys, a self-referencing key, composite-key link tables and views.

11tables
8views
0node types
0edge types
3,308records
Schema diagram of the northwind-rel demo database
Database schema · click to enlarge
Records by object
TypeObjectRecords
Tablesorder_details2,155
orders830
territories53
employee_territories49
customers91
products77
suppliers29
categories8
employees9
region4
shippers3
Total table rows3,308
Viewsorder_subtotals— (computed)
order_details_extended— (computed)
alphabetical_list_of_products— (computed)
current_product_list— (computed)
products_above_average_price— (computed)
quarterly_orders— (computed)
product_sales_for_1997— (computed)
category_sales_for_1997— (computed)
Sample query

Revenue generated by each employee (sales rep).

SELECT e.[first_name] || ' ' || e.[last_name] AS [employee],
       ROUND(SUM(od.[unit_price] * od.[quantity] * (1 - od.[discount])), 2) AS [revenue]
FROM [employees] e
INNER JOIN [orders] o ON e.[employee_id] = o.[employee_id]
INNER JOIN [order_details] od ON o.[order_id] = od.[order_id]
GROUP BY e.[employee_id], e.[first_name], e.[last_name]
ORDER BY [revenue] DESC;

You can find more demo queries in each demo database.

olympics1988-2004

Relational Download olympics1988-2004.zip 405 KB

A relational dataset modelling the Olympic Games, deliberately scoped to the five editions with complete medal results — Seoul 1988, Barcelona 1992, Atlanta 1996, Sydney 2000 and Athens 2004.
It covers the participating countries, the athletes and the events they competed in, the stadiums that hosted them, the medals won, the real worldwide sponsors of each edition, and the individual editions themselves.
Every athlete, event, stadium and country in the database actually takes part in one of the five Games.

11tables
4views
0node types
0edge types
3,570records
Schema diagram of the olympics1988-2004 demo database
Database schema · click to enlarge
Records by object
TypeObjectRecords
Tablesathlete_result1,935
athlete1,332
event115
country92
olympic_games_sponsorship53
stadium23
continent7
olympic_games5
medal3
event_gender3
athlete_gender2
Total table rows3,570
Viewscountry_medals— (computed)
continent_medals— (computed)
country_host_cities— (computed)
olympic_sponsors— (computed)
Sample query

Medal table for the 2004 (Athens) Olympics. (top 10)

SELECT c.[name] AS [country], COUNT(*) AS [medals]
FROM [athlete_result] oa
JOIN [athlete] a ON oa.[athlete_id] = a.[id]
JOIN [country] c ON a.[country_iso3] = c.[iso3]
JOIN [medal] m ON oa.[medal_code] = m.[code]
WHERE oa.`year` = 2004
GROUP BY c.[name]
ORDER BY [medals] DESC
LIMIT 10;

You can find more demo queries in each demo database.

sakila

Relational Download sakila.zip 1.0 MB

The classic MySQL Sakila sample, modelling a chain of DVD-rental stores: customers rent film copies (inventory) from stores, staff record the rentals and take payments, and films are described by category, language and cast.
It is loaded as a fully relational CoraDB database.
The transactional core is rental and payment; the reference data is the film catalogue, the physical stock, the people and the geography chain (address to city to country).

15tables
0views
0node types
0edge types
46,268records
Schema diagram of the sakila demo database
Database schema · click to enlarge
Records by object
TypeObjectRecords
Tablespayment16,044
rental16,044
film_actor5,462
inventory4,581
film1,000
film_category1,000
address603
city600
customer599
actor200
country109
category16
language6
store2
staff2
Total table rows46,268
Sample query

Versatile actors: those who appear in films of 3 or more categories.

SELECT a.first_name, a.last_name, COUNT(DISTINCT fc.category_id) AS categories
FROM actor a
JOIN film_actor fa ON fa.actor_id = a.actor_id
JOIN film_category fc ON fc.film_id = fa.film_id
GROUP BY a.actor_id, a.first_name, a.last_name
HAVING COUNT(DISTINCT fc.category_id) >= 3
ORDER BY categories DESC, a.last_name
LIMIT 10;

You can find more demo queries in each demo database.

A pure graph dataset built from the public SWAPI (Star Wars API) data covering the six-film Skywalker saga — the original and prequel trilogies, episodes I to VI.
It describes the films and the screen characters, planets, species, vehicles and starships that appear in them, along with each character’s homeworld and species and who pilots which craft.
Two edges are heterogeneous, connecting more than one type of vertex.

0tables
0views
6node types
4edge types
871records
Schema diagram of the star-wars demo database
Database schema · click to enlarge
Records by object
TypeObjectRecords
Nodesscreen_character82
planet60
vehicle39
species37
starship36
film6
Total nodes260
Edgesappeared_in372
homeworld118
of78
pilot43
Total edges611
Sample query

In which films did both "Han Solo" and "Chewbacca" appear?

SELECT f.title
FROM MATCH
  (h:screen_character)-[:appeared_in]->(f:film),
  (ch:screen_character)-[:appeared_in]->(f:film)
WHERE h.name = 'Han Solo'
AND ch.name = 'Chewbacca';

You can find more demo queries in each demo database.

Try them with the CoraDB apps

Load a database into your CoraDB with its DDL.sql and DML.sql scripts, then query it in WebSQL or Magos, explore its graph in Graph Viewer, or migrate a relational one with Relational-to-Graph.

Explore with Magos