The Logical Data Model
The data model is quite simple for now.
Users are associated with s. Many users can be associated with a group, and there may be multiple groups.
For now, there is only one group, for registered users.
Groups are associated with a unique
User is identified by a user-specified
userId that is unique among users, and is associated with a password, to enable the user to sign in to the application.
Users can have many
Albums, with each
Album can have a cover
Photo; an album with no photos will have no cover photo.
User is deleted, the
Albums owned by the user are deleted. When an
Album is deleted, the
Photos in the album are also deleted.
Album is created, a
name and an optional
description must be supplied. These are provided by users to organize albums.
Albums will be identified by a unique number - the
albumId which is an incrementing sequence that will be provided by the application.
Album names could be the same across multiple users - we do not want users to be unable to choose a name for their album because another user had chosen the same!
Photo is uploaded, the application is expected to store
titlefor the photo
- a short description of the photo in the
- the file name of the uploaded photo in the
- the binary contents of the photo in the
- the time of the upload in the
Photos will be identified by a unique number - the
photoId which is an incrementing sequence that will be provided by the application.
description attributes are used to enable users to organize photos - photos could lack a title at the time of creation, making them unsuitable as primary key candidates.
Also, titles of photos could be the same across multiple users - we do not want users to be unable to choose a title because another user had chosen the same for a differnt photo!
uploadTime attributes for a
Photo cannot be null, since a photo is expected to be associated with a binary file that was uploaded at some point in time.
The Physical Data Model