You are to create a relational database of all the classes you have taken. The d
ID: 3769361 • Letter: Y
Question
You are to create a relational database of all the classes you have taken. The database should contain the following:
Number of the class
Name of the class
The faculty member for the class (initials are acceptable)
The quarter and year taken (these can be separate fields)
The subject of the course (math, computer science, English, etc.).
The database should print the list of all the courses. Make sure you are allowing your relational database to accept new tuples as necessary.
Need this assignment in JAVA please.
Explanation / Answer
class college
{
public static void main(string args[])throws exception
{
class.forName("sunjdbc.odbc.jdbcDriver");
string url="jdbc.odbc.ram");
conection con=DriverManager.getconnection(url."ram""trigger");
Statement st=con.createstatement();
st.execute("create table faculty(fname,fno,year);
st.execute("create table course(math,computer,english,fno);
st.execute(insert into faculty(fname,no,year)values(?,?,?);
st.execute(insert into course(math,computer,english,fn)values(?,?,?,?);
st.execute(select fname,no,year,math,com,eng from faculty inner join course on f.fno=c.fno);
st.close();
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.