CS 157B: Database Management Systems II April 29 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak.

Slides:



Advertisements
Similar presentations
CS 153: Concepts of Compiler Design August 25 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
Advertisements

Lab3 CPIT 440 Data Mining and Warehouse.
CIS 602 Java and the Web Course Project. Overview Most students who study programming in an Academic setting never create a programming assignment with.
CS 160: Software Engineering August 27 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
CS 46B: Introduction to Data Structures July 30 Class Meeting Department of Computer Science San Jose State University Summer 2015 Instructor: Ron Mak.
1 CSC 440 Database Management Systems JDBC This presentation uses slides and lecture notes available from
CSCI 6962: Server-side Design and Programming JDBC Database Programming.
CS 157B: Database Management Systems II February 27 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
CS 46B: Introduction to Data Structures July 7 Class Meeting Department of Computer Science San Jose State University Summer 2015 Instructor: Ron Mak
CS 157B: Database Management Systems II May 8 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak
CS 160: Software Engineering October 8 Class Meeting
CS 157B: Database Management Systems II January 30 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak.
CS 151: Object-Oriented Design October 3 Class Meeting Department of Computer Science San Jose State University Fall 2013 Instructor: Ron Mak
CS 235: User Interface Design October 15 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
Microsoft Business Intelligence Environment Overview.
JDBC Tutorial MIE456 - Information Systems Infrastructure II Vinod Muthusamy November 4, 2004.
CS 157B: Database Management Systems II February 6 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak.
CS 157B: Database Management Systems II March 20 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak.
CS 157B: Database Management Systems II February 4 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak.
CS 157B: Database Management Systems II January 28 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak.
CS 235: User Interface Design September 22 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
CS 160: Software Engineering October 1 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
CS 160: Software Engineering October 15 Class Meeting
CS 160: Software Engineering October 6 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
CS 157B: Database Management Systems II February 25 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
CS 153: Concepts of Compiler Design August 26 Class Meeting Department of Computer Science San Jose State University Fall 2015 Instructor: Ron Mak
CS 151: Object-Oriented Design September 5 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak
CS 157B: Database Management Systems II April 3 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak.
CS 160: Software Engineering October 22 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
JDBC - Connection The programming involved to establish a JDBC connection is fairly simple. Here are these simple four steps − Import JDBC Packages: Add.
CS 153: Concepts of Compiler Design October 10 Class Meeting Department of Computer Science San Jose State University Fall 2015 Instructor: Ron Mak
CMPE 226 Database Systems October 21 Class Meeting Department of Computer Engineering San Jose State University Fall 2015 Instructor: Ron Mak
CS 151: Object-Oriented Design October 15 Class Meeting Department of Computer Science San Jose State University Fall 2013 Instructor: Ron Mak
CS 174: Web Programming October 14 Class Meeting Department of Computer Science San Jose State University Fall 2015 Instructor: Ron Mak
CMPE 226 Database Systems October 28 Class Meeting
CS 235: User Interface Design November 19 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
CS 160: Software Engineering December 10 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
CS 235: User Interface Design April 30 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
CS 157B: Database Management Systems II April 10 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak.
CS 154 Formal Languages and Computability February 4 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron.
CS 235: User Interface Design March 17 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
CS 157B: Database Management Systems II April 22 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak.
CS 160 and CMPE/SE 131 Software Engineering February 16 Class Meeting Department of Computer Science Department of Computer Engineering San José State.
CS 160 and CMPE/SE 131 Software Engineering February 11 Class Meeting Department of Computer Science Department of Computer Engineering San José State.
CMPE 226 Database Systems April 19 Class Meeting Department of Computer Engineering San Jose State University Spring 2016 Instructor: Ron Mak
CSC 411/511: DBMS Design Dr. Nan WangCSC411_L12_Oracle10g_JDBC 1 Application Development (JDBC)
CS 235: User Interface Design May 12 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
CMPE 226 Database Systems April 12 Class Meeting Department of Computer Engineering San Jose State University Spring 2016 Instructor: Ron Mak
Instructor: Jinze Liu Fall /8/2016Jinze University of Kentucky 2 Database Project Database Architecture Database programming.
CS3220 Web and Internet Programming Database Access with JDBC
Data Virtualization Demoette… ODBC Clients
Market Basket Analysis
CMPE Database Systems Workshop June 15 Class Meeting
Data Virtualization Demoette… ADO.NET Client
CS 153: Concepts of Compiler Design August 29 Class Meeting
Data Virtualization Demoette… JDBC Clients
CS 153: Concepts of Compiler Design October 17 Class Meeting
Advanced Web Automation Using Selenium
CMPE 152: Compiler Design January 25 Class Meeting
CMPE 226 Database Systems April 11 Class Meeting
CMPE 152: Compiler Design August 21 Class Meeting
Using a Database with JDBC
CMPE 152: Compiler Design January 24 Class Meeting
CMPE 280 Web UI Design and Development May 9 Class Meeting
CS3220 Web and Internet Programming Database Access with JDBC
CMPE 152: Compiler Design April 18 – 30 Labs
CS3220 Web and Internet Programming Database Access with JDBC
CMPE 152: Compiler Design March 19 Class Meeting
CS 151: Object-Oriented Design October 8 Class Meeting
Plug-In Architecture Pattern
Presentation transcript:

