The input file holds a building name (e.g. Ramanujan).
List every section scheduled in that building together with its course title and the room's capacity. Join section to course (on course_id) and to classroom (on building and room_number), keeping only sections whose building equals the input value.
Output one row per section, columns space-separated in this exact order:
course_title sec_id semester year capacity
Order the rows by course_title, then sec_id, then semester, then year (all 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 building.txt in the same folder — A single building name, e.g. Ramanujan..
primary keyforeign keyarrow points to the referenced columndrag to pan