Re: Clues on modeling a really simple concept

From: Walter Mitty <wamitty_at_verizon.net>
Date: Thu, 09 Apr 2009 12:28:26 GMT
Message-ID: <KRlDl.2534$Q52.820_at_nwrddc02.gnilink.net>


"Spike" <fauria_at_gmail.com> wrote in message news:52a2ad9d-b4db-4e17-87a6-deed2e19c9b3_at_n8g2000vbb.googlegroups.com... On 8 abr, 14:10, "Walter Mitty" <wami..._at_verizon.net> 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