I know that Servoy is only a front-end for the Sybase (or whatever one chooses) database, but is there an easier way to create a new database? Or is there a way to script this? It is really a hassle not to be able to simply choose “New Database” under a menu. (So I’m a little lazy!) Forgive me, I’m a newbie to this. Having to go through Sybase Central to create a new database and then link it up to your solution takes more time than I’d like (especially if you are using an incompatable version). I’ve used FileMaker Pro a bit, and this is perhaps the one advantage that FileMaker has.
B-T-W, what are the licensing issues if one is using the developer version of Adaptive Server Anywhere (or borrowing its server) to run one’s current version of Servoy?
kdarvin:
I know that Servoy is only a front-end for the Sybase (or whatever one chooses) database, but is there an easier way to create a new database? Or is there a way to script this? It is really a hassle not to be able to simply choose “New Database” under a menu. (So I’m a little lazy!) Forgive me, I’m a newbie to this. Having to go through Sybase Central to create a new database and then link it up to your solution takes more time than I’d like (especially if you are using an incompatable version).
Well for one you don’t have to use Sybase as your primary data-source. Other (O)RDBMS’s might have a slightly easier way of creating databases.
One that has all created databases loaded/available at once for instance.
Ofcourse this doesn’t necessarily mean that those engines meet your requirements overall.
Since there are so many different database engines out there that work all different internally and that there are tools that are specialized for admin tasks for these specific platforms you can understand that Servoy focusses it’s effort on the things they are good at. Namely the front-end.
kdarvin:
B-T-W, what are the licensing issues if one is using the developer version of Adaptive Server Anywhere (or borrowing its server) to run one’s current version of Servoy?
You can only use the bundled version with Servoy. Thus you can’t use it to power your database driven website with PHP for instance.
The developer version of Sybase ASA is for development only. So you can’t use it in production environments.
While I agree and understand why Servoy doesn’t have this feature, I just want to add my two cents: It’d be awfully nice.
I’m trying to make my solutions as db-independent as possible, so I define most everything within Servoy. This is the one and only remaining reason that I have to address the db directly.
Perhaps, just as Servoy has canned db connections for the most common SQL backends, it could have a “New Database” function for those same, common SQL backends? Picture this: what if, when you select to connect to a MySQL db, you had the option to create the db on the fly? At that point, you’ve already specified the backend you’re using.
While db creation (like db connections) are too varied to address all of possibilities, it seems that Servoy could offer this function for the most common db’s.
Another major benefit, I think, would be that new users could concentrate on getting up and running Servoy, and learn db-specific commands later, rather than being confronted with two new environments at once. To my mind this, more than anything else, could shorten the ‘learning curve’ that new Servoy users struggle with.
I’m trying to make my solutions as db-independent as possible, so I define most everything within Servoy. This is the one and only remaining reason that I have to address the db directly.
This is what I thought, too, until I had to deploy on ORACLE, while I work on MS SQL. There is many things that cannot be left to Servoy. For example, in MS SQL you have a column of type INT. In Oracle that’s a NUMBER. When importing a repository from MS SQL into ORACLE, everything is properly converted. But what if you move back to MS SQL? Right now I am getting quite a few errors that point to a type mismatch. My customers develop on Oracle using NUMBERS, I develop on MS SQL using INT. If they create a relation from their solution to mine, they are fine as long as they are inside Oracle only. But if I import their solution, I get a type mismatch, because that NUMBER is not converted to integer.
But that is only one problem. What about Indices? What about foreign key constraints with Cascade Deletes? For those reasons, I developed my own “SQL create database” generation tool. But even doing that, I am stuck in one place, that I would like the Servoy team to think about: Sequences.
I am not using Servoy sequences, since I cannot be 100% sure that I completely “control the database”. While I can live just nice with database sequence, there is one big problem though. Basically, there is two types of sequences, a database sequence or a column specific sequence (database identity). The database sequence is an independent object that can even be unique over several tables, the database identity is a counter on a column. When using database sequences you have to enter their names in Servoy, when using a identity column you just choose the sequence type.
Now the problem:
MS SQL uses identity columns, which works great for me. When I move to Oracle, I will have to enter 100s of sequence names into my dataprovider defintion. This will be horrible and it has to be done after every update, I suppose.
Here is my feature request for the dev team:
In the preference panel make an input field, where we can enter a default sequence naming pattern. For example, for me it’d be fine to have “table_seq” (of course, in Oracle you have to watch out for 30 characters…). Now when Servoy sees that the current database does not support identity columns, it could assume instead that sequences of the type table_seq exist. Maybe I can enter manually some other name in a single table…
Is something like this possible?
The sequence issue when moving from A to B gives me quite some headache…
kdarvin:
…is there an easier way to create a new database? Or is there a way to script this?).
Presently you can save a lot of steps by doing the following (if you have Sybase Central installed):
- Open Notepad and type:
set ASANY9=c:\Program Files\Servoy\sybase_db
dbinit.exe -t databasename.log -z UTF8 databasename.db
- Save as “CreateNewDatabase.bat” in the database folder.
- Open the .bat file to instantly create a new database
- Remember to add line for new database to sybase_db/sybase.config file
Then open Servoy developer and add under Edit/Preferences/DB Server. I believe the new .log file will be present when you close out of Servoy.
Similar instructions for using the command line utility fo the Mac OS X and Linux/Unix can be found in the Servoy Developer Edition Volume 1 manual on page 478. -t and -z are defined along with other options on page 486 of the Adaptive Server Anywhere Database Administration Guide.
I strongly recommend the Servoy manuals in book form. I find it much faster to locate information from a book than from the PDF files. Also, the money paid helps support Servoy documentation, which is substantial at over 1,800 pages.
Thanks for all the answers, guys! I still am a little fuzzy about the licensing relationship between Servoy and Sybase, though. There have been some recommendations on this forum about using Sybase Central to create a new database, but the current version of Sybase used with this is 9.0.2 and is not compatible with the the version shipped with Servoy. It has been suggested that the Sybase server application be copied into the Servoy directory and used with Servoy instead. Does this affect licensing? If so, can the new server be licensed to use with Servoy, or is the Sybase server that ships with Servoy even licensed for production?