CS562 Project #1 Assignment Date : October 11th, 2012 Due Date : October 28th, 2012 TA: Lee, Min-Joong.

Slides:



Advertisements
Similar presentations
Copyright  Oracle Corporation, All rights reserved. 2 Java and Databases: An Overview.
Advertisements

Murach’s Java SE 6, C21© 2007, Mike Murach & Associates, Inc.Slide 1.
What is MySQL? MySQL is a relational database management system (A relational database stores data in separate tables rather than putting all the data.
15-Jun-15 JDBC. JDBC is a Sun trademark It is often taken to stand for Java Database Connectivity Java is very standardized, but there are many versions.
1 C. Shahabi Application Programming for Relational Databases Cyrus Shahabi Computer Science Department University of Southern California
Database Management Systems 1 Xintao Wu Oracle Programming Instructor: Xintao Wu.
Oracle SQL*plus John Ortiz. Lecture 10SQL: Overview2 Overview  SQL: Structured Query Language, pronounced S. Q. L. or sequel.  A standard language for.
1 Foundations of Software Design Lecture 27: Java Database Programming Marti Hearst Fall 2002.
Database Management Systems (DBMS)
Advance Computer Programming Java Database Connectivity (JDBC) – In order to connect a Java application to a database, you need to use a JDBC driver. –
Getting connected.  Java application calls the JDBC library.  JDBC loads a driver which talks to the database.  We can change database engines without.
1 CSC 440 Database Management Systems JDBC This presentation uses slides and lecture notes available from
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 David M. Kroenke’s Chapter Seven: SQL for Database Construction and.
Database Management Systems 1 Oracle Programming.
JDBC. What is JDBC JDBC is an acronym for –Java Data Base Connectivity. It allows java/jsp program to connect to any database.
CSE470 Software Engineering Fall Database Access through Java.
True or False? Programming languages can be used to update databases and communicate with other systems. True.
Views, Indexes and JDBC/JSP tutorial Professor: Dr. Shu-Ching Chen TA: Haiman Tian 1.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
MySQL, Java, and JDBC CSE 3330 Southern Methodist University.
JDBC Tutorial MIE456 - Information Systems Infrastructure II Vinod Muthusamy November 4, 2004.
JAVA Database Access. JDBC The Java Database Connectivity (JDBC) API is the industry standard for database- independent connectivity between the Java.
Designing and Developing WS B. Ramamurthy. Plans We will examine the resources available for development of JAX-WS based web services. We need an IDE,
CS 405G: Introduction to Database Systems Database programming.
JDBC Java and Databases, including Postgress. JDBC l Developed by Industry leaders l Three main goals: –JDBC should be an SQL-level API –JDBC should capitalize.
Introduction to JDBC Michelle Lee, Ye Wu & Jeff Offutt SWE 432 Design and Implementation of Software for the Web.
Dr Gordon Russell, Napier University Unit Embedded SQL - V3.0 1 Embedded SQL Unit 5.1.
JDBC Java and Databases. RHS – SOC 2 JDBC JDBC – Java DataBase Connectivity An API (i.e. a set of classes and methods), for working with databases in.
COMP201 Java Programming Topic 15: Database Connectivity JDBC Reading: Chapter 4, Volume 2.
WEB/DB1 DATABASE PROGRAMMING 3JDBC by the ASU Scholars.
CS 1308 Computer Literacy and the Internet
1 CS 430 Database Theory Winter 2005 Lecture 2: General Concepts.
Java Database Connectivity. Java and the database Database is used to store data. It is also known as persistent storage as the data is stored and can.
JDBC. Java.sql.package The java.sql package contains various interfaces and classes used by the JDBC API. This collection of interfaces and classes enable.
1 CS 430 Database Theory Winter 2005 Lecture 14: Additional SQL Topics.
 The Oscars, awarded annually by the Academy of Motion Picture Arts and Sciences, showcase the best in movies, honoring films released in the previous.
12/6/2015B.Ramamurthy1 Java Database Connectivity B.Ramamurthy.
Java and Databases. JDBC Architecture Java Application JDBC API Data Base Drivers AccessSQL Server DB2InformixMySQLSybase.
COMP 321 Week 4. Overview Normalization Entity-Relationship Diagrams SQL JDBC/JDBC Drivers hsqldb Lab 4-1 Introduction.
DATABASE CONNECTIVITY TO MYSQL. Introduction =>A real life application needs to manipulate data stored in a Database. =>A database is a collection of.
Dr Gordon Russell, Napier University Unit Embedde SQL - V2.0 1 Embedded SQL Unit 5.1.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Java JDBC API. A Java API To Access almost any kind of tabular data To Access almost any kind of tabular data Trademarked (not an acronym) Trademarked.
JDBC CS 260 Database Systems. Overview  Introduction  JDBC driver types  Eclipse project setup  Programming with JDBC  Prepared statements  SQL.
CSI 3125, Preliminaries, page 1 JDBC. CSI 3125, Preliminaries, page 2 JDBC JDBC stands for Java Database Connectivity, which is a standard Java API (application.
Basics of JDBC.
Basics of JDBC Session 14.
Advanced Java Session 5 New York University School of Continuing and Professional Studies.
Web Programming Assistant Professor Xiaozhong Liu
Introduction to JDBC Instructor: Mohamed Eltabakh 1.
JDBC Java and Databases. SWC – JDBC JDBC – Java DataBase Connectivity An API (i.e. a set of classes and methods), for working with databases in.
1 JDBC – Java Database Connectivity CS , Spring 2010.
Intro to JDBC Joseph Sant Applied Computing and Engineering Sciences Sheridan ITAL.
SQL pepper. Why SQL File I/O is a great deal of code Optimal file organization and indexing is critical and a great deal of code and theory implementation.
CS520 Web Programming Object-Relational Mapping with Hibernate and JPA (I) Chengyu Sun California State University, Los Angeles.
JSP/Database Connectivity Instructor: Dr. M. Anwar Hossain.
Java and database. 3 Relational Databases A relational Database consists of a set of simple rectangular tables or relations The column headings are.
JDBC Statements The JDBC Statement, CallableStatement, and PreparedStatement interfaces define the methods and properties that enables to send SQL or PL/SQL.
Instructor: Jinze Liu Fall /8/2016Jinze University of Kentucky 2 Database Project Database Architecture Database programming.
JSP and DB.
Fundamental of Databases
JDBC 15-Apr-18.
Advanced Web Automation Using Selenium
JDBC 21-Aug-18.
HW#4 Making Simple BBS Using JDBC
Prof: Dr. Shu-Ching Chen TA: Sheng Guan
Client Access, Queries, Stored Procedures, JDBC
JDBC 15-Nov-18.
Presentation transcript:

CS562 Project #1 Assignment Date : October 11th, 2012 Due Date : October 28th, 2012 TA: Lee, Min-Joong

 SQL queries which you can type in at the SQL prompt.  INTERACTIVE SQL is good for:  defining database structure ▪ Create database, tables ….  generating low-volume, ad hoc queries  prototyping

 SQL is a ‘non-procedural’ language.  INTERACTIVE SQL is not good for the more sophisticated applications.  SQL can be embedded within procedural programming languages(host language).  Supports  highly customized applications  background applications running without user intervention  database manipulation which exceeds the abilities of simple SQL.

 USE ESQL - old school style!  ESQL/c, ESQL/C++, ESQL/COBOL,…  ESQL is precompiled by preprocessor.  Use APIs  JDBC  ADO.NET  ODBC  …

 For example,  JDBC, java  Get names of awards which ‘Winona Ryder ‘ won. … Statement stmt1 = conn.createStatement(); Statement stmt2 = conn.createStatement(); ResultSet rs1 = stmt1.executeQuery("select actorID from actor where actor name = ‘Winona Ryder ‘ “); while (rs1.next()) { name = rs1.getString(1); } rs1.close(); rs1 = stmt1.executeQuery(“select awordID from actorAwarded where actorID = “ + name ); while (rs1.next()) { ResultSet rs2 = stmt2.executeQuery(“select awordName from award where awardID = “+ rs.getInt(1) ); System.Out.Println(rs2.getString(1)); } rs2.close();

 Translate given statements into SQLs and process the query using your application.  Initial data input  Insert award data  Insert rating data  Select statements  Update statements  Delete statements

Movie NameDirectorActorRoleGenrePublisherRelate date Edward Scissorhands Tim BurtonJohnny DeppMain actorFantasy, Romance 20th Century Fox Presents Winona Ryder Main actor Alice In Wonderland Tim BurtonJohnny DeppMain actorFantasy, Adventure, Family Korea Sony Pictures Anne Hathaway Main actor The Social Network David Fincher Jesse Eisenberg Main actorDramaKorea Sony Pictures Andrew Garfield Supporting Actor The Dark Knight Christophe r Nolan Christian Bale Main actorAction, Drama Warner Brothers Korea Heath Ledger Main actorMystery, Thriller Actor NameDate of birth Date of death Gender Johnny Depp Male Winona Ryder Female Anne Hathaway Female Christian Bale Male Heath Ledger Male Jesse Eisenberg Male Andrew Garfield Male Customer NameDate of birthGender Bob Male John Male Jack Male Jill Female Bell Female Director NameDate of birthDate of death Tim Burton David Fincher Christopher Nolan

 Some queries are should be implemented using an embedded SQL method rather than using a single SQL statement or a trigger.  Unspecified queries can be implemented in any ways. … 4. Select the names of the movies whose actor are dead. (Use embedded SQL method) 5. Select the names of the directors who cast the same actor more than once. (Translate this statement to a single SQL statement; do not use embedded SQL method) 6. Select the names of the movies and the genres, where movies have the common genre. (Translate this statement to a single SQL statement. Use sub-query SQL) …

You should show the results for translated inserts/deletes/updates queries and all the updated tables for each statement. Before run your application, assume that the database is empty.

 Recommended environments  Language : JAVA  IDE : Eclipse  DBMS : MySQL ▪ JDBC download:  DBMS setting ▪ Database name : CS562_studentID (ex., CS562_ ) ▪ Root id : root // password : cs562 ▪ Tables are should be named as I descried in the initial data table. ▪ Database should be installed at localhost(local machine)  If cannot understand above description, read JDBC Introduction.JDBC Introduction

 Files to submit : cs562_studentid.zip includes the following files.  Program source files  README.txt ▪ How to run your program. ▪ What you have implemented and what you have not. ▪ Your implementation assumption if there are any.  Submission  E mail :  Mail subject : [cs562 project#1] studentid_name ▪ ex) [cs562 project#1] _John

 Due date : Oct. 28, 2012 Midnight  Penalty : 20% per day  Score  Create table processing (20%)  Insert processing (20%)  Update processing (15%)  Query processing (15%)  Delete processing (15%)  README and comment (15%)