Select Git revision
testdb-20231123-04.sql
Forked from
Peter Gerwinski / Datenbanken und Datensicherheit
75 commits behind the upstream repository.
Peter Gerwinski authored
testdb-20231123-04.sql 2.97 KiB
--
-- PostgreSQL database dump
--
-- Dumped from database version 15.5 (Debian 15.5-0+deb12u1)
-- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
DROP TABLE public.tier;
DROP VIEW public.lied_auf_cd;
DROP TABLE public.lied;
DROP TABLE public.cd;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: cd; Type: TABLE; Schema: public; Owner: dbs
--
CREATE TABLE public.cd (
cd_id integer PRIMARY KEY AUTO_INCREMENT,
albumtitel text,
interpret text,
gruendungsjahr integer,
erscheinungsjahr integer
);
ALTER TABLE public.cd OWNER TO dbs;
--
-- Name: lied; Type: TABLE; Schema: public; Owner: dbs
--
CREATE TABLE public.lied (
cd_id integer,
track integer,
titel text,
FOREIGN KEY(cd_id) REFERENCES cd(cd_id)
);
ALTER TABLE public.lied OWNER TO dbs;
--
-- Name: lied_auf_cd; Type: VIEW; Schema: public; Owner: dbs
--
CREATE VIEW public.lied_auf_cd AS
SELECT cd.cd_id,
cd.albumtitel,
cd.interpret,
cd.gruendungsjahr,
cd.erscheinungsjahr,
lied.track,
lied.titel
FROM (public.cd
JOIN public.lied ON ((cd.cd_id = lied.cd_id)));
ALTER TABLE public.lied_auf_cd OWNER TO dbs;
--
-- Name: test; Type: TABLE; Schema: public; Owner: dbs
--
CREATE TABLE public.tier (
id integer PRIMARY KEY AUTO_INCREMENT,
name text,
tierart text
);
ALTER TABLE public.tier OWNER TO dbs;
--
-- Data for Name: cd; Type: TABLE DATA; Schema: public; Owner: dbs
--
COPY public.cd (cd_id, albumtitel, interpret, gruendungsjahr, erscheinungsjahr) FROM stdin;
4711 Not That Kind Anastacia 1999 2000
4712 Wish You Were Here Pink Floyd 1965 1975
4713 Freak of Nature Anastacia 1999 2001
4714 Songs for the Deaf Queens of the Stone Age 1996 2002
\.
--
-- Data for Name: lied; Type: TABLE DATA; Schema: public; Owner: dbs
--
COPY public.lied (cd_id, track, titel) FROM stdin;
4711 1 Not That Kind
4711 2 I'm Otta Love
4711 3 Cowboys & Kisses
4712 1 Shine On You Crazy Diamond
4713 1 Paid my Dues
4733 1 4'33"
\.
--
-- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: dbs
--
COPY public.tier (name, tierart, id) FROM stdin;
Esmeralda Spinne 1
Timmy Hund 2
Dio Katze 3
Tusnelda Spinne 4
Ragnar Katze \N
Putzi Ratte \N
Felix Troll \N
Rex Ameise \N
\.
--
-- PostgreSQL database dump complete
--