bbrumm / databasestar Goto Github PK
View Code? Open in Web Editor NEWAll of the SQL scripts used on my website.
All of the SQL scripts used on my website.
Hi! I've made a few changes in the Oracle Superheroes DB and created a pull request :)
As most databases need to be able to roll back, it is recommended to have the create database in a separate script.
Hello
Under what license are released your database scripts? I was looking for some sample data to teach SQL couple people inside my company, but I wouldn't like to use anyone intellectual property without consent.
I stumbled upon your website and superhero seems cool ;-)
Date format is 0000-00-00
movie_id : 380097
(380097,'America Is Still the Place',0,'','1971 post civil rights San Francisco seemed like the perfect place for a black Korean War veteran and his family to realize their dream of economic independence and his own chance to be his a "boss". Charlie Walker would soon find out how naive he was. In a city full of impostors and naysayers, he refused to take "No" for an answer. Until a catastrophic disaster opened a door that had never been open to a black man before. This is a story about what happened when he stepped through that door, with both feet!.',0.000000,'0000-00-00',0,0,'Released','',0.00,0),
This error happens on file sample_databases/sample_db_movies/postgres/09_movie_genres.sql
DROP TABLE IF EXISTS movies.movie_genres;
CREATE TABLE movies.movie_genres (
movie_id INT DEFAULT NULL,
genre_id INT DEFAULT NULL,
CONSTRAINT fk_mg_genre FOREIGN KEY (genre_id) REFERENCES movies.genre (genre_id),
CONSTRAINT fk_mg_movie FOREIGN KEY (movie_id) REFERENCES movies.movie (movie_id)
);
INSERT INTO movie_genres VALUES
(5,35),
(5,80),
(11,12),
...
The INSERT INTO instruction won't execute because the table name is wrong, as it is not on the public schema. This line should fix this
INSERT INTO movies.movie_genres VALUES
Line 46 in posts/sample_data_rank.sql seems to be incorrect; an extra ")" after the 7
VALUES (7), 'Michelle', 'Randall', 150, 'F');
Hi, in the 5th and 6th scripts, you should add USE olympics;
because, in some places, you mentioned attributes without mentioning databases.
Escaping of apostrophes on oracle scripts are done wrong (you are using \' instead of '') see reference :
https://stackoverflow.com/questions/5139770/escape-character-in-sql-server
You can resolve this by using the following python script:
import os
directory = 'oracle'
def function(f):
with open(f, 'r') as file:
data = file.read()
data = data.replace("\\'","''" )
data = data.replace("\\\"", "\"\"")
with open(f, 'w') as file:
file.write(data)
for filename in os.listdir(directory):
f = os.path.join(directory, filename)
if os.path.isfile(f):
function(f)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.