Generate a table based on multiple tables from database in python

38 views Asked by At

So basically I am doing coursework for my uni about covid vaccination program. So for storing data I settled on mysqlite3 as I have experience in using it. Right now, I am having a problem with generating a list of confirmed appointments. It's not that I cant generate an appointment table, what I am trying to do is that I want my generated table to have name instead of icpatient and name of the centre* instead of idcentre. How do I solve this problem

appointment

idappointment icpatient idcentre date time slotsremaining
1 561203089865 2 5/12/2021 15:00 59

centres

idcentre name address postcodecentre slot
1 Kl Central 50470 Kuala Lumpur, Federal Territory of Kuala Lumpur 50470 50
2 Spice Centre 108C, Jalan Tun Dr Awang, Bayan Baru, 11900 Bayan Lepas, Pulau Pinang 11900 60
3 Kulim Hospital Jalan Hospital, Kampung Chabang Tiga, 09000 Kulim, Kedah 09000 30

patients

icpatient name password
990329071234 James Bond Nightfire007
561203089865 Subramaniam Subramaniam1956

I got not python coding for this part as I am struggling to think of a right method to approach this problem.. I will attach the db file here

I use python3 and sqlite3

covid.db - > https://www.mediafire.com/file/1y6gxbfyqrlvwgc/covid.db/file

0

There are 0 answers