The input file holds the name of a publisher (e.g. Wiley India).
Write a program that reads this publisher name and lists every physical copy of every book published by that publisher. Join the catalogue to its copies.
For each matching copy print, in this exact column order:
title accession_no year
Output rules:
one row per line, columns separated by a single space;
order the rows by accession_no (ascending).
Note: Do not hard-code the database name — your program is run against a different database instance for evaluation. The input file is in the same folder as your program.
For the database connection, use these variables:
database = sys.argv[1] # database name, from the command line
user = os.environ.get('PGUSER')
password = os.environ.get('PGPASSWORD')
host = os.environ.get('PGHOST')
port = os.environ.get('PGPORT')
The input is a file named publisher.txt in the same folder — A single line: the publisher name to look up..
Database: LIS
primary keyforeign keyarrow points to the referenced columndrag to pan