I inherited a perl CGI application that uses the integer primary key in the Microsoft Access database fabricate as the file name of flat text file to hold arbitrary amounts of text. It just dawned on me that this is a bad idea! If we compress the database, all those unique integer keys will change!
What is a way to fix this? Should we have actually store the text in the Microsoft database instead of storing the file name of the text file in the Access database? Many database vendors, including Microsoft Access have a feature like memo or blob for hold large amounts of data. But what about jpg or png or gif files? Let us suppose we have a web application that stores data on persons. One data enters then, their name, address, email address, phone etc. and then uploads a gif or jpg photograph. If we use the blob feature in the database, how do we use the img tag to point to a database record? If you are going to store gifs, it seems you would have to store them in a flat file and store the file name in the database. OK, how do you generate unique file names if you don't use the integer primary key? Thanks, siegfried