Photo Gallery - Database Design

This is my database design in the photo gallery, do I like the feedback or what can be improved?

photos_category
- photocat_id (P)
- name
- slug
(5, 'Cars', 'cars')



photos_albums
- album_id (P)
- photocat_id (F)
- name
- description
- active
(20,5,'BMW','Nice BMW cars',1)

photos
- photos_id (P)
- album_id (F)
- image
(33,20,'bmw_car4.jpg')

bmw_car4.jpg - the original size, and it will be located at: / gallery / original / bmw _car4.jpg

For the interface (resize):

Thumbnail: /gallery/thumbs/bmw_car4.jpg

Image: /gallery/images/bmw_car4.jpg

+5
source share
2 answers

Your design seems right to me:

  • it is simple and functional,
  • no duplication of information,
  • and you can, from one object, find the relevant information.


, , - , (/gallery/original/ ).

, ( , ) - .
, :

  • /gallery/original/2011/01/: ,
  • /gallery/original/2011/02/: ,
  • ..

photos, .

+7

! , doctype. , , , , , , . , , , , : " ", . - . alt, name, description, created, last-modified , , , . .

0

All Articles