From kde-core-devel Mon Sep 22 01:45:17 2003 From: Daniel Stone Date: Mon, 22 Sep 2003 01:45:17 +0000 To: kde-core-devel Subject: Re: Proposal: Encouraging DB-using applications X-MARC-Message: https://marc.info/?l=kde-core-devel&m=106422825717876 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Oiv9uiLrevHtW1RS" --Oiv9uiLrevHtW1RS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 21, 2003 at 10:54:35PM +0200, Guillaume Laurent wrote: > On Sunday 21 September 2003 20:48, Roberto Alsina wrote: > > What item trackbacks to what other? What items come from the same sourc= e, > > or the same day. You can "display latest items" or "items for that day", > > or many other combinations. Really, I think I have about 35 different S= QL > > queries, none terribly hard, but I have no idea how to do them using a > > flat file. >=20 > So you need something a bit more complex than a flat file. But I really d= oubt=20 > you need something like SQL. So flat files don't always cut it? > > The KRecipers author mentioned that often people have thousands of > > recipes. He was complaining that a relational DB was too slow, > > imagine a flat file :-) >=20 > Several flat files if you want. Come on, I can find | xargs grep through = the=20 > 150KLOCs of Rosegarden in seconds. And recipes are fairly short bits of= =20 > texts, you could probably even load the whole bunch in memory if you real= ly=20 > have to. On a fast box (like my AthlonXP 2400+, for example), sure. On a slower box?= Good luck. You're also assuming that people just dump recipes in as flat files. What i= f I want to say "I have trout fillets, bacon, artichoke hearts, breadcrumbs, mi= nt, sour cream, lemon, and I want to cook something that takes under two hours,= all up"? Flat files aren't much use there - you'd need XML to do it in a flat f= ile, and *no*. DOM implementations are still far, far too slow to do it at any resonable sort of speed, unless you have a G5. > > SQlite is pretty reliable. Besides, saving a daily dump is trivial. >=20 > No, saving a daily dump is *not* trivial. This is exactly the kind of thi= ng=20 > which we too often regard as "trivial" but generate most of the problems.= A=20 > typical user will not know how to do that and will not want to learn. The= =20 > program will have to do it transparently for him, reliably, which means= =20 > things like checking the dumps are ok and you can load them back if you n= eed=20 > to. There are weeks of coding and testing behind this "trivial" thing. Yes, but if it's all done in the name of making things faster, easier, and = more functional, then I'm all for it. I don't agree with your "weeks" assessment, either, FWIW. > > In some cases, it will. But sure, there are cases when a DB is not > > necessary. I can tell you, trying to write a serious RSS aggregator > > without one is much more difficult. >=20 > Then use sqlite if you really have to, but in things like knotes or kreci= pes,=20 > it's over-engineering. It's certainly not over-engineering for KRecipes - people do more than just= look up a text file for a specific recipe. Have a look at some of the commercial recipe apps on Windows some day - they're not just a bunch of text files. > > They are probably DB managers, or somesuch? We are talking embedded > > DBs, it's not the same thing. >=20 > OK, I'm willing to admit these are easier to handle than postgres & frien= ds,=20 > but I don't think it's worth adding in kdelibs. I am personally all for adding embedded DB support in kdelibs. --=20 Daniel Stone http://www.debian.org - http://www.kde.org - http://www.freedesktop.org "Configurability is always the best choice when it's pretty simple to imple= ment" -- Havoc Pennington, gnome-list --Oiv9uiLrevHtW1RS Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj9uVC0ACgkQcPClnTztfv2BsgCdGNVGs8/VVH3ajUZVMPSfBB/W 8M4AnA0xCoShdacL30CMV0VW/qtiCHXx =MtzZ -----END PGP SIGNATURE----- --Oiv9uiLrevHtW1RS--