Features
Using Sybase WorkSpace on Eclipse with SQL Anywhere
Building a Java project
Oct. 10, 2007 12:00 PM
Digg This!
Page 1 of 2
next page »
This tutorial shows you how to get started with SQL Anywhere using Sybase WorkSpace tools in an Eclipse development environment. It doesn't describe how to code with JDBC or how to code in Java; there are many resources available to assist you with these topics. Rather, this document will help you build a Java project by putting together the required components in the Eclipse IDE. More specifically, this is a step-by-step tutorial that takes you through creating a new Java project and using it with Sybase WorkSpace.
SQL Anywhere is a suite of databases and data exchange technologies that pack a lot of power and performance into a small footprint. The SQL Anywhere Server database supports 64-bit and 32-bit servers on all the major platforms all the way down to small handheld devices. Many ISVs embed the SQL Anywhere Server database into their applications because it can scale from client/server environments with hundreds, even thousands, of users and storing hundreds of gigabytes of data, but can also be easily hidden in an application that runs on laptop computers requiring little or no IT support. You can learn more about SQL Anywhere by visiting www.ianywhere.com/sqlanywhere.
WorkSpace is a development tool that plugs into Eclipse. In fact, part of its functionality builds on the Eclipse Data Tooling Platform (DTP) project. It offers a wide range of tools and capabilities including enterprise modeling, database development, Web application development, SOA development, and mobile development all in the one package. You can learn more about WorkSpace by visiting www.sybase.com/products/development/workspace.
Before You Begin
If you don't already have a copy of Sybase WorkSpace, you can download a free evaluation version from www.sybase.com/products/development/workspace.
Sybase WorkSpace will automatically install a compatible version of Eclipse 3.1.2, Java 1.4, and SQL Anywhere 9.0.2 Developer Edition. It's best if you accept these default installations. Advanced users can choose to configure Sybase WorkSpace to use existing copies of those software packages if they already have them.
Installation of Sybase Workspace
Please follow the instructions in the book Sybase WorkSpace 1.7 Installation Guide found at http://sybooks.sybase.com/nav/detail.do?docset=1303.
Getting Started with SQL Anywhere Development
The following information is from the book Sybase WorkSpace Development found at the URL in the installation section. Only information relevant to SQL Anywhere Server will be presented here. Note: The SQL Anywhere Server database was called ASA in previous versions of the product.
1. Start the SQL Anywhere database
• Click Start | Programs | Sybase | Sybase WorkSpace | ASA 9.0 | Start ASA
2. Open Sybase WorkSpace
• Click Start | Programs | Sybase | Sybase WorkSpace | Sybase WorkSpace 1.7
3. Create a SQL Anywhere connection profile
• Click File | New | Other
• Select Connection Profiles | Connection Profile, then click Next
• Select Sybase ASA, then click Next
• Enter a unique name for your new connection profile, enter a description if you choose, then click Next
• You only need to modify fields on the connection details page if you start the database with non-default values. Confirm the connection by clicking Test Connection
• If the ping succeeds, click Finish, otherwise check your connection information and make any necessary corrections
4. Connect to your database
• In the Service Development perspective, open the Enterprise Explorer view
• Expand the Databases folder, right-click on the connection profile you just created, and click Connect. After connecting successfully, you should be able to browse your schema in the Enterprise Explorer view
Now that you're set up with your connection profile, you can begin using all of Sybase WorkSpace's enterprise caliber development tools. Please read the "Sybase WorkSpace Development" chapter at http://sybooks.sybase.com/nav/detail.do?docset=1303.
This chapter contains sections that describe the following topics in full detail:
- Getting Started
- Service Development
- Process Orchestration
- Database Development
- Web Application Development
- Mobile Development
Creating Databases and Making Schema Changes
We can create databases using the Database Development perspective.
1. Click Window | Open Perspective | Database Development
2. Ensure you have the Enterprise Explorer view active
• If not you can click Window | Show View | Enterprise Explorer
3. To create a new SQL Anywhere Server database, right-click on a connection profile in the Enterprise Explorer View and select Create Database
• Enter a database name, and select Sybase ASA as the connection profile type, then click Finish
Page 1 of 2
next page »
About José RamosJosé Ramos is a product manager for Sybase iAnywhere and is responsible for the direction and life cycle planning of Sybase iAnywhere products. With more than seven years of experience, he also plays an active role in customer demonstrations and education to ensure the continued success of SQL Anywhere, the industry-leading database management and data movement technology built for frontline environments. José holds a Bachelor of Mathematics in Computer Science from the University of Waterloo in Ontario, Canada.