160 likes | 324 Views
Carnegie Mellon Univ. Dept. of Computer Science 15-415 - Database Applications. C. Faloutsos Guidelines for project. Overview. concepts of SQL programs walkthrough of HW3_Create.java walkthrough of showAll.java (all on the web site). ORACLE. see the two Java programs: HW3_Create.java
E N D
Carnegie Mellon Univ.Dept. of Computer Science15-415 - Database Applications C. Faloutsos Guidelines for project
Overview • concepts of SQL programs • walkthrough of HW3_Create.java • walkthrough of showAll.java • (all on the web site) 15-415 - C. Faloutsos
ORACLE see the two Java programs: HW3_Create.java showAll.java Concepts embedded SQL cursor 15-415 - C. Faloutsos
Outline of an SQL application establish connection with ORACLE server authenticate (user/password) execute SQL statement(s) process results close connection 15-415 - C. Faloutsos
Pictorially: dbclass.intro.cs.cmu.edu andrew machine eg., sun4.andrew JDBC/ODBC Windows NT box; with ORACLE Server HW3_Create.java HW3_Create.class 15-415 - C. Faloutsos
interesting observation very important point HW1_Create.java • Purpose: to load the parent-child table • No need for you to understand it fully - but you MUST run it, to load the (parent, child) table! legend: 15-415 - C. Faloutsos
Walk-through HW3_Create.java 15-415 - C. Faloutsos
Walk-through HW3_Create.java 15-415 - C. Faloutsos
Walk-through HW3_Create.java 15-415 - C. Faloutsos
Walk-through HW3_Create.java • rest of program: • read input file • insert one tuple at a time • close connection 15-415 - C. Faloutsos
Walk-through HW3_Create.java 15-415 - C. Faloutsos
Overview • concepts of SQL programs • walkthrough of HW3_Create.java • walkthrough of showAll.java 15-415 - C. Faloutsos
Walk-through showAll.java • purpose: print all (parent, child) pairs • note: very useful for the project: just change • (a) the SQL statements • (b) the processing of the results 15-415 - C. Faloutsos
Walk-through showAll.java 15-415 - C. Faloutsos
Walk-through showAll.java 15-415 - C. Faloutsos
Conclusions • concepts of SQL programs • necessary: HW1_Create.java • modify showAll.java wrt • SQL statements • result processing 15-415 - C. Faloutsos