Jump to content


Photo

Video views database structure


  • Please log in to reply
2 replies to this topic

#1 AnalyzeThis

AnalyzeThis

    Member

  • Members
  • PipPip
  • 17 posts

Posted 15 February 2013 - 09:53 AM

Good morning,

I am working on the database structure of a video system (basically ;) ). This system would keep track of clients views of a video and list who watched the video.

Accounts Database
=========================
Accounts | type | name | etc.

Video Database
=========================
Name | title | type | etc.

Only videos and viewers of the same time will have access to the video. I want to be able to see if a viewer has watch a video and list all viewers. What what I am wondering is where to put the views records? Should I create a view databases

Views database
=========================
account | video |

Thanks for any assistance.

#2 Barand

Barand

    Sen . ( ile || sei )

  • Gurus
  • 13,885 posts
  • LocationCheshire, UK

Posted 15 February 2013 - 10:05 AM

Should I create a view databases


Definitely.

You have a many-to-many relationship where a video is viewed by many users and a user can view many videos. Therefore you need the view table.

Edited by Barand, 15 February 2013 - 10:06 AM.

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts
|baaSelect| generate js and php code for dynamic linked dropdowns

 


#3 AnalyzeThis

AnalyzeThis

    Member

  • Members
  • PipPip
  • 17 posts

Posted 15 February 2013 - 10:24 AM

Thank you!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com