Stable database? lazarus / 16-Databases ---------------------------------------------------------------------- igorp45 · 2012-05-13 23:05 Hello friends, Using Ubuntu and a lot of programs written by Lazarus and Mysql   do have a serious problem installing new version of Ubuntu... Just now I am fighting with not working programs using Mysql telling me - expected version 5.1, getting 5.5. Googling a little I have been learned I should downgrade library libsqlclient from version 18 to 15 to be able to run my programs. There is not such library in Ubuntu depositaries. I am frustrated to install new libraries, new version of fpc and lazarus with every new Ubuntu... Could someone tell me, which sql database is stable enough during all life of my programs or what Linux distribution would be better to install? I use databases for a special search in my libraries that I need very badly for my work. I probably did a mistake written my programs in Lazarus instead in PHP -  Phpadmin works well with any version of Mysql. Any recomentation? With best regards Igor ---------------------------------------------------------------------- Leledumbo · 2012-05-13 23:48 How big is your database? I use SQLite3 for all my programs because mostly they only use small data (about 10,000 - 100,000 entries) and the library is both small in size and embeddable. ---------------------------------------------------------------------- exdatis · 2012-05-14 05:16 I use firebird(v 2.1-2.5 works well, flamerobin admin-tool) or PostgreSQL. I have no problem with different versions. p.s. CodeTyphon 2.5 (SQLdb) ---------------------------------------------------------------------- BigChimp · 2012-05-14 06:55 Yep, Firebird works ok here, too. Just a note: support for MySQL 5.5 was added to Lazarus trunk a while ago, so you could try with an SVN version... but migrating away from mysql might be a good idea for other reasons anyway... Regarding distribution: I noticed the various flavours in the snapshots directory: Lazarus trunk .rpms (edit: typo) are available, while there are no equivalent .debs Perhaps switching to Fedora or another .rpm based distro might be an idea? No recent experience with those; perhaps others can advise... Finally, another tip: you can have multiple Lazarus versions installed at the same time as long as their config directories (primary config paths) differ. You could use e.g. Ludob's and my fpcup tool to set up such a separate version of FPC and Lazarus under your home directory. You might want to use this method to keep e.g. an up to date Lazarus together with a stable FPC (e.g. 2.6.1, also known as fixes 2.6) Good luck ---------------------------------------------------------------------- Leledumbo · 2012-05-14 07:22 QuoteRegarding distribution: I noticed the various flavours in the snapshots directory: Lazarus trunk .prms are available, while there are no equivalent .debs Perhaps switching to Fedora or another .rpm based distro might be an idea? No recent experience with those; perhaps others can advise...My advice: download the source instead, build it yourself. ---------------------------------------------------------------------- braximo · 2012-05-14 07:25 Firebird! ---------------------------------------------------------------------- marcov · 2012-05-14 07:38 Postgresql is fine, I run it in production without problems. Anyway, nearly anything but mysql is fine. Its versioning is deliberately uncompatible to entice people to obtain commercial licenses. ---------------------------------------------------------------------- avra · 2012-05-14 08:05 Firebird ---------------------------------------------------------------------- jack616 · 2012-05-14 11:05 For a database try to choose one thats been around a while and very large numbers are installed. This will give you skills protection should you ever need to employ others or outsource your data management. (This is one reason I use mySQL for everything myself now - I made the mistake of using a "new" popular dbms a few years ago and it cost me dearly when it went out of fashion) and - you do have a point - phpMyadmin seems to get by without complaints or problems. ---------------------------------------------------------------------- fredycc · 2012-05-14 13:10 Firebird/SQLite ---------------------------------------------------------------------- Rails · 2012-05-14 13:22 Quote from: BigChimp on May 14, 2012, 08:55:15 am Regarding distribution: I noticed the various flavours in the snapshots directory: Lazarus trunk .prms are available, while there are no equivalent .debs Perhaps switching to Fedora or another .rpm based distro might be an idea? No recent experience with those; perhaps others can advise... The Laz debs don't install properly for me on Debian. I suspect it may be because they are built on an Ubuntu box. I use alien with its default settings to install from a RPM with no problems. Alien with the -i command automatically converts the RPM to debs and installs them. It works beautifully here. It should also work on other Debian based distros. ---------------------------------------------------------------------- marcov · 2012-05-14 13:29 Quote from: jack616 on May 14, 2012, 01:05:18 pm For a database try to choose one thats been around a while and very large numbers are installed. This will give you skills protection should you ever need to employ others or outsource your data management. (This is one reason I use mySQL for everything myself now - I made the mistake of using a "new" popular dbms a few years ago and it cost me dearly when it went out of fashion) Afaik all full dbs (sqlite excluded) in this thread are older than mysql.  Postgresql have direct ingres pedigree, and Firebird descends from Interbase, which is easily a decade older than mysql. Mysql is mostly used by ISPs as PHP backend. Real database use of mysql doesn't have that kind of numbers, and is actually quite comparable with the rest (and I wouldn't be surprised if for that Firebird is actually bigger) Quoteand - you do have a point - phpMyadmin seems to get by without complaints or problems. That's because you don't see the work done by the people working on that. And many that work on it are probably employed by ISPs deploying mysql. Moreover, mysql is phpmyadmin's reason to exist, while mysql is just one annoying corner for the volunteer lazarus/FPC devels. Have pity on the devels, drop mysql ---------------------------------------------------------------------- ludob · 2012-05-15 07:51 Quoteand - you do have a point - phpMyadmin seems to get by without complaints or problems. The version problem you are complaining about is a mismatch between the client library libmysql.dll and the fpc binding. Using a 5.1 libmysql with a 5.5 database works (except for the new 5.5 client features, of course). An old app of mine used the 3.2 client with database servers up to 5.0. I had to change the binding a little bit to accommodate new datatypes used in metadata but that is it. The client library API's aren't compatible between different versions but the wire protocol has maintained backwards compatibility to a large degree. So PHP is actually cheating a little bit. Up to PHP 5.2, PHP shipped with mysql.dll. From version 5.3 it integrates the mysqlnd native driver.  PHP doesn't use the client library that comes with the server but uses its own. You can also continue using the 5.1 client library instead of the 5.5 "without complaints or problems" ---------------------------------------------------------------------- jack616 · 2012-05-15 12:28 QuoteThat's because you don't see the work done by the people working on that. And many that work on it are probably employed by ISPs deploying mysql. Moreover, mysql is phpmyadmin's reason to exist, while mysql is just one annoying corner for the volunteer lazarus/FPC devels. Have pity on the devels, drop mysql  Actually I'm now moving all my database activity to mySQL. As you rightly say - thats what is mostly used on the net so thats the direction people need to move because (and frankly I dont like it myself) everything is moving "netwards" Any other way of doing business becomes unnecessarily complex and expensive. The truth is - almost any of them out there are probably capable of doing anything the majority of users need. Which to use is seldom based on capability lists these days. The actual age of the dbms is only a part of the decision making process. As I said there is also the skills availability (keyword - availability) and other factors to consider. Selection is a complex  formula not a simple this/or that solution. No doubt others have different requirements but I expect not very different when it comes down to it. However - its not for software developers to tell users what products to use. The software industry in general needs to learn it is not acceptable to keep telling people they must "upgrade their browser" to see a simple web site - to upgrade this and upgrade that every five minutes. Its their job to fulfill the needs of the user not the other way round. To stick with the example - to make sure their web site can be seen correctly with all browsers not to tell the user "tough luck get another browser". Yes its hard work - and no I dont see what other people are doing. But if you choose to get into a line of work - be it free or paid for - its your responsibility to either do it right - or to expect questions complaints and people voting with their feet. Users may spend a lot of their time and money or resources on using these things and they have some right to expect that to be recognised by the developers. Offering a product for public use whether for cash or for free creates a contract with benefits and responsibilities  on both sides. Software development can occur over periods of decades. I'm using lazarus because of the dedicated and helpful support I've seen over a number of years and the product is the logical extension of what a compiler should be in my opinion- for the record I also do embedded C and assembler - I would like to be able to use a RAD for that work too. Delphi proved RAD works.  It provides what I - as a user - need from a compiler. Lazarus seems to be picking up the the dropped ball. I applaud and support that. But my use is conditional on you providing what I want. Not what you say I should be using. It goes without saying we are grateful to developers (and are happy to donate as appropriate or when asked)  but the tail doesnt get to wag the dog. As far as I'm concerned - those days are over - and I think others are coming to that conclusion too. On a lighter note - how about a poll of what dbms lazarus users use more than any other. Then widen it to an internet-wide poll. I suspect postgress will be very low in the charts despite high profile users. And interbase was stillborn anyway as far as I have seen. I also suspect mySQL will score high in the numbers game and thats a key factor in choice. ---------------------------------------------------------------------- BigChimp · 2012-05-15 12:47 Quote from: jack616 on May 15, 2012, 02:28:29 pmActually I'm now moving all my database activity to mySQL. As you rightly say - thats what is mostly used on the net so thats the direction people need to move because (and frankly I dont like it myself) everything is moving "netwards" Any other way of doing business becomes unnecessarily complex and expensive. The truth is - almost any of them out there are probably capable of doing anything the majority of users need. Which to use is seldom based on capability lists these days. Are you sure? The way Oracle is treating Open Source is writing on the wall. Also, have you seen any figures on mysql usage on the net? I'd be very interested in that and I suspect the numbers may actually be dropping a bit. Add to that the known (on purpose?!) problems with incompatible client libraries... If you want to move with the hype, go with a NoSQL database (Cassandra etc). Also, sqlite has been growing a lot. PostgreSQL and Firebird probably have grown as well. Yes, agreed, it's not all about features, but I'd look at long term support, ease of upgrade/maintenance as well. Quote from: jack616 on May 15, 2012, 02:28:29 pmSelection is a complex formula not a simple this/or that solution. No doubt others have different requirements but I expect not very different when it comes down to it. That seems like a bit of a contradiction - I'd expect more people to agree with my points above against mysql - confirmed by the posts... However, you're right is that there is no simple this/that solution. Quote from: jack616 on May 15, 2012, 02:28:29 pmHowever - its not for software developers to tell users what products to use. The software industry in general needs to learn it is not acceptable to keep telling people they must "upgrade their browser" to see a simple web site - to upgrade this and upgrade that every five minutes. It IS the software developer's job to create the best fit for purpose software. That includes underlying stuff like infrastructure if the client doesn't have good reasons for going a certain way. Quote from: jack616 on May 15, 2012, 02:28:29 pmYes its hard work - and no I dont see what other people are doing. But if you choose to get into a line of work - be it free or paid for - its your responsibility to either do it right - or to expect questions complaints and people voting with their feet. Users may spend a lot of their time and money or resources on using these things and they have some right to expect that to be recognised by the developers. That's why I'd stay away from mysql - you're looking at supporting multiple incompatible clients with your programs. If you use Firebird, I think you can use the latest client on Interbase 6.0 which was released in... 1992, I think... probably somewhere in the '90s. This decoupling leaves you much more flexibility in upgrade windows, less effort in forced maintenance, less dictating of your clients in what client libs they MUST have installed on their machines... Seems like the opposite of what you're advocating or perhaps I'm misunderstanding your post. Quote from: jack616 on May 15, 2012, 02:28:29 pmOffering a product for public use whether for cash or for free creates a contract with benefits and responsibilities  on both sides. The first category, yes. The second: it depends on your license conditions. Quote from: jack616 on May 15, 2012, 02:28:29 pmIt goes without saying we are grateful to developers (and are happy to donate as appropriate or when asked)  but the tail doesnt get to wag the dog. As far as I'm concerned - those days are over - and I think others are coming to that conclusion too. I think marco was making a good point: don't expect mysql support in FPC to keep up closely with new client releases unless you (have somebody) help developing new connectors. Doesn't sound like the tail wagging the dog but the tail passing a note to the dog saying there's better food to be found somewhere else. Quote from: jack616 on May 15, 2012, 02:28:29 pmOn a lighter note - how about a poll of what dbms lazarus users use more than any other. Then widen it to an internet-wide poll. I suspect postgress will be very low in the charts despite high profile users. And interbase was stillborn anyway as far as I have seen. I also suspect mySQL will score high in the numbers game and thats a key factor in choice. A poll might be nice but don't forget that in open source projects, actual code contributions count. If high profile users happen to be developers, then support for it is good. Likewise with Firebird (and I think a big number of Firebird users will pop up). I think people like Lacak2, ludob and I got a native MSSQL/Sybase ASE connector into Lazarus/FPC not because of other FPC users' requests, but because we wanted to scratch an itch/had our own users that needed these connectors. ---------------------------------------------------------------------- goodname · 2012-05-15 13:03 Quote from: jack616 on May 15, 2012, 02:28:29 pmActually I'm now moving all my database activity to mySQL. As you rightly say - thats what is mostly used on the net so thats the direction people need to move because (and frankly I dont like it myself) everything is moving "netwards" Any other way of doing business becomes unnecessarily complex and expensive. The truth is - almost any of them out there are probably capable of doing anything the majority of users need. Which to use is seldom based on capability lists these days. Many web space providers support both MySQL and PostgreSQL. Have not tried it but think that SQLite is not that hard to use on a web site either. Quote from: jack616 on May 15, 2012, 02:28:29 pm However - its not for software developers to tell users what products to use. The software industry in general needs to learn it is not acceptable to keep telling people they must "upgrade their browser" to see a simple web site - to upgrade this and upgrade that every five minutes. Its their job to fulfill the needs of the user not the other way round. To stick with the example - to make sure their web site can be seen correctly with all browsers not to tell the user "tough luck get another browser". A user can use what ever software they want to use. They should be aware of the development policies. A common source of this information is called software licenses. Quote from: jack616 on May 15, 2012, 02:28:29 pmYes its hard work - and no I dont see what other people are doing. But if you choose to get into a line of work - be it free or paid for - its your responsibility to either do it right - or to expect questions complaints and people voting with their feet. Users may spend a lot of their time and money or resources on using these things and they have some right to expect that to be recognised by the developers. Offering a product for public use whether for cash or for free creates a contract with benefits and responsibilities  on both sides. So who is at fault in the case of MySQL support in Lazarus. The Lazarus developers are using the official client lib that comes with MySQL. This seams reasonable. Every time MySQL changes compatibility Lazarus has supported the new client lib. Looks like Lazarus is doing it's job.  Quote from: jack616 on May 15, 2012, 02:28:29 pmSoftware development can occur over periods of decades. I'm using lazarus because of the dedicated and helpful support I've seen over a number of years and the product is the logical extension of what a compiler should be in my opinion- for the record I also do embedded C and assembler - I would like to be able to use a RAD for that work too. Delphi proved RAD works.  It provides what I - as a user - need from a compiler. Lazarus seems to be picking up the the dropped ball. I applaud and support that. But my use is conditional on you providing what I want. Not what you say I should be using. It goes without saying we are grateful to developers (and are happy to donate as appropriate or when asked)  but the tail doesnt get to wag the dog. As far as I'm concerned - those days are over - and I think others are coming to that conclusion too. On a lighter note - how about a poll of what dbms lazarus users use more than any other. Then widen it to an internet-wide poll. I suspect postgress will be very low in the charts despite high profile users. And interbase was stillborn anyway as far as I have seen. I also suspect mySQL will score high in the numbers game and thats a key factor in choice. A pole might be interesting. Don't think it would change Lazarus support for MySQL as it is the MySQL that keeps breaking things and Lazarus that is just keeping up. ---------------------------------------------------------------------- mdlueck · 2012-05-15 13:29 Quote from: igorp45 on May 14, 2012, 01:05:41 amUsing Ubuntu and a lot of programs written by Lazarus and Mysql   do have a serious problem installing new version of Ubuntu... Just now I am fighting with not working programs using Mysql telling me - expected version 5.1, getting 5.5. What versions of Ubuntu are you upgrading from / to? (Numbers please) I see that 12.04 LTS has MySQL 5.5. So trying to upgrade to that version? Certainly abandoning XYZ tool when upgrade challenges come is not a viable course of action. ---------------------------------------------------------------------- jack616 · 2012-05-16 12:56 Quote The first category, yes. The second: it depends on your license conditions. A common misconception. In all the licensing fetishes on the net very few people realise their true legal status - or lack of. You would be suprised at how many licences are mostly invalid. Your other points have validity too. but these things are seldom as simple as originally suggested is what I was trying to get across - and it bothers me that people fairly new to the field could be put off their best approach. There are far too many computing decisions being made based on clever marketing and ignorance. QuoteSo who is at fault in the case of MySQL support in Lazarus. It is not an issue of "fault" It is a case of what is a claimed capability. If you claim mySQL then you are obligated to provide blanket mySQL. If you want to limit that to a specific subset - you just say that. In the case of FPC/Lazarus - there is no issue I know of. The latest client is now supported. Presumably so will the next. If not - then those of us using mySQL will stop using lazarus and go elsewhere. I will repeat because there seems to be confusion and the point is key: It is NOT the job of developers to tell users what to use. It is the job of developers to fulfill the needs of users.  I suggested a poll of dbase lazarus users because I thought that would be the most useful here. I stand by my previous comments as a response. ---------------------------------------------------------------------- JD · 2012-05-16 13:15 Firebird/PostgreSQL/SQLite ---------------------------------------------------------------------- BigChimp · 2012-05-16 13:27 Quote from: jack616 on May 16, 2012, 02:56:41 pmQuote The first category, yes. The second: it depends on your license conditions. A common misconception. In all the licensing fetishes on the net very few people realise their true legal status - or lack of. You would be suprised at how many licences are mostly invalid. Ah... so you know the jurisdiction I (and my users) are operating in as well as their impact on liability etc? Anyway, smells a bit like FUD. I'd be very surprised if the MIT or BSD licenses were invalid in any major jurisdiction.. I'll leave it at this, as it's hardly the original topic and we can agree to... talk it over over a couple of beers whenever we meet QuoteI will repeat because there seems to be confusion and the point is key: It is NOT the job of developers to tell users what to use. It is the job of developers to fulfill the needs of users.  I won't repeat anything, it gets tiresome after a while if people only send but don't receive... ---------------------------------------------------------------------- igorp45 · 2012-05-19 20:36 Thank you guys a lot for recomendations. Having some obsolete Delphi literature in a basement I guess Firebird is the right one. Never the less - I am not able to google any free software or a script converting mysql dump to usable file for importing to the Firebird. Should I transfer my tables into CSV files and writing some program to fill Firebird tables or there is another easier way? Regards Igor ---------------------------------------------------------------------- tkramer3 · 2012-07-06 05:34 I found a different solution for use with Kubuntu 12.04. Download the deb package libmysqlclient16 from http://packages.ubuntu.com/search?keywords=libmysqlclient16 I used the Ubuntu 11.10 (latest before 12.04) - AMD64 version. This is the version with which the Lazarus 5.1 component works. Install the package with dpkg -i libmysqlclient16.deb . I didn't get any dependency problems. then link /usr/lib/mysqlclient.so with: # cd /usr/lib # ln -s libmysqlclient.so.16.0.0 libmysqlclient.so Now you can connect to 5.5 databases with the 5.1 component. ---------------------------------------------------------------------- BigChimp · 2012-07-06 07:33 Quote from: igorp45 on May 19, 2012, 10:36:01 pmNever the less - I am not able to google any free software or a script converting mysql dump to usable file for importing to the Firebird. Should I transfer my tables into CSV files and writing some program to fill Firebird tables or there is another easier way? If you haven't already Try googling for data pump tools. There are lots of them that allow transfer between databases... including some java ones that work with any jdbc database (sqlworkbench/j, liquibase...) ---------------------------------------------------------------------- motaz · 2012-07-06 08:07 I'm using Firebird since 2002. No problems, no conflicts, no crash, with different operating systems: Windows 98, 2000, XP, Vista, 7, Ubuntu from 9.x to 12.04, Mint, Fedora, and Mandrake.