Comments (2)
init_audiodb_psql.txt:
CREATE TABLE artists (
id serial primary key,
name varchar(40) NOT NULL,
age integer
);
CREATE TABLE albums (
name text NOT NULL,
artist_id int NOT NULL,
PRIMARY KEY(name),
FOREIGN KEY(artist_id) REFERENCES artists(id)
);
CREATE SEQUENCE songs_sequence
start 101
increment 2;
CREATE TABLE songs (
id integer DEFAULT nextval('songs_sequence'),
song_name text NOT NULL,
album_name text NOT NULL,
PRIMARY KEY(id),
FOREIGN KEY(album_name) REFERENCES albums(name)
);
INSERT INTO artists (name, age) VALUES ('Kanye West', 44);
INSERT INTO artists (name, age) VALUES ('Michael Jackson', NULL);
INSERT INTO artists (name, age) VALUES ('Otis Redding', 26);
INSERT INTO albums (name, artist_id) VALUES ('My Beautiful Dark Twisted Fantasy', 1);
INSERT INTO albums (name, artist_id) VALUES ('Donda', 1);
INSERT INTO albums (name, artist_id) VALUES ('Thriller', 2);
INSERT INTO albums (name, artist_id) VALUES ('Bad', 2);
INSERT INTO albums (name, artist_id) VALUES ('Pain in My Heart', 3);
INSERT INTO songs (song_name, album_name) VALUES ('Devil in a New Dress', 'My Beautiful Dark Twisted Fantasy');
INSERT INTO songs (song_name, album_name) VALUES ('Moon', 'Donda');
INSERT INTO songs (song_name, album_name) VALUES ('Come to Life', 'Donda');
INSERT INTO songs (song_name, album_name) VALUES ('Heaven and Hell', 'Donda');
INSERT INTO songs (song_name, album_name) VALUES ('Beat It', 'Thriller');
INSERT INTO songs (song_name, album_name) VALUES ('Billie Jean', 'Thriller');
INSERT INTO songs (song_name, album_name) VALUES ('Louie Louie', 'Pain in My Heart');
from data-anonymization.
Creating audiodb.dump
from the above init_audiodb_psql.txt
:
dropdb -U postgres audiodb
createdb -U postgres -T template0 audiodb
psql -U postgres -d audiodb -a -f "C:\Users\wenox\Desktop\init_audiodb_psql.txt"
pg_dump -U postgres -v -Fc audiodb > audiodb.dump
Restoring dump:
createdb -U postgres -T template0 audiodb2
pg_restore -U postgres -d audiodb2 -v audiodb.dump
from data-anonymization.
Related Issues (20)
- Anonymisation script: alter column type for suppression
- Prevent adding new operations if suppression is chosen
- Anonymisation: handle shuffle column operation
- Anonymisation: shuffle row operation
- Anonymisation: pattern masking
- Anonymisation: shortening
- Anonymisation: generalisation
- Anonymisation: perturbation
- Anonymisation: random value
- Anonymisation: hashing
- Anonymisation: tokenization
- Anonymisation: substitution
- Anonymisation: validation matrix - frontend
- Anonymisation: validation matrix - backend
- Anonymisation operations: disable for PK, FK
- Outcome generation: steps view
- Worksheet summary: operations table
- Template: restore from script or from compressed archive
- Anonymisation operations: facades and factory
- New system instance preloaded with admin account
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from data-anonymization.