PowerBuilder app with embedded database? - database

Is it possible to use e.g. SQLite with PowerBuilder? I need an embedded open source database (no additional costs).

Like Bernard said, you'll need an ODBC driver, so as long as you're willing to go third party (if I understand the SQLite situation correctly), that should be no problem.
That said, if you have PowerBuilder, you have license to distribute the single-user SQL Anywhere run time engine. If no-cost is your only criteria, and you're only connecting locally, SQL Anywhere may be an option to evaluate. Not only is it an incredibly solid database, but there's a much larger base of documentation and experience connecting PowerBuilder to SQL Anywhere, so if you run into problems, you're more likely to get some help.
Good luck.

I don't believe that PowerBuilder contains a driver for native support to SQLite. But it definitely has a driver for ODBC, so that is always an option even if it isn't the most efficient one.

I used to use SQL Anywhere, but eventually ditched it for the reasons Joe Landau gave - can't change the schema using the distributable runtime engine.
I switched to Firebird, which has an embedded version, and that seems solid. The only issue is that the ODBC driver I'm using (Gemini), which seems to be the best one available, seems to have gone out of business. (I just checked - it seems to be available on other sites.) And you have to add the following to your PBODB*.INI file:
[Firebird]
PBSyntax='Firebird_SYNTAX'
PBNoCatalog='YES'
[Firebird_SYNTAX]
CreateTable='CREATE TABLE &TableName (::ColumnElement[::ColumnElement]...)'
ColumnElement='&ColumnName &DataType'
DropTable='DROP TABLE &TableName'
GetIdentity='Select gen_id(GEN_&TableName,0) from RDB$DATABASE'
I've been very happy with it. Using it for almost 2 years, with over 1,000 users, and no problems whatsoever. You can also easily switch to the Firebird server version if some users need that.

As noted, SQL Anywhere is available and solid. But it has a disadvantage--you can't change the schema using the run time engine. This makes it hard to, say, add a column to a db that you have distributed.

++ to the comments by DC on Firebird. One of the best free databases out there. I have used it for years for a PB application I sell to Law Firms.
Although I use the server version even if the target is a single workstation. Simplifies the deployment and the issue of adding workstations later if desired.
I use the standard Firebird ODBC driver at http://www.firebirdsql.org/index.php?op=files&id=odbc
There are two good GUI front database management tools that I hve used - IBOConsole and Flamerobin.

Related

Lightweight ETL or database Sync - Sybase to SQL Server

I have been doing some investigations into some light weight database Syncing tools to trial. The initial task we want to perform is a simple data sync from a few tables on a Sybase ASE database (15) to a SQL Server database (2008 R2). Timing wise, I'd like to keep my options open, but ultimately, I would like to have the ability to sync every minute or less.
I have been looking at SymmetricDS, which at face value seems to do exactly what I want it to. The drama is I have hit a couple of roadblocks on the Sybase side of things, which is proving to be very frustrating (Jumpmind support are assisting). It appears that Java has a problem with the default collation we have on our server, being HP-roman8. Unfortunately, to change this charset is way bigger then this project itself.
I have also started investigating Talend, but have hit a few roadblocks in relation to requiring older versions of drivers for Sybase and downgrading the installed version of Java.
Without having to go to Replication Server, does anyone have any suggestions on a relatively lightweight ETL or database Syncing tool that will do what I want? The biggest gotcha thus far is Sybase support - I really need something that will seamlessly work without having to hack too much.
Cheers
You should try uniVocity. It is a Java-based ETL framework that certainly can help you do what you need. You can use any JDBC driver, define your mappings with a few lines of code and have this working faster than a traditional ETL tool.
Have a read through its tutorial and also check out a few sample projects here
Disclosure: I am the author of this library. It's open-source and free (Apache V2.0 license).

Choosing database and licensing for Delphi application

