Presentation is loading. Please wait.

Presentation is loading. Please wait.

P2-S1 MySQL 2003 SJSU -- CmpE-- M.E. Fayad Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.

Similar presentations


Presentation on theme: "P2-S1 MySQL 2003 SJSU -- CmpE-- M.E. Fayad Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering."— Presentation transcript:

1 P2-S1 MySQL 2003 SJSU -- CmpE-- M.E. Fayad Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San José State University One Washington Square San José, CA 95192-0180 http://www.engr.sjsu.edu/~fayad

2 P2-S2 MySQL 2003 SJSU -- CmpE-- M.E. Fayad Project 2: The MySQL Relational Database

3 P2-S3 MySQL 2003 SJSU -- CmpE-- M.E. Fayad Lesson Objectives Understand Project 2 Learn about: î Project Deliverables î Setting up MySQL î Java & JDBC î Sample Code

4 P2-S4 MySQL 2003 SJSU -- CmpE-- M.E. Fayad Project 2 You will use your Schema From Project One to build a database system. You may adjust it if necessary or desired. Come up with 10 creative and useful queries in SQL. You will use MySQL database, Java, and JDBC. You will create two separate programs 4

5 P2-S5 MySQL 2003 SJSU -- CmpE-- M.E. Fayad 2 Programs First Program Will: –Connect To the MySQL database –Create a Project 2 Database –Create all tables with proper attributes and attribute types –Insert at least 10 data entries for each table.

6 P2-S6 MySQL 2003 SJSU -- CmpE-- M.E. Fayad 2 Programs Second program will –Connect to the database –Execute at least 10 queries again your database –Print the results in a text or html file, or a simple GUI. –The results must be organized and easy to read. State the SQL query and show the result.

7 P2-S7 MySQL 2003 SJSU -- CmpE-- M.E. Fayad MySQL Setup Go to www.mysql.comwww.mysql.com Download 1. MySQL 4.0 Production Release Database 2. MySQL Control Center GUI Client 3. MySQL Connector/J 3.0 Production Release API

8 P2-S8 MySQL 2003 SJSU -- CmpE-- M.E. Fayad Database Setup Unzip the archive mysql-4.0.12-win2.zip Run setup.exe Click next->next->… etc.. Accept all defaults Reboot your System to start the database service. Run winmysqladmin.exe located in C:\mysql\bin by double clicking the icon. Enter a user name and password.

9 P2-S9 MySQL 2003 SJSU -- CmpE-- M.E. Fayad GUI Client Setup Unzip the archive mysqlcc-0.9.1-win32.zip Run Setup.exe Click next->next->next->… etc… Done

10 P2-S10 MySQL 2003 SJSU -- CmpE-- M.E. Fayad Connecter/J Setup This package contains the JDBC driver and provides the API used to interface with the database using java. Unzip the Archive –mysql-connector-java-3.0.6-stable.zip Find the “com” folder and place this folder in your java class path Test by trying to compile the sample code

11 P2-S11 MySQL 2003 SJSU -- CmpE-- M.E. Fayad Sample Code Two Java files available on the course’s website: –Project2.java This file contains sample code to connect to the database, create a project2 database, add tables to this database, and add a one tuple of data. –Project2Query.java Connects to the database, executes on query, and displays the results to the command line.

12 P2-S12 MySQL 2003 SJSU -- CmpE-- M.E. Fayad Questions?


Download ppt "P2-S1 MySQL 2003 SJSU -- CmpE-- M.E. Fayad Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering."

Similar presentations


Ads by Google