Creating an ER diagram for hsqldb that exports SQL - sql

I'm currently designing a DB scheme. I have to use hsqldb.
- Normally I like creating an ER diagram, and I export the SQL source. Therefore I'm looking for a tool that automatically transforms my ER diagram into hsqldb sql code. Using MySQL Workbench or some sort of web interface (http://ondras.zarovi.cz/sql/demo/) seems to support any server, but hsqldb.
I'm beginning to do that. Surely I can export SQL code from any tool and edit it to fit. However I think this is one step I can save... with the right diagram tool :-)

Have a look at SQL PowerArchitect, it supports HSQLDB:
http://www.sqlpower.ca/page/architect
Their homepage requires a registration in order to download it (even for the community edition), but you can download the community edition without registration from the page on google code:
http://code.google.com/p/power-architect/

DB Visualizer can probably do that directly. The HSQLDB SQL dialect is ANSI SQL. Other SQL dialects that are close to ANSI are Firebird, DB2, Sybase, Informix and Postgres.

Related

Is my SQL version determined by the database I'm accessing or by my SQL client?

I have a SQL query I want to optimize, so I asked the database owner what version of SQL they were using (since ordinary methods didn't seem to have support). They answered that my version of SQL is not decided by them but by my local SQL client. They claimed to use a system called "DB2", with support for multiple SQL dialects.
I then went on to ask our IT department which version of SQL our client was using (that client being Squirrel SQL). After some fiddling around they logged on to the database, queried it and reported the version of SQL to be DB2.[sequence of decimals].
This is probably a stupid question, but would someone mind clarifying this?
Is the version of SQL I'm using determined by the database I'm accessing or by my SQL client?
If the version of SQL is decided by the database, then which version of SQL is DB2 associated with? Does it use its own version?
"They answered that my version of SQL is not decided by them but by my local SQL client"
That's complete and utter nonsense - those people apparently have no idea what they are talking about.
The SQL dialect that is understood by the server is only defined by that server. The client has absolutely nothing to do with that. If the database server doesn't support some specific feature, no SQL client will change that.
There is an industry standard called ANSI SQL that database vendors implement. Then on top of that they tack on non-standard proprietary stuff, extra commands, keywords, procedural stuff like stored procedures and triggers and cursors, that are not covered by a standard but which they expect will provide useful features that will differentiate them from the competition.
For Db2 11’s compliance with standards see https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.common.doc/doc/c0011215.html. The actual spec is behind a paywall so this is not that helpful. See https://www.whoishostingthis.com/resources/ansi-sql-standards/#sql-ansi-standards-for-database-administration for an explanation of ANSI SQL standards.
Different db2 products (Z/OS, LUW) might have different extensions. Z/OS has to do horrible mainframey stuff that LUW can do without. But you wouldn’t be given a choice, you have to use the commands implemented by the database that you are connected to. The SQL client doesn’t have a role in this.

Good test database on Windows to play around with data retrieval operations in SQL?

I need a test database to practice joins and other kinds of data retrieval operations in SQL.
What's a good free test database and RDBMS system to use on Windows?
Every major RDBMS provider has some free edition. Those are full versions limited by database size and maximum memory usage.
Top players:
Sql Server Express
Oracle Express
IBM DB2 Express-C
Then, there is number of open source products:
PostgreSQL
Firebird
MySQL
SQLite (not really a RDBMS, but understands SQL and it can be used for your purposes. Also, very small and compact)
If this is not enough, check this Wikipedia article: Comparison of relational database management systems.
There's more than 50 RDBMS's listed and you'll probably find something that suits your needs.
SQL Server Express for one.
Sample databases (AdventureWorks) can be downloaded here.
You can use this link. The adventure works database is used as an example for numerous online and offline resources.
After which, download the SMSS Express to work on it.
If it's just for practising SQL you could install Access assuming you have an MS Office CD that includes it already.
Otherwise MySQL or SQL Server Express are probably your best bets.
I would recommend MySQL over SQL Server Express if your purpose is to practice SQL. The command line interface is all you need.
You can get online practice with verifying your queries on SQL Exercises

Sybase Development IDE

Is there a Toad type application for Sybase? I can't seem to find a single one! I've tried using VS 2008 but can't see the sproc source.
Am assuming Sybase ASE.
Ships with Sybase Central and SQL Advantage as part of the client tools. Sybase Central lets you manage and create tables, views, sprocs etc. SQL Advantage lets you run SQL...
Sybase Workspace is a new tool for ASE, I've never tried it. http://www.sybase.com/products/modelingdevelopment/workspace
ASE ISQL is a free tool that is also useful for running sql, but is less useful for modifiying stored procedures etc. (More of a SQL Advantage replacement). http://code.google.com/p/aseisql/
If you have money to spend then there's also Embarcadero's DBArtisan. http://www.embarcadero.com/products/dbartisan. I've used this and it's pretty good, although their support for MSSQL and Oracle is better than the Sybase support.
RazorSQL has very good Sybase support. Edit / view stored procedures, etc.
SqlDbx at http://www.sqldbx.com/. Very light-weight software promising a lot of editor features. This requires Sybase Open Client to be installed on your workstation.
But I'll recommend using Oracle SQL Developer. I'm presently working through a JDBC connection to a Sybase ASE database using this tool. This seems to be Eclipse-based, but is quite responsive and allows you to view source code for functions and procs too.
Looks like Quest now offers a Sybase version of Toad.
DBeaver is open-source and appears to work fine.
Try Embarcadero Rapid SQL. I recommend you the 7.4 version over 7.6 because it is more stable. Embarcadero Rapid SQL XE is the recent version.
Embarcadero Rapid SQL XE enables
developers and DBAs to produce high
performing SQL code at lightening
speeds. With support for all major
database platforms from a single
interface, teams can standardize on
one powerful heterogeneous SQL IDE
tool.
Squirrel SQL is open source and works pretty well
I'm using CAST SQL-Builder from CAST Software, the debugger in this tool saved me a lot of time.

Any way to convert database diagrams in sql server 2005 to other formats?

Can i convert the diagram to other formats like to Visio (other than copy to clip board command in sql server 2005) or any other utilities to do so?
Apparently not, I've been searching for years for this feature.
Would be a nice feature for a future version of SQL.
dont know. but Balsamiq Mockups is a really easy tool for mocking up diagrams (SQL and ER included). check it out - http://www.balsamiq.com/

MySQL tools which ease creation of SQL JOIN statements?

Does anyone know tools which look at a MySQL database, show you all the tables graphically and allow you to create complicated JOIN statements via drag-and-drop?
Before you buy anything, see if the free, official MySQL's GUI tools (specifically the MySQL Query Browser) will work for you.
Personally, I'm fairly comfortable interacting with MySQL's command line interface and haven't used their GUI tools very much, but I just downloaded Query Browser and it seems like it does exactly what you're looking for.
Also, check out "Building Queries Visually in MySQL Query Browser" for a nice tour of MySQL Query Browser.
As an update, the MySQL Tools collection is no longer supported, and has been replaced by MySQL Workbench. The documentation can be found here: http://dev.mysql.com/doc/workbench/en/index.html and you can download it here: http://dev.mysql.com/downloads/workbench/
Edit: stumbled across this today too, a good beginner tutorial for mysql workbench -> http://net.tutsplus.com/tutorials/databases/visual-database-creation-with-mysql-workbench/
EMS SQL Manager for MySQL has query constructor. Can't recall about joins, but they should be supported.