We have Delphi XE2. We are looking for a database for our application. We have tried Absolute Database and it supports most of SQL commands we need. I see most of Delphi users choose Firebird but it seems to hard to work with. I am so much confused about databases and licenses. Here are my problems:
When we choose a database, let's say Absolute Database, Firebird, MySql embedded etc. and if we have for example 3.000 customers, do we still need to pay to Database developers? Or is it one time fee? I am so much confused because they say when we buy, we can use it inside our building ( http://www.componentace.com/order/licenses.php ). But when we release our software, our customers will need to use the same database of course.
Absolute DB is easy to install and supports most of SQL queries. Firebird does not support most of SQL queries. Is this correct?
When we try to use Firebird, we use FlameRobin to design database. But when we try to connect using IB components, it says "Unable to connect database".
Thank you very much...
Firebird has no licensing fees at all. However, it's smart to help maintain this great project once you rely on it. There is a lot of ways to help Firebird project:
http://www.firebirdsql.org/#consider-your-contribution
Not correct. Firebird is very powerful and supports most SQL standards plus a great SQL extensions for stored procedures and triggers
Check your database connection string. It's usually something like server_ip:full_db_path if you're connecting over a network, or just full_db_path if local. You can always use an ALIAS in place of full_db_path. Make sure you have Firebird server running or, if using embedded, if it's installed correctly. Firebird has a great and very complete documentation and one of the best support groups on open source projects.
It depends on database. Absolute Database is embedded database, everything is included in your exe. Most database engines however are standalone, so they are installed as applications. It looks like if you buy commercial Absolute Database licence, no royalties are needed: http://www.componentace.com/order/order_product.php?id=8
Firebird supports most SQL standards. According to this answer, most SQL compliant embedded database is Firebird: Which embedded database has maximum SQL compliance, and concurrency support?
You must have some configuration issues with IB components, hard to say more without more information. On the otherhand, IB components are for Interbase, so you might find something else better, like UIB.
If you'll choose Firebird, then take a look at IBExpert. This is absolutely the best administration tool available for Firebird. But not cheap. =(
You should also look at Interbase, also marketed by Embarcadero, the Delphi vendor. Interbase is not the same thing as Firebird, which is probably why the IB components you mentioned didn't work.
Yes, each customer will usually have to purchase the IB database. However, there are additional choices with Interbase, depending on how you structure your application. Check how they work and see if they can fit better with what you are trying to do.

Trying to deploy an Entity Framework Code First application without much luck? Best Deployment strategy?

Despite a few hiccups and a few workarounds, my MVC based Entity Framework (Code First) application is now complete and ready for deployment.
I originally tried developing through SQL Express, however, I had non stop problems with the Code First approach as I asked about here which made it completely unworkable.
So, in the end, I developed it following the majority of guidelines and used SQL Compact Edition. This has been absolutely brilliant for development - but - now it has come to deployment and I am stuck.
I have seen some people saying about generating the Schema from the .SDF file, however, there are differences and restrictions in Compact edition such as nvarchar being limited to a length of 4000, and I need max in my application.
So basically, what can I do?
In addition - but not essential - , I am going to be moving on to the next project shortly, It will involve heavy usage of items needing to be stored in a database that are longer than 4000 characters. Are there any better strategies now for development / Is it possible to use Code First with SQL Server Express or SQL Full (I have MSDN and willing to install/use anything that will help).
Here are my unofficial recommendations:
SQL CE is not a viable option for most production applications that are based on MVC (although I have used it in production services in rare cases).
I would try to avoid switching databases between development and production - i.e., don't test on SQL CE and deploy to SQL Express or something else.
I have never tried to open an MDF inside of Visual Studio - maybe I'm misunderstanding what you're saying here, but in general I'd recommend using the SQL Server-specific tools to manage databases: http://www.microsoft.com/download/en/search.aspx?q=sql+server+management+studio+express.
Regarding the other post, I would generally discourage using the AttachDBFilename portion of connection strings unless you need it for a specific purpose.
It sounds like you may want to review the available database initialization strategies: http://blog.oneunicorn.com/2011/03/31/configuring-database-initializers-in-a-config-file/.
There are lots of walkthroughs on our blog and the MVC MSDN site - if those don't work for you feel free to reach out to us from our blog and provide feedback on what we can do better!
Our blog: http://blogs.msdn.com/b/adonet/
MVC walkthroughs: http://www.asp.net/mvc/tutorials/getting-started-with-mvc3-part4-cs
On the one hand regarding deployment/migration you might want to take a look at http://exportsqlce.codeplex.com
On the other hand I've been checking Microsoft SQL Server Compact 4.0 Books Online and in principle there is no known issues with data types, although the limitation you mentioned for nvarchar is confirmed.
Finally in order to elaborate a strategy you might find interesting the Differences Between SQL Server Compact and SQL Server
You need to create a debug and a release specific web.config file:
In the release specific file you remove the connection string, so it creates a database for you.
In the debug specific file you keep the connection string.
However, I would suggest you to not use a connection string and use SQL Management Studio instead. Given that the Compact Edition does not support your requirement, this is a good time to switch...

