Exploring Your DB With Eclipse 101 - Part 2

In my last post I showed you how to download, install, configure and connect the Eclipse Data Tools Platform to an Apache Derby Embedded database. Now I'll show you how to use the tool to create a table and do some basic queries. I'll also show how to set up your ColdFusion DSN to point to this new DB.

At this point if you're playing along at home you've set up your connection and are navigating through the schema in Eclipse. Your user tables will likely be stored in a catalog called 'App'. Right click on tables and choose 'New Table'.

Make some config choices.

You'll now get the table editor dialog.

Here you can name your table and add columns. Just click 'Add Column', highlight that column and rename it. Choose your datatype, set null options, defaults etc. Continue as needed for the rest of your columns.

Click Next and set primary key information.

DTP will now create your table creation SQL script.

To execute, right click and select Execute All (or use Ctrl-Alt-X). Your results will be displyed in the SQL results tab.

At this point you can use DTP to perform any standard SQL query. Select 'New Editor', enter any SQL statement and execute. Your results will be displayed in the SQL Results tab.

Now you'll want CF to hook up with this sweet new emdedded DB. DSN setup is dead simple - just like most other DSNs. Enter a DSN and select Apache Derby Embedded as the DSN type.

Point CF at the DB you created within Eclipse and enter the same credentials. Make any other settings as needed. Note: you do not have to check the 'Create Database' option at this point since it's already created. I don't believe it will hurt anything if you do, but note that the DB already exists.

That is it. CF can now query the Derby DB and you can easily manage it from right inside your favorite IDE.

Comments
cool post. I used DTP for a while now with SQL server. The only thing that annoys me is that it brings up a stupid dialog box when running the SQL statement.

the RDS query viewer is a better tool for just standard SQL statements
# Posted By Pat Branley | 11/20/07 6:04 PM
Can u pls help me witha source code how to insert a checkbox component into a list component in FLASH.
# Posted By kashi | 11/21/07 8:44 AM

Calendar

Sun Mon Tue Wed Thu Fri Sat
  12345
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31   

Subscribe

Enter your email address to subscribe to this blog.

Tags

actionscript ajax blogging cfsnippets coldfusion flash forms flex misc model-glue off topic personal project learn slidesix sql

Recent Comments

More CF+Java: Compiling Classes And Persisting Objects
Getburl said: I have been attempting to get Db4o working in my CF application and I have not succeeded. I would lo... [More]

Thoughts On Ajax Frameworks And ColdFusion/Adobe
Erast said: http://fanniecollins.10gb... emo http://gracetrevino.phree...... [More]

Extending Ext With Ext Extensions
Erast said: http://fanniecollins.10gb... emo http://gracetrevino.phree...... [More]

CF Needs An Open Source Contact List Importer
Kay Smoljak said: Heh, the fact that sites DO it doesn't mean they SHOULD. To us it's ok, but to a non-tech-savvy user... [More]

A Few Project Updates
Helena said: Now punctually what is the situation ? [More]

RSS


coldfusionbloggers

FullAsAGoog MXNA

Consumed By Feed-Squirrel.com