Presentation is loading. Please wait.

Presentation is loading. Please wait.

Movie Manager by Patrick Wesley and Chris Grey Internet Database Project for CS 8630 – Summer 2004 Dr. Guimaraes.

Similar presentations


Presentation on theme: "Movie Manager by Patrick Wesley and Chris Grey Internet Database Project for CS 8630 – Summer 2004 Dr. Guimaraes."— Presentation transcript:

1 Movie Manager by Patrick Wesley and Chris Grey Internet Database Project for CS 8630 – Summer 2004 Dr. Guimaraes

2 Introduction We set out to Create a Web based Management Application for our Home Movie Collections that would: We set out to Create a Web based Management Application for our Home Movie Collections that would: - Maintain a movie inventory - Track movies loaned to friends and family - Store information about our movie collection - Store contact information for loaned movies - Publish our collection to the Web so family and friends can see what they can borrow

3 Technologies Used Oracle 9i Personal Edition Oracle 9i Personal Edition Java Database Connectivity (JDBC) Java Database Connectivity (JDBC) Apache Tomcat – Web Server Apache Tomcat – Web Server Java Server Pages Java Server Pages HTML HTML SQL SQL

4 The Application was Created by: Gathering Specifications Gathering Specifications Creating an E-R Diagram Creating an E-R Diagram Creating a Relational Schema Creating a Relational Schema Creating the Tables in Oracle Creating the Tables in Oracle Developing Java Server Pages Developing Java Server Pages Deploying JSP in Apache Tomcat Deploying JSP in Apache Tomcat Using and testing the Application Using and testing the Application

5 Specifications Were Gathered by: Generating ideas on the Application’s uses Generating ideas on the Application’s uses Discussing the functionality Discussing the functionality Discussing the information we wanted to store Discussing the information we wanted to store Documenting and compiling information to ensure correctness Documenting and compiling information to ensure correctness

6 The E-R Diagram

7 The Relational Schema

8 Tables Created in Oracle ALTER TABLE ACTOR DROP CONSTRAINT ACTOR_pk; DROP TABLE ACTOR; CREATE TABLE ACTOR ( ACTOR_ID NUMBER(4), ACTOR_ID NUMBER(4), ACTOR_FNAME VARCHAR2(30), ACTOR_FNAME VARCHAR2(30), ACTOR_LNAMEVARCHAR2(30), ACTOR_LNAMEVARCHAR2(30), ACTOR_GENDERVARCHAR2(1), ACTOR_GENDERVARCHAR2(1), CONSTRAINT ACTOR_pk PRIMARY KEY (ACTOR_ID) CONSTRAINT ACTOR_pk PRIMARY KEY (ACTOR_ID));

9 Java Server Page Created Elements Used Elements Used - HTML - SQL - JDBC - Java

10 The HTML <html><head> Manage actors Manage actors </head></html> Or use JSP to generate your HTML <%Out.println(“<html><head>”); Out.println(“ Manage actors ”); Out.println(“<head>”);Out.println(“</html>”);%>

11 The SQL - The SQL statements are generated and then executed sql = dbconn.prepareStatement ("select max(actor_id) mmov from actor"); ("select max(actor_id) mmov from actor");sql.executeQuery();

12 The JDBC //Load Oracle Driver Class.forName("oracle.jdbc.driver.OracleDriver"); //establish connection to database con = DriverManager.getConnection ("jdbc:oracle:thin:@Host:Port:DB", “user", “pass"); ("jdbc:oracle:thin:@Host:Port:DB", “user", “pass"); //create sql statement sql = dbconn.prepareStatement("select max(actor_id) mmov from actor"); sql = dbconn.prepareStatement("select max(actor_id) mmov from actor"); //get results of query //get results of query results = sql.executeQuery(); results = sql.executeQuery();

13 The Java - Used various functions -out.println(“ ”); -out.println(“ ”); -Integer.parseInt(variable_name); -variablename.equals(“var2”); - This area was not fully explored - This area was not fully explored

14 General Flow of the JSPs 1) Import Java Libraries 1) Import Java Libraries 2) Generate 2) Generate 3) Get values from the calling HTML Form or no values if default or initial page load. 3) Get values from the calling HTML Form or no values if default or initial page load. 4) Connect to DB and Execute SQL 4) Connect to DB and Execute SQL 5) Display Results and Generate Form 5) Display Results and Generate Form 6) Generate Buttons on HTML form for Actions and generate ending HTML tags. 6) Generate Buttons on HTML form for Actions and generate ending HTML tags.

15 Deploying the JSP (For Apps on Local Hosts only) - copy your.jsp file to: $tomcat_home_dir\webapps\root directory. $tomcat_home_dir\webapps\root directory. - Launch your Web Browser and type: - http://localhost:port/myapp.jsp http://localhost:port/myapp.jsp - For more info: http://jakarta.apache.org/tomcat/

16 Using Movie Manager

17 Manage Movies

18 Query in Manage Movies Form

19 Query Continued

20 Query Complete

21 Add / Delete Actor

22 Actor Added

23 Other Forms

24 Other Forms Continued

25 Difficulties Encountered - The variables used in the SQL statements have to be checked and initialized if they are not set to a value. - Configuring Apache Tomcat with the correct Class Path (Oracle Drivers).

26 What took the longest? Developing the Application took the longest, but experimenting and choosing the technology to use and configuring the technologies chosen consumed a great deal of time as well. Developing the Application took the longest, but experimenting and choosing the technology to use and configuring the technologies chosen consumed a great deal of time as well.

27 What would we do differently? We would have chosen Oracle, JSP, and Apache Tomcat immediately and created a more advanced application using Java’s full potential. We would have chosen Oracle, JSP, and Apache Tomcat immediately and created a more advanced application using Java’s full potential.

28 Improvements? The application needs more error checking. This was limited due to time constraints. The application needs more error checking. This was limited due to time constraints. The appearance needs to be improved. The appearance needs to be improved. More data needs to be collected. More data needs to be collected. Reports would be nice. Reports would be nice.

29 Questions? ??????????????????????????????????? ? ? ???????????????????????????????????


Download ppt "Movie Manager by Patrick Wesley and Chris Grey Internet Database Project for CS 8630 – Summer 2004 Dr. Guimaraes."

Similar presentations


Ads by Google