Question: Convert a ER model into a relational database schema expressed in SQL DDL, with appropriate constraints. Use Create Table Command Photos The following diagram shows

Convert a ER model into a relational database schema expressed in SQL DDL, with appropriate constraints.

Use Create Table Command

Photos

The following diagram shows entities, attributes and relationships relevant to photos on the pics.net site. We assume that the photo files themselves are stored in the file system with a name based on the photo ID and that the application logic can retrieve a photo given this ID. Thus, no photo image file data is actually stored in the database (except file size).

Convert a ER model into a relational database schema expressed in SQL

Comments on Photos:

each photo has an automatically defined unique numeric ID

a photo must have a title, a string up to 50 characters long

a photo may have a description, which is arbitrary text

the user may supply the date on which the photo was taken; the system will automatically provide the date it was uploaded

the file size of a photo is stored as a whole number of KB

visibility is given by one of the values 'private', 'friends', 'family', 'friends+family', 'public'

safety level is given by one of the values 'safe', 'moderate', 'restricted'

since the description of the technical details of photos can vary widely, such details are supplied, if the owner wants, simply as a text string

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!