Getting started with VB.NET Databases

I'm having trouble figuring out databases in VB.NET. (VS 2008)
What control(s) do I need to use and how do I use them? I am ,looking for tutorials and sample code too.
I'm working on a trivia game where the admin can remove and add questions to a database.
EDIT:
The program must be able to do all of the DB interactions itself through code.
Regarding DB portability...
I do not intend to install it on many machines, so portability is not a major issue, but I's rather not be bound to Access or SQL Server. (Is that possible? - A portable database file?)
A bit more complaining...
I really need help with connection strings and the whole DB gamut in VB. I've done DBs in PHP so I'm not completely ignorant. It's the VB side of things that's confusing.
Thanks.
Have you considered SQLite DB? It's a very small DB and is used my many vendors. I have not used SQLite personally, but I do know that Firefox uses it and so does iPhone (from what i've read).
SQLite does not require you to install anything (as per the post below). It's a nice alternative to Access or carrying around SQL Server Express.
If you do decide to use SQL Server Express, you will be required to install the run-time, from here for each machine it's used on.
Below are some links which may help you get started
Google for SQLite DB
ADO.NET 2.0 Provider for SQLite
And finally, here's a blog post outlining how to get it done, and quickly.
Cheers!
I would suggest Microsoft's Enterprise Library - The hands on labs available make it a breeze to setup access to a database, and can make it as simple as a config change to point to a new/different DB.
Also, check out http://connectionstrings.com/ for related info.

What's the best zero (near zero?) administration relational database for a windows desktop app: Access, SQLite, SQL Server, other?

We don't need multiuser. Just relational. Our app currently uses Access but Access isn't exactly zero-administration because it's prone to corruption.
Is SQLite rock, rock solid, pure zero-administration?
Or...is there a way to configure SQL Server as a desktop engine so that it is pure zero admin?
Or...is there some other relational choice?
We are using ADO as the layer to talk to Access, so switching to SQL Server wouldn't be hard, but my understanding is that I couldn't use ADO for SQLite, so switching to SQLite would require a lot of rewriting. Is that right?
Other databases may be more stable than Access, but I'm not aware of anything that's as easy to use, and as easy for an end user to understand. Access (like SourceSafe) is always called "prone to corruption", but few and far between are the first-hand accounts of this. Most people "read it somewhere."
Consider just including a backup routine with your app that keeps the last two or three copies of the Access database if you're that worried about corruption.
If you insist on something else, then try SQL Server Compact Edition (as other have suggested), which (like Access) is just a file, a .sdf file in this case, and a few DLLs. Unlike SQL Server Express Edition, SQL Server CE doesn't leave a background process running all the time.
Another option is embedded Firebird.
The most easy switch would be to go with SQL Server compact edition, it can be embedded in your app, and from some light testing that I have done, it works really well.
Going to SQL lite will require more modification of the DAL.
NOW note that SQL Compact Edition doesn't support stored procedures! (Shouldn't be a big deal, but be sure to research the differences)
There are ADO.NET wrappers for SQLite, not sure if that is what you want or just straight ADO. I have found SQLite to be very robust although you do need to VACUUM the database every now and then to recover unused space after deletions. You can do that from your code, so that isn't really administration. I just do it at startup or shutdown.
I agree with the others' opinions about SQL Express Edition. I use it for several apps.
If you are working with .NET, then you might want to look at Subsonic for your data access. It supports all of the above and more and makes switching fairly painless. For single user database apps, it is great. If you are going to do a rewrite, then it is worth it.
Since you are looking at no need for multiuser, you might want to check out SQL Server Compact Edition. http://www.microsoft.com/Sqlserver/2005/en/us/compact.aspx

Resources