I assume you are going to use the foreign key options within the database?
I wouldnt make a field 'num of images' in the Gallery table. Just make a count on Gallery_images table. This way you will never have to manually update your Gallery table if the images set get bigger or smaller.
If you dont mind me asking, are you going to use mysql or postgresql, and why?
|