--
--

\restrict dS9A8q0bbApuVk3OvI2vKmy9wPRh5gLZOko41wWbDEi3SfbSi2NMSEmDVAjVuAx


-- Started on 2026-02-16 21:58:56 UTC

SELECT pg_catalog.set_config('search_path', '', false);

--
-- TOC entry 3392 (class 1262 OID 233007)
-- Name: library; Type: DATABASE; Schema: -; Owner: postgres
--

CREATE DATABASE library WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PROVIDER = libc LOCALE = 'en_US.utf8';


ALTER DATABASE library OWNER TO postgres;

\unrestrict dS9A8q0bbApuVk3OvI2vKmy9wPRh5gLZOko41wWbDEi3SfbSi2NMSEmDVAjVuAx
\connect library
\restrict dS9A8q0bbApuVk3OvI2vKmy9wPRh5gLZOko41wWbDEi3SfbSi2NMSEmDVAjVuAx

SELECT pg_catalog.set_config('search_path', '', false);



--
-- TOC entry 223 (class 1259 OID 234245)
-- Name: author; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.author (
    author_id integer NOT NULL,
    name character varying NOT NULL
);


ALTER TABLE public.author OWNER TO postgres;

--
-- TOC entry 222 (class 1259 OID 234244)
-- Name: author_author_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.author_author_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.author_author_id_seq OWNER TO postgres;

--
-- TOC entry 3393 (class 0 OID 0)
-- Dependencies: 222
-- Name: author_author_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.author_author_id_seq OWNED BY public.author.author_id;


--
-- TOC entry 219 (class 1259 OID 233023)
-- Name: book; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.book (
    book_id integer NOT NULL,
    title character varying(100) NOT NULL,
    publication_year date NOT NULL,
    author_id integer
);


ALTER TABLE public.book OWNER TO postgres;

--
-- TOC entry 218 (class 1259 OID 233022)
-- Name: book_book_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.book_book_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.book_book_id_seq OWNER TO postgres;

--
-- TOC entry 3394 (class 0 OID 0)
-- Dependencies: 218
-- Name: book_book_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.book_book_id_seq OWNED BY public.book.book_id;


--
-- TOC entry 221 (class 1259 OID 233030)
-- Name: loan; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.loan (
    loan_id integer NOT NULL,
    book_id integer NOT NULL,
    member_id integer NOT NULL,
    loan_date date NOT NULL
);


ALTER TABLE public.loan OWNER TO postgres;

--
-- TOC entry 220 (class 1259 OID 233029)
-- Name: loan_loan_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.loan_loan_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.loan_loan_id_seq OWNER TO postgres;

--
-- TOC entry 3395 (class 0 OID 0)
-- Dependencies: 220
-- Name: loan_loan_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.loan_loan_id_seq OWNED BY public.loan.loan_id;


--
-- TOC entry 216 (class 1259 OID 233011)
-- Name: member; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.member (
    member_id integer NOT NULL,
    address character varying(100) NOT NULL,
    postal_code integer NOT NULL,
    name character varying(100)
);


ALTER TABLE public.member OWNER TO postgres;

--
-- TOC entry 215 (class 1259 OID 233010)
-- Name: member_member_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.member_member_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.member_member_id_seq OWNER TO postgres;

--
-- TOC entry 3396 (class 0 OID 0)
-- Dependencies: 215
-- Name: member_member_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.member_member_id_seq OWNED BY public.member.member_id;


--
-- TOC entry 217 (class 1259 OID 233017)
-- Name: postal_code; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.postal_code (
    postal_code integer NOT NULL,
    city character varying(100) NOT NULL
);


ALTER TABLE public.postal_code OWNER TO postgres;

--
-- TOC entry 3220 (class 2604 OID 234248)
-- Name: author author_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.author ALTER COLUMN author_id SET DEFAULT nextval('public.author_author_id_seq'::regclass);


--
-- TOC entry 3218 (class 2604 OID 233026)
-- Name: book book_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.book ALTER COLUMN book_id SET DEFAULT nextval('public.book_book_id_seq'::regclass);


--
-- TOC entry 3219 (class 2604 OID 233033)
-- Name: loan loan_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.loan ALTER COLUMN loan_id SET DEFAULT nextval('public.loan_loan_id_seq'::regclass);


--
-- TOC entry 3217 (class 2604 OID 233014)
-- Name: member member_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.member ALTER COLUMN member_id SET DEFAULT nextval('public.member_member_id_seq'::regclass);


