Re: Clues on modeling a really simple concept

From: Walter Mitty <>
Date: Thu, 09 Apr 2009 12:28:26 GMT
Message-ID: <KRlDl.2534$>

"Spike" <> wrote in message On 8 abr, 14:10, "Walter Mitty" <> wrote:

>> Whatever you do, make it fun. Good luck.

> Thank you!

You're welcome.

If I can just follow up with a specific answer to your original question, here's a summary, in plain English of the ER model, as I perceive it.

Entities: (user, photo, gallery) Keys are probably UserID, PhtotoID, and GalleryID. Keys are probably synthetic.

Relationships: One user can own many pictures, but each picture belongs to exactly one user. One user can own many galleries, but each gallery can be owned by exactly one user. A picture can be in one or more galleries, and a gallery can contain one or more pictures. A gallery can be empty. A picture must be in at least one gallery.

Non key Attributes: to be determined.

Unclear: Can a picture be in a gallery if the picture owner and the gallery owner are different users?

Glossed over: the possibility that two pictures are seen by the database as "different pictures", even if, in some sense, they are really "the same picture".

Note: the fact that I have included the "user owns gallery" relationship here is a description of the subject matter. It does NOT anser the question of whether the database design should or should not implement this relationship (via a foreign key).

Note: the "junction table" between pictures and galleries is UNNECESSARY at this level of description. the fact that the relationship is many-to-many has been stated, without stating how it will be designed or implemented.

More details are needed for a logical and physical model, but that's it for now.

Again, it's your project. This is just my take on what you've said. Received on Thu Apr 09 2009 - 14:28:26 CEST

Original text of this message