-2

I'm working for a database project that my professor gave to me and now i'm designing the relational schema of database. I have three entity types album, photo and video that means an album can contain both of them, but I have no idea how to tie them up together.

I'm a beginner in this field so please give me some advice what to do ?

  • What seemed like a start at part of a design after you googled re your title, tags & 'album, photo and video'? Or read some intros to database design? – philipxy Nov 30 '16 at 21:57

1 Answers1

0

I assume an album can contain several photos and videos. You can create a table joining them. This table can have essentially fours columns: the id of the album, the id of the photo or video, a flag distinguishing whether photo or video, and an index to define the order of the items within an album.

It can of course have an own ID (drawn from a sequence or via autoincrement), a timestamp when it was created, a userid by whom etc.

Can several copies of the same photo belong to an album?