--
-- TOC entry 3386 (class 0 OID 234245)
-- Dependencies: 223
-- Data for Name: author; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.author VALUES (2, 'Karen Blixen') ON CONFLICT DO NOTHING;
INSERT INTO public.author VALUES (3, 'Peter Høeg') ON CONFLICT DO NOTHING;
INSERT INTO public.author VALUES (4, 'Tove Ditlevsen') ON CONFLICT DO NOTHING;
INSERT INTO public.author VALUES (5, 'Jussi Adler-Olsen') ON CONFLICT DO NOTHING;
INSERT INTO public.author VALUES (6, 'Herman Bang') ON CONFLICT DO NOTHING;
INSERT INTO public.author VALUES (7, 'Martin A. Hansen') ON CONFLICT DO NOTHING;
INSERT INTO public.author VALUES (8, 'Svend Åge Madsen') ON CONFLICT DO NOTHING;
INSERT INTO public.author VALUES (9, 'Ida Jessen') ON CONFLICT DO NOTHING;
INSERT INTO public.author VALUES (10, 'Leif Davidsen') ON CONFLICT DO NOTHING;
INSERT INTO public.author VALUES (11, 'Jesper Wung-Sung') ON CONFLICT DO NOTHING;


--
-- TOC entry 3382 (class 0 OID 233023)
-- Dependencies: 219
-- Data for Name: book; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.book VALUES (1, 'Den lange rejse', '1977-01-01', NULL) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (2, 'Vintereventyr', '1964-01-01', NULL) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (3, 'Out of Africa', '1937-01-01', 2) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (4, 'Miss Smilla''s Feeling for Snow', '1992-01-01', 3) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (5, 'Barndom', '1967-01-01', 4) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (6, 'Kvinden i buret', '2007-01-01', 5) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (7, 'Fasandræberne', '2008-01-01', 5) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (8, 'Gift', '1971-01-01', 4) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (9, 'Kvinden i buret', '2007-01-01', 5) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (10, 'Fasandræberne', '2008-01-01', 5) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (11, 'Flaskepost fra P', '2009-01-01', 5) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (12, 'Ved Vejen', '1886-01-01', 6) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (13, 'Stuk', '1887-01-01', 6) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (14, 'Løgneren', '1950-01-01', 7) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (15, 'Orm og Tyr', '1952-01-01', 7) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (16, 'Se dagens lys', '1980-01-01', 8) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (17, 'Tugt og utugt i mellemtiden', '1976-01-01', 8) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (18, 'Den der lyver', '2001-01-01', 9) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (19, 'ABC', '2009-01-01', 9) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (20, 'Den russiske sangerinde', '1988-01-01', 10) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (21, 'Lenins bodyguard', '1998-01-01', 10) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (22, 'En anden gren', '2017-01-01', 11) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (23, 'Kopierne', '2010-01-01', 11) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (24, 'Nordkraft', '2002-01-01', NULL) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (25, 'Intet', '2000-01-01', NULL) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (26, 'Vi, de druknede', '2006-01-01', NULL) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (27, 'Planen', '2015-01-01', NULL) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (28, 'Hærværk', '1930-01-01', NULL) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (29, 'Den kroniske uskyld', '1958-01-01', NULL) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (30, 'Kongens fald', '1900-01-01', NULL) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (31, 'Livsens ondskab', '1899-01-01', NULL) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (32, 'Pelle Erobreren', '1906-01-01', NULL) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (33, 'Gengældelsen', '2019-01-01', NULL) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (34, 'Offer 2117', '2018-01-01', 5) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (35, 'Selfies', '2016-01-01', 5) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (36, 'Skyggerne', '2011-01-01', 5) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (37, 'Journal 64', '2010-01-01', 5) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (38, 'Marco-effekten', '2012-01-01', 5) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (39, 'Den grænseløse', '2014-01-01', 5) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (40, 'Natrium Chlorid', '2021-01-01', 5) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (41, 'Syv m2 med lås', '2023-01-01', 5) ON CONFLICT DO NOTHING;
INSERT INTO public.book VALUES (42, 'Offer uden ansigt', '2015-01-01', 5) ON CONFLICT DO NOTHING;


