gymanual 0 Newbie Poster

Gallery database

--------------------------------------------------------------------------------

Hello averybody I would like to know your opinion how do you design a database that will works as photo gallery, let's count there will be a lot of pictures.
Do you save the pictures on the disk or directly on the database?

Write please your ideas and reasons why exactly that way.

One way how I should do it is to make the following tables

usertable
gallerytable
phototable
may be others

in the the phototable will be info just as text with path to pictures wich will be save it on the disk.
But in this case I'm worring to lose for any possible error any picture and also the mantinience or backup is more easy to make it by database then by system for the files.

Other way is to save it to the database but if I save all pictures to one table phototable the select queries will take a lot of time. So I'm not sure it is the best.

Other idea is to dinamically create a table for any user and on that table save the pictures for respective user.

Write please your opinions or ideas.
Thank you in advance.
GyManual

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.