Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?
Databases Programming Software IT

F/OSS Flat-File Database? 702

Leemeng writes "I'm looking for a simple, free, and F/OSS flat-file database program. I'm storing info about Wi-Fi access points that I come across, maybe 8-9 fields per entry. I've outgrown Notepad. This info is for my own reference only; it is not going on a Web server. Googling was unhelpful, with results skewed towards SQL, Access (MS), and Oracle, all of which would be overkill for my purposes. My criteria are: it must be simple, F/OSS, must work in Windows Vista, preferably use a portable format, must not be an online app, and must not require Java. Does such a beast exist?"
This discussion has been archived. No new comments can be posted.

F/OSS Flat-File Database?

Comments Filter:
  • No Java? (Score:5, Insightful)

    by jawtheshark ( 198669 ) * <slashdot@ja w t h e s h a r k . com> on Tuesday May 20, 2008 @07:01PM (#23484254) Homepage Journal

    I would have recommended HSQL, but you don't want Java. Frankly, usually, when we're talking databases I won't say "use a spreadsheet", but with 10 fields, you might as well use a spreadsheet. Of course Base is out, because it uses HSQL.

    Something like CSQL [] might fit, but I have no experience with it.

  • how about... (Score:4, Insightful)

    by ramirez ( 51663 ) on Tuesday May 20, 2008 @07:07PM (#23484366)
    a comma delimited file?

    Umm... just write a few one-liner perl scripts to get info out.
  • by bluefoxlucid ( 723572 ) on Tuesday May 20, 2008 @07:09PM (#23484400) Homepage Journal
    Trying to solve such an issue as a flat file is a poor design characteristic. This says "I don't want to learn SQL" or "I want the output human readable." If you just want to store information for programmatic use, use SQLite and quit worrying about data storage format. If you want it human readable, grab libxml2 (works on Windows too) and store it as XML. Decide which problem you are solving because if you don't need (i.e. it's not helpful) it human-readable and/or want the ability to search it quickly without loading the whole thing into memory, then SQLite is probably a better solution.
  • Re:sqlite (Score:4, Insightful)

    by MBGMorden ( 803437 ) on Tuesday May 20, 2008 @07:21PM (#23484592)
    Was going to suggest this myself but looks like you and many others beat me to it. Yes SQLite is "SQL", but I can't think of an actual program where I'd consider it's use overkill. It's made precisely for small little projects that don't want or need to use something like MySQL or PostgreSQL.
  • Re:Python? (Score:5, Insightful)

    by maxume ( 22995 ) on Tuesday May 20, 2008 @07:24PM (#23484648)
    Why not sqlite? Comes with Python 2.5 on Windows. It adds a relatively weighty 800k or so to my python installation on Windows, but the installation is dozens of megabytes overall, so it doesn't really matter.
  • Re:OOO? (Score:5, Insightful)

    by ADRA ( 37398 ) on Tuesday May 20, 2008 @07:27PM (#23484694)
    OpenOffice uses Java for its database tool. I'm fine with it, and its probably the best choice for anyone actually wanting something simple / usefull / free, but obviously the OP is a trolling wanker, so it has to be san-Java.
  • by holophrastic ( 221104 ) on Tuesday May 20, 2008 @07:29PM (#23484720)
    If it's just for your reference, you don't need a database at all. Databases don't become technically worth-while until you get to indexing. And until you have fifty-thousand records, or complex queries, you don't need indexing.

    So why not simply write out a tab-delimited file? Retrieval is as simple as reading every line, splitting by the delimeter, and regexp'ing whichever field you're examining. 15'000 records takes about two seconds on a modern machine. Of course, for anything more complicated, that same file gets easily imported into your favourite spreadsheet application.

    You don't need to worry about locking because you're the only one using it. And otherwise, your application simply locks the file handle, or creates & destroys a traditional lock-file.

    It's a thirty-line perl script (of legible perl). You can do it in JScript as a local HTA if you want the benefit of html etc. interfaces.
  • Re:Python? (Score:5, Insightful)

    by fyngyrz ( 762201 ) * on Tuesday May 20, 2008 @07:45PM (#23484956) Homepage Journal

    Care to tell me exactly what the user of GPL software is not free to do? Otherwise maybe you'd like to retract your casual FUD-spreading aside.

    I can't legally utilize GPL'd source code within a commercial application without doing some very specific (and not always possible) things that the GPL license instructs me I must do. Any other ways I can help with your basic F/OSS education? I'll be here all day.

  • Re:Python? (Score:3, Insightful)

    by Anonymous Coward on Tuesday May 20, 2008 @07:45PM (#23484958)
    Hooray, falsehoods!
    You're more than welcome to use with any other software, you just can't distribute.
  • by Aelyew ( 14580 ) on Tuesday May 20, 2008 @07:47PM (#23484988)
    As the original poster had been utilizing Notepad previously, vi/vim should both be considered significant upgrades.

    It would help if the OP had posted the current number of records and projected growth. Size of the database and how it will be utilized goes a long way to determining a 'best' solution.
  • by blippo ( 158203 ) on Tuesday May 20, 2008 @07:55PM (#23485112)

    Well... XML is human readable in the same way as a sand is edible.

    If the OP wants to use a tool better than notepad for editing, he probably should try Open Office.

  • Re:Python? (Score:5, Insightful)

    by aweraw ( 557447 ) * <> on Tuesday May 20, 2008 @07:58PM (#23485168) Homepage Journal
    Mod parent up.

    IMO, the people who still, after all these years, haven't figured out how to make money with GPL software are the failures, not the GPL.

    Its just a software license; it doesn't preclude you from charing money for your work, and it doesn't mandate you make your work avaiable to the general public. I can't fathom why some seemingly intelligent people have such a hard time grasping this concept.
  • Re:No Java? (Score:3, Insightful)

    by SanityInAnarchy ( 655584 ) <> on Tuesday May 20, 2008 @07:59PM (#23485196) Journal
    In fact, the requirements are pretty extreme.

    Must not be "online" -- does that rule out web apps? Even if they'll run on your local machine?

    And why no Java? Can't be for efficiency, otherwise you wouldn't be running Vista. Maybe something's broken with your Java?

    Also, what are the required features? You may have outgrown Notepad, but have you outgrown vim, grep, and friends? That's probably why there's not much F/OSS for this kind of thing. Just a guess.
  • by wernst ( 536414 ) on Tuesday May 20, 2008 @08:03PM (#23485240) Homepage
    I'm guessing he wants a FOSS version of FileMaker Pro; something that is an application with a GUI. All you guys are suggesting various frameworks he can use to program his own. No, I don't have an answer either, other than to suggest the spreadsheet in OpenOffice.
  • Re:Python? (Score:2, Insightful)

    by Anonymous Coward on Tuesday May 20, 2008 @08:11PM (#23485354)
    fyngyrz, what's with the inflammatory anti-GPL remark that's not even relevant to the topic at hand?

    I'm a huge fan of the GPL, but when I refer someone to BSD software I don't stick in useless remarks about it being the license that's "free for selfish pricks who want to enjoy the benefits of freedom for themselves while depriving others of same".

    Give it a rest -- that chip on your shoulder is neither useful nor attractive. There's nothing wrong with choosing to share unconditionally, and there's nothing wrong with choosing to share with those who choose to share.

    Plus you've mischaracterized the GPL -- it remains free to *use* unconditionally, the strings are attached only to redistribution.
  • Re:Python? (Score:4, Insightful)

    by fyngyrz ( 762201 ) * on Tuesday May 20, 2008 @08:15PM (#23485410) Homepage Journal

    But you can do this with non-free software's source? I'm missing your point I believe.

    Yes, you missed the point. You can do it with PD software, specifically with the software in the post that this thread depends from (class dbtxt.) PD source allows you more freedom(s) at the user end. GPL source allows you (a lot) more control at the author end.

  • Re:Err ... (Score:5, Insightful)

    by DAldredge ( 2353 ) <SlashdotEmail@GMail.Com> on Tuesday May 20, 2008 @08:28PM (#23485566) Journal
    Just tired that on Excel 2007 - it imported correctly. The three fields all imported correctly.
  • Re:Err ... (Score:3, Insightful)

    by 808140 ( 808140 ) on Tuesday May 20, 2008 @08:31PM (#23485602)
    As the parent said, there are ways around it (using VBA ... ugh). But Excel is not a program whose purpose is to solve math equations, it is a program whose purpose is to manage spreadsheets. Spreadsheets contain data, and typically not just numeric data.

    I work at an investment firm, and we get CSVs from our vendors with SEDOLs in them. Excel will helpfully (and silently) strip the leading zeros on UK securities, for example. Oops.
  • use a spreadsheet (Score:3, Insightful)

    by crevistontj ( 1032976 ) on Tuesday May 20, 2008 @08:39PM (#23485682)
    Why one earth would you use a database to store one table on information? Save youself some trouble and use a spreadsheet.
  • Re:Python? (Score:5, Insightful)

    by morgan_greywolf ( 835522 ) * on Tuesday May 20, 2008 @09:01PM (#23485900) Homepage Journal
    He said he wanted a flat-file database. Why, on this Earth, would he ever need "standard SQL including joins." SQL is designed for relational databases and, in particular, joins are only EVER used in a multi-table, relational database. In fact, the guy even said "SQL is overkill".

    IOW, SQLite, as "lite" as it is compared to Oracle, MySQL, PostgreSQL, etc. is still overkill.

    I'm with the GP -- dbtxt looks really cool. Although, I do gotta say that would fit the bill just fine for what his requirements are: Calc can be used as a flat-file database, and I think there is support for simple CSV databases in Base.

  • Re:Python? (Score:4, Insightful)

    by QuantumG ( 50515 ) * <> on Tuesday May 20, 2008 @09:06PM (#23485962) Homepage Journal
    Uhh.. is that an honest question?

    Proprietary licensing is specifically designed to make the licensee dependent on the licenser. If there's bugs in the software then the licensee can't fix it and there is only one place the licensee can go to get the bugs fixed, the licenser, who is free to refuse to fix the bugs or demand exhorbinate fees to do so. Same with new features or support.

    If you wouldn't do this to someone directly then giving code to someone else so they can do it is unethical.

  • Firebird? (Score:2, Insightful)

    by LiENUS ( 207736 ) <slashdot@vetma n a g e . com> on Tuesday May 20, 2008 @09:06PM (#23485964) Homepage
    Firebird ( []) works with many programming languages so it is not tied to java, works fine with windows vista and operates without an installed server in its "embedded server" mode.
  • Re:Python? (Score:2, Insightful)

    by fyngyrz ( 762201 ) * on Tuesday May 20, 2008 @09:32PM (#23486240) Homepage Journal

    Yeah, but it can actually store strange and exotic things like strings that have codepoints > 127.

    Codepoints, eh? Cool!

    Actually, dbtext, as is, can be made to store anything you like; this is a natural consequence of the fact that there are lots of fun and interesting ways to put codes of 8-bit and greater sizes into multiple 7-bit containers, including approaches that maintain readability for the base ASCII set.

    I will grant you, however, that such exotic and deeply complex programming feats may be beyond your own abilities. In that case, and presuming you want to store such objects, dbtext is surely not for you. I am deeply, deeply saddened. Well, not really. But you can think so if you like.

    Or... and I know this is a crazy, crazy idea... if you need such a thing, you could always ask the author if they would be willing to implement it for you. They might do it. Sort of boggles the mind, doesn't it? Polite and respectful human interaction. Seems... wrong, somehow, doesn't it?

  • Re:Python? (Score:2, Insightful)

    by scott_karana ( 841914 ) on Tuesday May 20, 2008 @09:36PM (#23486274)
    I wish the GPL was more permissive, myself; while it needn't be as open as BSD and MIT licenses, it'd be nice to allow for similar but incompatible licenses like the CDDL to link with it.

    In before "Use LGPL": we'll never see ZFS in the Linux kernel because of the above problem, unless Sun decides to get rid of the clauses that make you immune to patent suit from them.
  • Re:Python? (Score:5, Insightful)

    by fyngyrz ( 762201 ) * on Tuesday May 20, 2008 @09:52PM (#23486380) Homepage Journal

    ...the licenser, who is free to refuse to fix the bugs or demand exhorbinate fees to do so. Same with new features or support.

    To be fair, a proprietary licenser is also free to fix the bugs ASAP and well, provide such fixes for free, also to provide new features for free if they like. I do this all the time with a commercial application. A PD author also retains such freedom. These are not benefits that exclusively arrive via the GPL. And it is well to consider that with a GPL, PD or commercial application, one is free to demand money to fix something, to add features to it, to explain or teach its use, or even to simply use it. Doesn't mean you'll get it, but it doesn't mean you won't, either.

    If you wouldn't do this to someone directly then giving code to someone else so they can do it is unethical.

    I don't think you've really analyzed this far enough. Giving someone something, and then telling them what they can and cannot do with it, carries ethical problems in the form of imposing your will on someone else (and it also devalues the gift, in my personal opinion.)

    "Here's a gift of a book; but you can only read it if you use LED lights." "Here's a gift of a cat; but you can only have it if you'll eat it." "Here's a gift of a some money, but you must spend it upon me."

    You see? This is why the term "freedom" has always seemed to go so poorly with the coercive requirements that the GPL applies to the various recipients in the chain of "gifts."

  • Re:Python? (Score:1, Insightful)

    by Anonymous Coward on Tuesday May 20, 2008 @09:53PM (#23486384)

    His point is blindingly obvious and it's well known to anybody familiar with the GPL, so I can only imagine you are being dense on purpose. You are going around saying that the GPL has restrictions on use. It does not. It restricts distributing copies. You are free to use GPLed software any way you see fit. It is only when you distribute copies that you need to follow the rules laid out in the GPL. If all you are doing is using the software, you don't need to agree to the GPL at all.

  • by Anonymous Coward on Tuesday May 20, 2008 @09:59PM (#23486444)
    ...because he wants to hack his own system...
  • Re:No Java? (Score:5, Insightful)

    by geekboy642 ( 799087 ) on Tuesday May 20, 2008 @10:10PM (#23486560) Journal
    Mod parent up.
    This guy wants a spreadsheet, he just doesn't know it. Excel--or the free alternative from do everything he could possibly want, and although it saves as its own infernal file format, it exports competently into a tab or comma-delimited format.

    All the extra "requirements" are just pseudo-intellectual mumbo-jumbo that have no bearing on reality.
  • Re:Python? (Score:4, Insightful)

    by fyngyrz ( 762201 ) * on Tuesday May 20, 2008 @10:24PM (#23486714) Homepage Journal

    I can only imagine you are being dense on purpose

    Your imagination, not to put too fine a point on it, has failed you.

    You are going around saying that the GPL has restrictions on use. It does not

    Yes, in fact, it does.

    I have come across a snippet of GPL'd source code. I want to use it in my gigabyte of source code commercial app, which, prior to such inclusion, is legally mine to distribute, which is a use I make of this object, that is, my application. However, as quite common in commercial efforts, I cannot legally distribute the source code of my application. So, one day I use the GPL'd source code by compiling said GPL source into the commercial app. I mod it to better suit my use of it. My app is suddenly subject to a change in usability, imposed by the GPL, such that I no longer have the option of using the same way (which act can also be characterized as distribution) to earn money, and my customers no longer have the option to use my altered application. This viral alteration of the usability of my application is entirely courtesy of the GPL. In order to reverse this alteration and keep the code snippet in use in the application, I must perform actions that I actually do not have the option of choosing due to previously existing obligations (essentially source code distribution.) The end result is that the GPL'd code cannot be used if the commercial application is to remain usable.

    To be blunt, the word "use", (as well as all of its natural permutations) which you depend upon so heavily in your flawed analysis, doesn't have the limited meaning you wish it had — nor has it ever, or will it ever, have such a limited meaning. This is why your argument is specious.

  • by spookymonster ( 238226 ) on Tuesday May 20, 2008 @10:43PM (#23486886)
    1) My example was done to show how quick and easy it would be to set up and populate a table in Python.

    2) He's explicitly mentioned several times that this is for his own private non-web use.

    3) Your fly is open.
  • Re:Python? (Score:3, Insightful)

    by lysse ( 516445 ) on Wednesday May 21, 2008 @12:02AM (#23487598)
    Them's the breaks, if you want to use the code. If the licensing terms of the GPL are too onerous for you, then that's fine - don't use it. Just don't try to bullshit the rest of us because you're peeved that you can't have a freebie. It makes you look cheap and awfully transparent.
  • It isn't obvious? (Score:1, Insightful)

    by Anonymous Coward on Wednesday May 21, 2008 @12:11AM (#23487650)
  • Re:Python? (Score:3, Insightful)

    by abigor ( 540274 ) on Wednesday May 21, 2008 @12:40AM (#23487856)
    I use it every day in my business - works great. But now my happiness is tainted by my victimhood. Perhaps spending some of those thousands of dollars I've saved on phone calls will make me feel better though.

    In other words: get some perspective. People who get raped or murdered are victims. People who use proprietary application software run the spectrum from happy users to suckers, but that's about it.

  • by Fmuctohekerr ( 841734 ) on Wednesday May 21, 2008 @12:49AM (#23487964)
    Explain to me how you can 'inject' anything into a string literal. Nowhere in the post does he build a SQL statement from user input. Methinks you are just a little too ready to bust someone.

    I know that feeling.


  • Re:Python? (Score:5, Insightful)

    by Jason Earl ( 1894 ) on Wednesday May 21, 2008 @01:14AM (#23488220) Homepage Journal

    Why should the GPL hackers share with you if you aren't willing to share with them?

    You don't like their license. That's fine, they don't like your license either.

  • Re:Python? (Score:4, Insightful)

    by fyngyrz ( 762201 ) * on Wednesday May 21, 2008 @02:32AM (#23488770) Homepage Journal

    I honestly believe that if you put your code out there for someone to use you should try to get something for it. Your life, the time you spend writing the code, is valuable. Make it worth something.

    It's my code; I chose to make it PD; and I do get something for it, I get to add a shoulder to the wheel, as it were, if anyone will accept my contribution... and I enjoy the idea that the time I spent saves someone else some of theirs, hopefully such that they can create something above and beyond what I already did. Sometimes that's enough. I've gotten lots of help off the net, no strings at all -- so I don't find it at all peculiar to offer something back likewise sans strings.

    Some works we contribute; some things we ask a return for. I'm ok with both approaches, really, it is the ones in the middle (supposedly "free", but with substantial strings) that don't attract me either as a user or a contributor. That's just me. What seems to rile people up is if I talk about the reality of those strings. That's when we get these threadfests.

  • Re:Python? (Score:4, Insightful)

    by XNormal ( 8617 ) on Wednesday May 21, 2008 @03:03AM (#23489002) Homepage
    How is this moderated as "informative" when it contains blatantly incorrect information? SQLite is most definitely present in all Python 2.5 installations. It's part of the Python source tree. It's as much a part of the Python distribution as the regular expressions library you use in your code. And if you insist on using an older version of Python SQLite is just one apt-get away.

    In what specific ways does the supposed "bloat" of SQLite affect the user, exactly?

    What kind of "maintenance" does the user need to do on the SQLite source code? It's maintained well enough for some some pretty big users []. Who maintains your code and why should I trust you with my data?

    How can SQLite be "difficult to use" when it's just standard SQL with a standard Python DBAPI interface?

    It's really nice that you wrote a cute little datastore. But there's no need to badmouth what you perceive as the competition.
  • Re:Python? (Score:2, Insightful)

    by bestinshow ( 985111 ) on Wednesday May 21, 2008 @05:45AM (#23489920)

    IMO, SQL is not overkill. It can be much more useful and faster than flat files.
    In addition, there is a strong chance that this small personal project will grow, and then require more tables, and therefore you might as well do it this way from the start to avoid the common issue of extending the wrong solution too far because you don't want to change over to the right solution.

    Otherwise just use CSV and be done with it. I bet anyone here, in their language of choice, could write a fairly fully featured CSV based datastore (create/read/update/delete) tool in a few hours, especially if the application just reads it in at start, manipulates the dataset in memory, then writes it out.
  • by Rogerborg ( 306625 ) on Wednesday May 21, 2008 @06:35AM (#23490228) Homepage
    Do you always ignore requirements when designing a solution, or are you making a special exception in this case?
  • by Bozdune ( 68800 ) on Wednesday May 21, 2008 @07:22AM (#23490468)
    Yes, one can create work-arounds with GPL'd library code, like compiling the library separately and building a socket or messaging interface to it (which interface of course has to be GPL'd as well), but this can be a PITA as you point out. And, as I'm sure you'd agree, workarounds like that are not always possible for performance and other reasons.

    Yes, authors who use the GPL have decided that we can use their code in a certain way, and that's their privilege. However, it can be a dumb choice, because as the grandparent poster points out, those of us who do rely on proprietary licensing models for our revenue (and that would be the majority of us) are often unable to give anything back to the community as a result. I'd love to be able to use some GPL'd libraries in our stuff, and I'd love to be able to piss in those libraries to contribute bug fixes and help out in general. But the GPL forces me in another direction, usually to reinvent the wheel or to use something that's closed source and potentially less capable.

    If you author a library, think hard about the licensing model. The GPL may not be the best choice -- unless, of course, you have a religious belief that all software should be GPL, which is your decision to make. I don't get into religious arguments, so that would be the end of the discussion.

  • Re:Python? (Score:3, Insightful)

    by bigstrat2003 ( 1058574 ) * on Wednesday May 21, 2008 @07:48AM (#23490632)
    It's more specific than even that, otherwise the GPL should have no problems with people using GPL code in BSD-licensed projects. The fact of the matter is, the GPL doesn't really promote freedom like it claims to. That's the problem, that it talks the talk but doesn't walk the walk. If the GPL wasn't touted as promoting freedom so much, I wouldn't have a problem with it. As it is, it's sheer hypocrisy, and I despise it for that.

    Besides, you don't think it's a bit rich to try to restrict "the community" to what you want it to mean, rather than the natural interpretation of the word?

  • Re:Python? (Score:3, Insightful)

    by Junta ( 36770 ) on Wednesday May 21, 2008 @08:47AM (#23491130)
    Why is it overkill? Just because it *can* offer advanced features does not mean you must use those. It's just another DB implementation that happens to use SQL syntax as its query format. For basic stuff, SQL is very straightfoward (doesn't get much simpler than "select name from custromers where address like.."). The amount of setup is trivially the same as any other file (open/create a file just like anything else), and the space requirements are negligible.

    In response to the mentions of DB engines that use a human-readable format, my experience with those is that I gain practically nothing because I rarely end up reading the DB directly, but it is horrendously slow for many operations. Not much to gain, a lot to lose. When I do want a plaintext backup or something to read, it's a sqlite dump away. If the databse access are exceedingly rare, a plaintext may be 'enough', but at the end of the day, a solution like SQLite or a bdb setup is much more widely used and tested.
  • Re:Python? (Score:2, Insightful)

    by chriseyre2000 ( 603088 ) on Wednesday May 21, 2008 @09:15AM (#23491426) Homepage
    The GPL does not have to be the only licence on some code. If you find some GPL code that you want to use without invoking the GPL then cut a deal with the copyright owner of that fragment of code.

    Following the rules of the GPL is the price for using GPL code. If you don't like the price then either renegotiate it with the copyright owner or don't use it. This is no different to the licencing cost of a tiny part of a proprietry component suite.

Receiving a million dollars tax free will make you feel better than being flat broke and having a stomach ache. -- Dolph Sharp, "I'm O.K., You're Not So Hot"