--
-- TOC entry 3384 (class 0 OID 233030)
-- Dependencies: 221
-- Data for Name: loan; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.loan VALUES (1, 2, 2, '2026-02-13') ON CONFLICT DO NOTHING;
INSERT INTO public.loan VALUES (2, 1, 3, '2026-02-02') ON CONFLICT DO NOTHING;
INSERT INTO public.loan VALUES (3, 3, 5, '2026-01-15') ON CONFLICT DO NOTHING;
INSERT INTO public.loan VALUES (4, 4, 6, '2026-01-20') ON CONFLICT DO NOTHING;
INSERT INTO public.loan VALUES (5, 6, 7, '2026-02-01') ON CONFLICT DO NOTHING;
INSERT INTO public.loan VALUES (6, 7, 2, '2026-02-10') ON CONFLICT DO NOTHING;
INSERT INTO public.loan VALUES (13, 3, 5, '2026-01-05') ON CONFLICT DO NOTHING;
INSERT INTO public.loan VALUES (14, 5, 6, '2026-01-10') ON CONFLICT DO NOTHING;
INSERT INTO public.loan VALUES (15, 7, 7, '2026-01-12') ON CONFLICT DO NOTHING;
INSERT INTO public.loan VALUES (16, 9, 8, '2026-01-20') ON CONFLICT DO NOTHING;
INSERT INTO public.loan VALUES (7, 12, 9, '2026-01-22') ON CONFLICT DO NOTHING;
INSERT INTO public.loan VALUES (8, 16, 10, '2026-01-25') ON CONFLICT DO NOTHING;
INSERT INTO public.loan VALUES (9, 18, 11, '2026-02-01') ON CONFLICT DO NOTHING;
INSERT INTO public.loan VALUES (10, 20, 12, '2026-02-03') ON CONFLICT DO NOTHING;
INSERT INTO public.loan VALUES (11, 24, 13, '2026-02-08') ON CONFLICT DO NOTHING;
INSERT INTO public.loan VALUES (12, 30, 14, '2026-02-12') ON CONFLICT DO NOTHING;


--
-- TOC entry 3379 (class 0 OID 233011)
-- Dependencies: 216
-- Data for Name: member; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.member VALUES (2, 'Ringgaden 10', 7500, 'Ole Olsen') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (3, 'Østervej 22', 7500, 'Ellen Hansen') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (4, 'Ellevang 12', 7490, 'Peter Jensen') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (5, 'Nørrebrogade 88', 2200, 'Mads Sørensen') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (6, 'Skolegade 14', 8000, 'Anne Mikkelsen') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (7, 'Havnevej 3', 3700, 'Lars Poulsen') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (8, 'Amagerbrogade 55', 2300, 'Line Thomsen') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (9, 'Kongensgade 10', 5000, 'Rasmus Lund') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (10, 'Slotsgade 3', 6000, 'Camilla Nielsen') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (11, 'Strandbygade 22', 6700, 'Henrik Kristensen') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (12, 'Banegårdspladsen 4', 8000, 'Sofie Mortensen') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (13, 'Randersvej 88', 8200, 'Anders Holm') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (14, 'Boulevarden 9', 9000, 'Maria Jakobsen') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (15, 'Studiestræde 14', 1000, 'Emil Poulsen') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (16, 'Gammel Kongevej 100', 2000, 'Laura Skov') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (17, 'Jagtvej 23', 2200, 'Nikolaj Friis') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (18, 'Øresundsvej 6', 2300, 'Freja Dahl') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (19, 'Overgade 44', 5000, 'Simon Beck') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (20, 'Bredgade 2', 6000, 'Julie Rasmussen') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (21, 'Englandsgade 18', 6700, 'Thomas Olesen') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (22, 'Trøjborgvej 5', 8200, 'Ida Clausen') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (23, 'Vestergade 77', 8000, 'Mathias Iversen') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (24, 'Algade 1', 9000, 'Katrine Møller') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (25, 'Pilestræde 9', 1000, 'Sebastian Krogh') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (26, 'Howitzvej 45', 2000, 'Helene Dam') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (27, 'Kapelvej 33', 2200, 'Mikkel Brandt') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (28, 'Islands Brygge 62', 2300, 'Sara Winther') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (29, 'Vindegade 19', 5000, 'Oliver Nygaard') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (30, 'Akseltorv 11', 6000, 'Pernille Falk') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (31, 'Skolegade 27', 6700, 'Lasse Birk') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (32, 'Viborgvej 120', 8200, 'Stine Ravn') ON CONFLICT DO NOTHING;
INSERT INTO public.member VALUES (33, 'Danmarksgade 8', 9000, 'Christian Feld') ON CONFLICT DO NOTHING;


