in reply to An odd flat file database question

I've read through this post a couple of times, and I don't quite see what your question is.

If you've got a 10k line flat-file, I think it's time for you to consider moving to a more flexible and robust database system. Mysql, PostgreSQL and the venerable Berkeley DB system are popular free (at least as in beer) options for you.

You "control number system" is essentially the unique primary key in your database. It's a pretty standard practice. In what way do you find it "cumbersome". If it's a problem with re-keying your database every time you add or remove an item, my advice is don't. When you remove an item, that primary key is gone forever, when you add an item, just increment your max primary key. Save a copy of the max primary key somewhere else so you don't need to run through your entire database to find out what it is. Since your primary query is by catalog number, keep your database sorted by that. (If I've guessed your problem wrong, then I apologize. :)

It also sounds like you have a database normalization problem that you'll want to address eventually, but I guess that can wait.

Update: sounds like you want to learn how to tie an array ... maybe check out DB_File.

Replies are listed 'Best First'.
Re: Re: An odd flat file database question
by Stamp_Guy (Monk) on Feb 08, 2001 at 07:00 UTC
    Thanks for your information about the database normalization. I'm reading that right now. I am a total novice in database programming. I have never even messed with any SQL stuff before and have dealt solely with flat file databases. I would really like to learn how to use SQL databases but I really don't know where to begin learning. Can you guys point me in the right direction? Also, the server this site I'm working with is hosted on has no useful documentation. How in the world do I even find out whether there is an SQL server installed on it. Pardon all my ignorance I'm kind of a newbie.
      Chances are, if this is a closed system and you have no idea if there is a SQL server somewhere hidden, then there probably is no SQL server. If you can, download MySQL and the docs will be installed along with it. You might start also here in our Tutorial section on DBI. I performed a simple web search on google for "MySQL tutorial" and came up with this helpful link. With so many entries, it's time to upgrade, otherwise you're not only wasting your own time, but precious processing time.
      AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.