Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

ACP Asgmnt-X-3 Databases 14-Jan-2021

1. THEORY
How does the JDBC framework work? Explain with the help of a figure how Java applications get
access to various databases.

2. IMPLEMENTATION
Suppose a MySQL database named ‘hospital’ under-lies a Java application. The database contains
four tables
i) patients_t
ii) doctors_t
iii) rooms _t
iv) beds_t

Write the code for a Java application that


a) Connects with the databases
b) Retrieves details of all patients
c) Retrieves details of the doctors treating a particular patient, whose ID is provided by the user
d) Retrieves bed_numbers of all beds that are currently occupied (status = occupied)

NOTE: You may use values of your choice for server-name, username, and password.

You might also like