PDA

View Full Version : How to code a database? [programming Moblins]



AtmaWeapon
08-03-2004, 05:54 PM
I'm trying desperately to organize my digital photos, but unfortunately the harder I try to make a directory structure the more pictures I end up with that belong in several folders. A good idea at one point was to copy those pictures into each folder, but the files are kind of large and that makes it difficult for me to determine whether I've placed an image in my online scrapbook or not (yes I know there aren't many there but that will change if I ever find a way to keep track of this).

Now I'm sure that there is some kind of commercial photo album software that will do what I want to do. But I know the skeleton of what I want this album to do, and I think it'd be a shame for me to spend money on a program I could write myself, customize, and share with others.

For the purposes of the program, I need to use a database. That's the best way I can think of to handle a lot of related data that needs to be searched and sorted quickly. However, while I know how to work with a database through code, I'm not sure how to do it without some SQL server running on a machine. The project will be in VB .NET (Framework 1.1 most likely because 2.0 is still beta even though it is very sexy) so it needs to be a database that has ODBC connectivity (who doesn't, though?).

This would be ridiculously easy for me if I were running Apache with mySQL on it or MSSQL Server. I don't want to run a server, nor do I want to require users of the program to. I know for a fact that you can work with an Access database without Access being installed through VB, but all I've heard about Access databases is how unstable they are under heavy use. So what options do I have for working with a database without requiring the end user to run a server?

vegeta1215
08-04-2004, 03:06 AM
Code a database? Why do all that work when more than likely there's something out there already that can do what you want, and maybe for free?

I don't know if this is exactly what you're looking for, but this program here is really cool. It's a web photo album generator. It runs on all platforms and can most likely do what you want in terms of categorizing your photos in albums by date and subject, etc.

http://jalbum.net/

AtmaWeapon
08-04-2004, 11:44 AM
I do not want a web photo album. I searched Sourceforge and everything is a web album generator. I don't necessarily want to code my own database software, I just figured there was some solution that didn't require running an entire database server.

I haven't really fooled around with it though, so it's possible that well-chosen data structures can accomplish what I want. It would probablly be better if there was some way to incorporate custom metadata into each file. Is this possible without making the image format invalid?

theplustwo
08-04-2004, 12:49 PM
Doesn't your server already have MySQL support? Because almost all webhosts offer it. :shrug:

AtmaWeapon
08-04-2004, 04:01 PM
Originally posted by AtmaWeapon:
I do not want a web photo album. This is a program for the desktop.

I am not wasting my webspace uploading a gig of images just so I can flip through them sometimes. Also I have several pictures of personal value that I would much rather stay on my hard drive where I have explicit and reliable control over who accesses it.

The reason for the database has to do with how the images are categorized. I don't want to reveal too much of what I am doing because AFAIK no commercially available photo album uses this feature and I want to be the one to do it. I want the program to work pretty quickly with a possible several thousand images if the need arises. This is important to me because ever since I started programming it has been my dream to create some program that does something a commercial program does, only better, and release it as freeware.

I think that a well-constructed tree would probably fit the bill but I was hoping for some kind of database engine I could integrate into the program to save me the trouble of figuring out how to work it. This is mainly because the only way I can see the program working right now would require several trees, and this increases search time. A matrix would also be ideal, but will result in a large amount of wasted space.

So in short I have no real working idea of what to do without a database, but I would really like the program to work without a database. It is a fairly trivial matter for me to install MSDE and get it working for me but I plan on a public release of the program and asking people to install a whole database server and set it up is not a good user interface. Access databases would be the perfect solution except for the fact that Access is a sorry excuse for a database format and is very unreliable.

fatcatfan
08-04-2004, 05:12 PM
http://imgseek.sourceforge.net/sshot/

Did you check that one out? It supports exporting HTML albums, but it seems to be primarily for local disk organization.
You simply draw a rough sketch of what you want to find and imgSeek displays for you a thumbnail view of the best matches.

Group your photos by similarity for easy browsing. You may also have them clustered automatically by color, date (group events automatically using an adaptive clustering algorithm for time differences), filename or image features.

Edit metadata (description, camera, lens, etc) for every image

Advanced keyword searching for metadata.

Support for multiple volumes of pictures. You may assign all images on a CD to a given Volume

Remember the way images should be displayed: If you rotate an image 270 degrees, imgSeek will remember it and do the same the next time you view this image.

Organize and browse pictures in groups with an easy drag & drop interface. You can also perform advanced queries on groups (eg.: show me all images that belong to group A and B but not group C)That last one implies that a single image can be associated with any number of groups you like, providing exactly the function you want. The only downside I see is that there is no Windows version of this software. Maybe you can be the one to port it.

AtmaWeapon
08-04-2004, 05:58 PM
That is a really interesting program. It's got a lot more features than I want, but it does happen to have some features I'm looking for. If anything, it will be useful to read the source and see how it accomplishes a few of its tricks. Thanks!

*edit* I swear, looking at a lot of open source stuff, sometimes I believe the guys at work that I comment too much.