CS 157B: Database Management Systems II April 29 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak

Department of Computer Science Spring 2013: April 29 CS 157B: Database Management Systems II © R. Mak 2 Midterm Solution: Question 1 a. The measures in the Orders fact table are quantity, revenue, and profit. b. It is not necessary to normalize a dimension table, so the Product table should be left alone.

Department of Computer Science Spring 2013: April 29 CS 157B: Database Management Systems II © R. Mak 3 Midterm Solution: Question 2 a. There are many possibilities for measures, depending on what you want for fact tables. The grain of each measure would depend on how “deep” are the hierarchies of the dimensions, such as down to each class per semester per campus. Examples:  Students: level, major, grade, expenses  Faculty: level, number of classes, number of students  Campus: number of students, graduation rate, tuition _

Department of Computer Science Spring 2013: April 29 CS 157B: Database Management Systems II © R. Mak 4 Midterm Solution: Question 2

Department of Computer Science Spring 2013: April 29 CS 157B: Database Management Systems II © R. Mak 5 Midterm Solution: Question 3 a. Drill down from school year to semester. b. Drill up from department to school. c. Slice: view data from a single campus. d. Dice: view data from several departments in several campuses e. Pivot: view data campus X year vs. year X campus _

Department of Computer Science Spring 2013: April 29 CS 157B: Database Management Systems II © R. Mak 6 Midterm Solution: Question 4 a. The are many forecasts that predictive analytics can make. For example:  student enrollment  grade point average  graduation rate  tuition income  Some possible patterns:  Characterization: What types of students do well in data mining classes?  Clustering: Foreign students take more technical courses.  Evolution: How computer science courses change over time.  Classification: IF computer science major AND high gpa THEN get good job

Department of Computer Science Spring 2013: April 29 CS 157B: Database Management Systems II © R. Mak 7 Publishing Composite Views  Use Composite Studio to tell the Composite Information Server (CIS) to create virtual views. The views consist of data from disparate data sources. In Studio, ask CIS to execute the view and show its contents.  CIS must publish the virtual views in order for client applications to access them. CIS publishes views as database services or as web services. Published as database services, the virtual views appear to come from a physical database. CIS can also publish the virtual views as WSDL-based or RESTful web services.  CIS fetches data from the original data sources in real time to create the views whenever a client application accesses the view.

Department of Computer Science Spring 2013: April 29 CS 157B: Database Management Systems II © R. Mak 8 Publishing as Database Services  When CIS publishes a virtual view as a database service, a client application connects to it and accesses its data as if the view came from a physical database. You can use JDBC or Hibernate. Put Composite’s JDBC driver on your classpath: C:\Composite Software\CIS 6.2.0\apps\jdbc\lib\csjdbc.jar Use Composite’s URL format to connect. See Composite’s Client Interfaces Guide C:\Composite Software\CIS 6.2.0\docs\ClientInterfacesGuide.pdf _ Demo

Department of Computer Science Spring 2013: April 29 CS 157B: Database Management Systems II © R. Mak 9 Publishing as Database Services  Sample connection code: private static final String DATASOURCE = "StudentsDB"; private static final String HOST = "cs08.cs.sjsu.edu"; private static final String USERNAME = "cs157btest"; private static final String PASSWORD = "S13cs157btest"; private static final String DOMAIN = "composite"; private static final int PORT = 9401; private Connection connect() throws ClassNotFoundException, SQLException { Class.forName("cs.jdbc.driver.CompositeDriver"); String url = + HOST + ":" + PORT + "?domain=" + DOMAIN + "&dataSource=" + DATASOURCE; Connection conn = DriverManager.getConnection(url, USERNAME, PASSWORD); CompositeConnection compConn = (CompositeConnection) conn; compConn.clearAllDataSourceCredentials(); compConn.setDataSourceCredentials(DATASOURCE, USERNAME, PASSWORD); return conn; } Demo