Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Convert a ER model into a relational database schema expressed in SQL DDL, with appropriate constraints. Use Create Table Command Associated with each photo is

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

Use Create Table Command

Associated with each photo is user-supplied information on its content and quality. Including it on the diagram above would have made things to messy, so we show entities, attributes and relationships for photos and their ratings and tags below:image text in transcribed

Comments on Tags and Ratings

a photo may have an arbitrary number of tags associated with it

each tag is defined primarily by a descriptive name (up to 50 characters in length)

in order to efficiently accomodate interface notions like "tag clouds", a count of the number of times each tag is used is stored in the tag record and maintained by the application

a photo can be tagged by many users (and each user might tag it differently); we keep a record of when they tag it (time-stamp)

each time a photo is tagged, the overall frequency counter for that tag is incremented

a photo may also be rated on a 1..5 star scale by users

each time a rating is made, the system records the user who made the rating, a time-stamp for when the rating was made, and the actual rating value

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions