Results 1 to 6 of 6
Thread: Storing a LOT of strings / data?
- 05-06-2010, 06:38 AM #1
Member
- Join Date
- Sep 2009
- Posts
- 41
- Rep Power
- 0
Storing a LOT of strings / data?
I have been developing a sort of image browsing / managing program, for my some 10,000 photos I've taken over the years (I'm a semi-profressional photographer). Right now it uses folders as categories, I can move images from folder to folder, delete images, upload images in batches to the folders, a simple slide show, and some other simple functions.
The problem is, many images may fit into more than one category, or I want it to be in a category I don't have, but are too little images to be its own category. So my solution is a tag system, where an image will have several tags and can be searched for, but I don't know how to implement it. Storing several strings for 10,000 photos in a text file seems really inefficient to me; I don't want to have to wait forever for the application to store all the tags in arrays every time I start it up.
I'm fairly inexperienced with storing data like this, all the external data I've done has been stored in txt files, no more than 100 lines.
So how should I approach this? Whats the best way of externally storing thousands of strings?
Thanks.
- 05-06-2010, 08:28 AM #2
Use a database like mySQL.
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 05-06-2010, 08:45 AM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,406
- Blog Entries
- 7
- Rep Power
- 17
- 05-06-2010, 10:00 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Yep. You'll have a photograph table, either with a Blob for the photo or a string referencing the files location on the drive, an id, possibly a description, date taken, that sort of thing.
You'll have a category table, with id, category name, maybe a description field as well.
And a photo_category table, with a photo id and a category id. This will map your photo to any number of categories (and vice versa).
- 05-07-2010, 08:52 AM #5
Member
- Join Date
- Sep 2009
- Posts
- 41
- Rep Power
- 0
Hmm haven't worked with anything like this before but I'll give it a shot.
Thanks for the help!
- 05-07-2010, 09:07 AM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Similar Threads
-
Storing data to file :s
By idi in forum New To JavaReplies: 3Last Post: 02-13-2010, 08:54 PM -
Storing data?
By Syntax in forum New To JavaReplies: 4Last Post: 01-23-2010, 01:17 AM -
storing strings into an array
By anthonym2121 in forum New To JavaReplies: 2Last Post: 04-04-2009, 07:32 AM -
Storing data permanently
By shaungoater in forum New To JavaReplies: 2Last Post: 03-10-2008, 04:18 PM -
Storing Data
By Khorod in forum New To JavaReplies: 1Last Post: 08-03-2007, 05:48 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks