



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: DATABASE SYSTEMS; Subject: COMPUTER SCIENCE; University: Texas A&M University; Term: Summer 1 2008;
Typology: Assignments
1 / 6
This page cannot be seen from the preview
Don't miss anything!




Assigned 5/28/08, DUE in class on 6/4/
The goal of this first homework is to have you claim your MySQL database access using CSNET, and establish the DERBY open source database management system with your Eclipse Java development environment. With these you’ll be able to see SQL in action, and start your understanding of relational data modeling and SQL. Answer specific questions in the document. Turn in your answers via a text file uploaded to CSNET, and turn in a hard copy of your answers at class time on the due date. Make sure you include a signed copy of the Assignment Cover Page posted on the course web site, or your work will not be graded. ANSWERS in red
Assigned 5/28/08, DUE in class on 6/4/
constructed as Java Strings. Two separate plugins are needed to implement Derby under Eclipse: (http://db.apache.org/derby/releases/release-10.4.1.3.cgi)
a. derby_core_plugin - provides the Derby jar files to other plugins in Eclipse. derby_core_plugin_10.4.1.648739.zip
b. derby_ui_plugin - provides an Apache Derby Nature in Eclipse for easy database application development. derby_ui_plugin_1.1.2.zip
You can read here (http://db.apache.org/derby/integrate/plugin_howto.html ) about installing the plugin(s) on your PC. If you are using a CPSC Lab PC, Derby might already be installed. Turn in nothing for this step.
Assigned 5/28/08, DUE in class on 6/4/
create table firsttable (id int primary key, name varchar(25)); insert into firsttable values (10, 'ten'), (20,'twenty'), (30,'thirty'); select * from firsttable; select * from firsttable where id=20; mysql> create table firsttable (id int primary key, name varchar(25)); Query OK, 0 rows affected (0.00 sec)
mysql> insert into firsttable values (10, 'ten'), (20,'twenty'), (30,'thirty'); Query OK, 3 rows affected (0.00 sec) Records: 3 Duplicates: 0 Warnings: 0
mysql> select * from firsttable; +----+--------+ | id | name | +----+--------+ | 10 | ten | | 20 | twenty | | 30 | thirty | +----+--------+ 3 rows in set (0.00 sec)
mysql> select * from firsttable where id=20; +----+--------+ | id | name | +----+--------+ | 20 | twenty | +----+--------+ 1 row in set (0.00 sec)
mysql>