Tutorium 6 create table statements
This commit is contained in:
74
Tutorium_6_NoSQL Create Table
Normal file
74
Tutorium_6_NoSQL Create Table
Normal file
@@ -0,0 +1,74 @@
|
||||
CREATE TABLE "IDBS01_Q12025"."json_parser" (
|
||||
id serial PRIMARY KEY,
|
||||
glossary jsonb
|
||||
);
|
||||
|
||||
BEGIN TRANSACTION;
|
||||
INSERT INTO "IDBS01_Q12025"."json_parser" (glossary) VALUES
|
||||
('{
|
||||
"glossary": {
|
||||
"title": "example glossary",
|
||||
"GlossDiv": {
|
||||
"title": "S",
|
||||
"GlossList": {
|
||||
"GlossEntry": {
|
||||
"ID": "SGML",
|
||||
"SortAs": "SGML",
|
||||
"GlossTerm": "Standard Generalized Markup Language",
|
||||
"Acronym": "SGML",
|
||||
"Abbrev": "ISO 8879:1986",
|
||||
"GlossDef": {
|
||||
"para": "A meta-markup language, used to create markup languages such as DocBook.",
|
||||
"GlossSeeAlso": ["GML", "XML"]
|
||||
},
|
||||
"GlossSee": "markup"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}');
|
||||
|
||||
INSERT INTO "IDBS01_Q12025"."json_parser"(glossary) VALUES
|
||||
('{
|
||||
"glossary": {
|
||||
"title": "example glossary2",
|
||||
"GlossDiv": {
|
||||
"title": "S2",
|
||||
"GlossList": {
|
||||
"GlossEntry": {
|
||||
"ID": "SGML",
|
||||
"SortAs": "SGML",
|
||||
"Acronym": "SGML",
|
||||
"Abbrev": "ISO 8879:1986",
|
||||
"GlossDef": {
|
||||
"para": "A meta-markup language, used to create markup languages such as DocBook.",
|
||||
"GlossSeeAlso": ["GML", "XML"]
|
||||
},
|
||||
"GlossSee": "markup2"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}');
|
||||
|
||||
commit;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- host directory /var/lib/docker/volumes/pgadmin_iu_postgres_data/_data
|
||||
--
|
||||
|
||||
CREATE TABLE "IDBS01_Q12025"."pdf_files" (
|
||||
id serial PRIMARY KEY,
|
||||
file_name text,
|
||||
file_data bytea
|
||||
);
|
||||
|
||||
INSERT INTO "IDBS01_Q12025"."pdf_files" (file_name, file_data)
|
||||
VALUES ('Quittung.pdf', pg_read_binary_file('/home/Quittung.pdf'));
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user