--
-- TOC entry 3380 (class 0 OID 233017)
-- Dependencies: 217
-- Data for Name: postal_code; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.postal_code VALUES (7500, 'Holstebro') ON CONFLICT DO NOTHING;
INSERT INTO public.postal_code VALUES (8520, 'Lystrup') ON CONFLICT DO NOTHING;
INSERT INTO public.postal_code VALUES (7490, 'Hirtshals') ON CONFLICT DO NOTHING;
INSERT INTO public.postal_code VALUES (3700, 'Rønne') ON CONFLICT DO NOTHING;
INSERT INTO public.postal_code VALUES (2200, 'København N') ON CONFLICT DO NOTHING;
INSERT INTO public.postal_code VALUES (8000, 'Aarhus C') ON CONFLICT DO NOTHING;
INSERT INTO public.postal_code VALUES (1000, 'København K') ON CONFLICT DO NOTHING;
INSERT INTO public.postal_code VALUES (2000, 'Frederiksberg') ON CONFLICT DO NOTHING;
INSERT INTO public.postal_code VALUES (2300, 'København S') ON CONFLICT DO NOTHING;
INSERT INTO public.postal_code VALUES (5000, 'Odense C') ON CONFLICT DO NOTHING;
INSERT INTO public.postal_code VALUES (6000, 'Kolding') ON CONFLICT DO NOTHING;
INSERT INTO public.postal_code VALUES (6700, 'Esbjerg') ON CONFLICT DO NOTHING;
INSERT INTO public.postal_code VALUES (8200, 'Aarhus N') ON CONFLICT DO NOTHING;
INSERT INTO public.postal_code VALUES (9000, 'Aalborg') ON CONFLICT DO NOTHING;


--
-- TOC entry 3397 (class 0 OID 0)
-- Dependencies: 222
-- Name: author_author_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.author_author_id_seq', 11, true);


--
-- TOC entry 3398 (class 0 OID 0)
-- Dependencies: 218
-- Name: book_book_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.book_book_id_seq', 42, true);


--
-- TOC entry 3399 (class 0 OID 0)
-- Dependencies: 220
-- Name: loan_loan_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.loan_loan_id_seq', 17, true);


--
-- TOC entry 3400 (class 0 OID 0)
-- Dependencies: 215
-- Name: member_member_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.member_member_id_seq', 33, true);


--
-- TOC entry 3230 (class 2606 OID 234252)
-- Name: author author_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.author
    ADD CONSTRAINT author_pkey PRIMARY KEY (author_id);


--
-- TOC entry 3226 (class 2606 OID 233028)
-- Name: book book_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.book
    ADD CONSTRAINT book_pkey PRIMARY KEY (book_id);


--
-- TOC entry 3228 (class 2606 OID 233035)
-- Name: loan loan_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.loan
    ADD CONSTRAINT loan_pkey PRIMARY KEY (loan_id);


--
-- TOC entry 3222 (class 2606 OID 233016)
-- Name: member member_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.member
    ADD CONSTRAINT member_pkey PRIMARY KEY (member_id);


--
-- TOC entry 3224 (class 2606 OID 233021)
-- Name: postal_code postal_code_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.postal_code
    ADD CONSTRAINT postal_code_pkey PRIMARY KEY (postal_code);


--
-- TOC entry 3232 (class 2606 OID 234253)
-- Name: book book_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.book
    ADD CONSTRAINT book_author_id_fkey FOREIGN KEY (author_id) REFERENCES public.author(author_id) NOT VALID;


--
-- TOC entry 3233 (class 2606 OID 233046)
-- Name: loan loan_book_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.loan
    ADD CONSTRAINT loan_book_id_fkey FOREIGN KEY (book_id) REFERENCES public.book(book_id) NOT VALID;


--
-- TOC entry 3234 (class 2606 OID 233041)
-- Name: loan loan_member_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.loan
    ADD CONSTRAINT loan_member_id_fkey FOREIGN KEY (member_id) REFERENCES public.member(member_id) NOT VALID;


--
-- TOC entry 3231 (class 2606 OID 233036)
-- Name: member member_postal_code_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.member
    ADD CONSTRAINT member_postal_code_fkey FOREIGN KEY (postal_code) REFERENCES public.postal_code(postal_code) NOT VALID;


-- Completed on 2026-02-16 21:58:56 UTC

--
--

\unrestrict dS9A8q0bbApuVk3OvI2vKmy9wPRh5gLZOko41wWbDEi3SfbSi2NMSEmDVAjVuAx

