You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
381 lines
7.8 KiB
SQL
381 lines
7.8 KiB
SQL
--
|
|
-- PostgreSQL database dump
|
|
--
|
|
|
|
-- Dumped from database version 13.9 (Debian 13.9-0+deb11u1)
|
|
-- Dumped by pg_dump version 13.9 (Debian 13.9-0+deb11u1)
|
|
|
|
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;
|
|
|
|
SET default_tablespace = '';
|
|
|
|
SET default_table_access_method = heap;
|
|
|
|
--
|
|
-- Name: horses; Type: TABLE; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
CREATE TABLE public.horses (
|
|
id integer NOT NULL,
|
|
name character varying(30),
|
|
farm character varying(30),
|
|
breed character varying(50),
|
|
prize integer,
|
|
date_won date
|
|
);
|
|
|
|
|
|
ALTER TABLE public.horses OWNER TO jrisacher;
|
|
|
|
--
|
|
-- Name: horses_id_seq; Type: SEQUENCE; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
CREATE SEQUENCE public.horses_id_seq
|
|
AS integer
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
ALTER TABLE public.horses_id_seq OWNER TO jrisacher;
|
|
|
|
--
|
|
-- Name: horses_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
ALTER SEQUENCE public.horses_id_seq OWNED BY public.horses.id;
|
|
|
|
|
|
--
|
|
-- Name: names; Type: TABLE; Schema: public; Owner: mmccormack
|
|
--
|
|
|
|
CREATE TABLE public.names (
|
|
place integer NOT NULL,
|
|
horses character varying(50) NOT NULL,
|
|
rider_num integer NOT NULL
|
|
);
|
|
|
|
|
|
ALTER TABLE public.names OWNER TO mmccormack;
|
|
|
|
--
|
|
-- Name: names_id_seq; Type: SEQUENCE; Schema: public; Owner: mmccormack
|
|
--
|
|
|
|
CREATE SEQUENCE public.names_id_seq
|
|
AS integer
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
ALTER TABLE public.names_id_seq OWNER TO mmccormack;
|
|
|
|
--
|
|
-- Name: names_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: mmccormack
|
|
--
|
|
|
|
ALTER SEQUENCE public.names_id_seq OWNED BY public.names.place;
|
|
|
|
|
|
--
|
|
-- Name: prizes; Type: TABLE; Schema: public; Owner: mmccormack
|
|
--
|
|
|
|
CREATE TABLE public.prizes (
|
|
place integer NOT NULL,
|
|
prize character varying(50) NOT NULL
|
|
);
|
|
|
|
|
|
ALTER TABLE public.prizes OWNER TO mmccormack;
|
|
|
|
--
|
|
-- Name: prizes_place_seq; Type: SEQUENCE; Schema: public; Owner: mmccormack
|
|
--
|
|
|
|
CREATE SEQUENCE public.prizes_place_seq
|
|
AS integer
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
ALTER TABLE public.prizes_place_seq OWNER TO mmccormack;
|
|
|
|
--
|
|
-- Name: prizes_place_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: mmccormack
|
|
--
|
|
|
|
ALTER SEQUENCE public.prizes_place_seq OWNED BY public.prizes.place;
|
|
|
|
|
|
--
|
|
-- Name: rider; Type: TABLE; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
CREATE TABLE public.rider (
|
|
rider_num integer NOT NULL,
|
|
name character varying(50) NOT NULL,
|
|
id integer NOT NULL
|
|
);
|
|
|
|
|
|
ALTER TABLE public.rider OWNER TO jrisacher;
|
|
|
|
--
|
|
-- Name: rider_id_seq; Type: SEQUENCE; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
CREATE SEQUENCE public.rider_id_seq
|
|
AS integer
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
ALTER TABLE public.rider_id_seq OWNER TO jrisacher;
|
|
|
|
--
|
|
-- Name: rider_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
ALTER SEQUENCE public.rider_id_seq OWNED BY public.rider.id;
|
|
|
|
|
|
--
|
|
-- Name: rider_rider_num_seq; Type: SEQUENCE; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
CREATE SEQUENCE public.rider_rider_num_seq
|
|
AS integer
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
ALTER TABLE public.rider_rider_num_seq OWNER TO jrisacher;
|
|
|
|
--
|
|
-- Name: rider_rider_num_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
ALTER SEQUENCE public.rider_rider_num_seq OWNED BY public.rider.rider_num;
|
|
|
|
|
|
--
|
|
-- Name: horses id; Type: DEFAULT; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
ALTER TABLE ONLY public.horses ALTER COLUMN id SET DEFAULT nextval('public.horses_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: names place; Type: DEFAULT; Schema: public; Owner: mmccormack
|
|
--
|
|
|
|
ALTER TABLE ONLY public.names ALTER COLUMN place SET DEFAULT nextval('public.names_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: prizes place; Type: DEFAULT; Schema: public; Owner: mmccormack
|
|
--
|
|
|
|
ALTER TABLE ONLY public.prizes ALTER COLUMN place SET DEFAULT nextval('public.prizes_place_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: rider rider_num; Type: DEFAULT; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
ALTER TABLE ONLY public.rider ALTER COLUMN rider_num SET DEFAULT nextval('public.rider_rider_num_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: rider id; Type: DEFAULT; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
ALTER TABLE ONLY public.rider ALTER COLUMN id SET DEFAULT nextval('public.rider_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Data for Name: horses; Type: TABLE DATA; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
COPY public.horses (id, name, farm, breed, prize, date_won) FROM stdin;
|
|
1 calypso sleipnir stables thoroughbred 1000 2005-03-12
|
|
2 sunny sleipnir stables thoroughbred 500 2012-07-15
|
|
3 Eevee sleipnir stables paint 300 2020-12-20
|
|
4 wally Shenandoah stables Icelandic horse 300 2020-12-20
|
|
5 calypso sleipnir stables thoroughbred 800 2011-06-23
|
|
6 Inny Burgundy Farm quarer horse 1000 2007-04-04
|
|
7 calypso sleipnir stables thoroughbred 2000 2003-01-13
|
|
8 Eevee sleipnir stables paint 100 2021-03-07
|
|
9 Inny Burgundy Farm quarer horse 200 2008-03-14
|
|
10 wally Shenandoah stables Icelandic horse 400 2021-09-22
|
|
11 Virginia Marithiel Mustang 900 2001-08-17
|
|
\.
|
|
|
|
|
|
--
|
|
-- Data for Name: names; Type: TABLE DATA; Schema: public; Owner: mmccormack
|
|
--
|
|
|
|
COPY public.names (place, horses, rider_num) FROM stdin;
|
|
1 Calypso 20
|
|
2 Inny 15
|
|
3 Eevee 30
|
|
4 Inara 6
|
|
5 shlipnir 18
|
|
6 Wally 17
|
|
7 Sunny 35
|
|
8 Bullet 7
|
|
9 Virginia 22
|
|
10 Squid 54
|
|
\.
|
|
|
|
|
|
--
|
|
-- Data for Name: prizes; Type: TABLE DATA; Schema: public; Owner: mmccormack
|
|
--
|
|
|
|
COPY public.prizes (place, prize) FROM stdin;
|
|
1 $1,000
|
|
2 $950
|
|
3 $900
|
|
4 $800
|
|
5 $700
|
|
6 $600
|
|
7 $500
|
|
8 $400
|
|
9 $300
|
|
10 $200
|
|
\.
|
|
|
|
|
|
--
|
|
-- Data for Name: rider; Type: TABLE DATA; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
COPY public.rider (rider_num, name, id) FROM stdin;
|
|
20 Luke 1
|
|
15 Rowan 2
|
|
30 Dylan 3
|
|
6 libby 4
|
|
18 Mark 5
|
|
17 Owen 6
|
|
35 Kyle 7
|
|
7 Marin 8
|
|
22 Lacey 9
|
|
54 Matthew 10
|
|
\.
|
|
|
|
|
|
--
|
|
-- Name: horses_id_seq; Type: SEQUENCE SET; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
SELECT pg_catalog.setval('public.horses_id_seq', 11, true);
|
|
|
|
|
|
--
|
|
-- Name: names_id_seq; Type: SEQUENCE SET; Schema: public; Owner: mmccormack
|
|
--
|
|
|
|
SELECT pg_catalog.setval('public.names_id_seq', 8, true);
|
|
|
|
|
|
--
|
|
-- Name: prizes_place_seq; Type: SEQUENCE SET; Schema: public; Owner: mmccormack
|
|
--
|
|
|
|
SELECT pg_catalog.setval('public.prizes_place_seq', 1, false);
|
|
|
|
|
|
--
|
|
-- Name: rider_id_seq; Type: SEQUENCE SET; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
SELECT pg_catalog.setval('public.rider_id_seq', 10, true);
|
|
|
|
|
|
--
|
|
-- Name: rider_rider_num_seq; Type: SEQUENCE SET; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
SELECT pg_catalog.setval('public.rider_rider_num_seq', 1, false);
|
|
|
|
|
|
--
|
|
-- Name: horses horses_pkey; Type: CONSTRAINT; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
ALTER TABLE ONLY public.horses
|
|
ADD CONSTRAINT horses_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: names names_pkey; Type: CONSTRAINT; Schema: public; Owner: mmccormack
|
|
--
|
|
|
|
ALTER TABLE ONLY public.names
|
|
ADD CONSTRAINT names_pkey PRIMARY KEY (rider_num);
|
|
|
|
|
|
--
|
|
-- Name: prizes prizes_pkey; Type: CONSTRAINT; Schema: public; Owner: mmccormack
|
|
--
|
|
|
|
ALTER TABLE ONLY public.prizes
|
|
ADD CONSTRAINT prizes_pkey PRIMARY KEY (place);
|
|
|
|
|
|
--
|
|
-- Name: rider rider_pkey; Type: CONSTRAINT; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
ALTER TABLE ONLY public.rider
|
|
ADD CONSTRAINT rider_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: id; Type: INDEX; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
CREATE INDEX id ON public.rider USING btree (rider_num);
|
|
|
|
|
|
--
|
|
-- Name: rider rider_rider_num_fkey; Type: FK CONSTRAINT; Schema: public; Owner: jrisacher
|
|
--
|
|
|
|
ALTER TABLE ONLY public.rider
|
|
ADD CONSTRAINT rider_rider_num_fkey FOREIGN KEY (rider_num) REFERENCES public.names(rider_num);
|
|
|
|
|
|
--
|
|
-- PostgreSQL database dump complete
|
|
--
|
|
|