database design for photographs

Reply

Join Date: Oct 2009
Posts: 2
Reputation: ana.gr is an unknown quantity at this point 
Solved Threads: 0
ana.gr ana.gr is offline Offline
Newbie Poster

database design for photographs

 
0
  #1
Oct 8th, 2009
Hi
I would like to create a database to classify and control all the photos that I have stored in my computer.
It is clear that I need one table PHOTOS with attributes of ID, name, camera and date.
Second table would be DATA, including aperture, ISO, fstop, focal length, and so.
Then come the problem: I would like to be able to include tags, for example portrait, landscape, etc, but some are subclasses, for example in portrait>family>my kids.
How can I construct the table, simply a list of tags each with an ID? And how do I relate the photo ID to the tags, if there are , say 6 for a photo?
And same problem with the lat table LOCATION in the computer: my files are stored in folders by years and inside the year, dates. I don't know how to construct the table for this.
Can you offer any help? (I am VERY new to databases, but I will learn)
THANK you in advance!
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,218
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 489
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer
 
0
  #2
Oct 12th, 2009
What you are trying to do is called mapping.
You have table 1 with info on photos and table 2 with info on various photo types. You will create table 3 that will have two entries per record and it will be photoID and photoTypeID.
So once you have request to show all landscape photos you query table 2 of photo types to get ID of landscape type. Then you can query mapping table to get you information on ID of photos associated with this type of photo and with result from this you can pull data from table 1 on selected photos.
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 2
Reputation: ana.gr is an unknown quantity at this point 
Solved Threads: 0
ana.gr ana.gr is offline Offline
Newbie Poster
 
0
  #3
Oct 13th, 2009
(ok, I had to google for mapping dabases first...)
I am working on a diagram of ER dabases, but then followed your advice and started designing tables and connections.
When I have something decent, I'll post so I can get your opinions.
Thnaks very much for your answer, Peter. It helped.
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC