Post on 12-Dec-2020
TV Viewing Database Project
Group #1
TEAM MEMBERS: HOLLY CHOK, MATTHEW CALUGAY, GEORGE BASANTESCREATED DATE – 1O/23/2019
LAST UPDATED DATE – 12/11/2019CURRENT VERSION: 1.6
1
Table of ContentsMission Statement 2
Mission Objectives 2
Field List 2
Table List 3
Data Model 4
Viewings List 6
ERD 8
Change Log 10
2
Mission StatementThe purpose of the ITI330 Expense Database is to track the TV viewing habits of participants in a manner that reports may be generated and analysis may be performed.
Mission Objectives Maintain TV show information. Keeps track of TV programs viewed and information about that viewing occurrence. Maintain a list of TV show categories. Produce a name searchable TV show directory. Produce a viewing history report between dates. Produce TV show category report. Maintain viewer information Produce a list of favorite shows watched by user Produce TV network report
Field List
3
Field Name NotesepisodeID Auto-generatedshowID Auto-generated FKseason TinyintepisodeNumber TinyintshowTime DatetimeshowViewer IntShowRuntime Int
categoryID Auto-generatedshowCategory Varchar(50)
showID Auto-generatedCategoryID Auto-generated FKshowName Varchar(50)NetworkID Auto-generated FK
favID Auto-generatedviewerID Auto-generated FKshowID Auto-generated FK
activityID Auto-generatedviewerID Auto-generated FKepisodeID Auto-generated FK
viewerRevisits tinyintviewerTimeOnline Numeric timestampViwerTimeOff Numeric timestamp
viewerID Auto-generatedviewerFirstName Varchar(100)viewerLastName Varchar(100)
networkID Auto-generatednetworkName Varchar(100)
4
Table ListTable Name NotesEpisodes Maintains show informationCategories Maintains list of all genres watched by userShows_Directory Maintains list of all shows watched by userFavorites Maintains list of how many times each show is
watchedViewers_Activity Information about viewer habitsViewers Viewers personal informationNetworks Maintains list of all networks watched
5
Data Model
Episodes
episodeID (PK)showID (FK)showTime → (timestamp, will show date/time started) showViewers → (total amount of viewers)showRunTime → (length of show, minutes)
Episodes - associative entity / non-identifying relationship entity episodeID (key attribute) showID (weak key attribute) showTime (attribute) showViewers (attribute) showRunTime (attribute)
Favorites
favID (PK)viewerID (FK)showID (FK)viewerRevisits → (amount of time viewer turns show back on, minutes)
Favorites - associative entity / non-identifying relationship entity favID (key attribute) viewerID (weak key attribute) showID (weak key attribute) viewerRevisits (derived attribute)
Viewers_Activity
activityID (PK)viewerID (FK)episodeID (FK)viewerTimeOnline → (amount of time viewer watches show, minutes)viewerTurnOff → (amount of time viewers shuts off show, minutes)viewerRevisits → (amount of time viewer turns show back on, minutes)
Viewers_Activity - associate entity activityID (key attribute) viewerTimeOnline (attribute) viewerTurnOff (attribute) viewerRevisits (attribute)
Validation Tables
6
Shows_Directory
showID (PK)catID (FK)showNamenetworkID (FK)
Shows_Directory - associate entity / non-identifying relationship showID (key attribute) catID (weak key attribute) showName (attribute) networkID (weak key attribute)
Categories
catID (PK)showCat
Categories - entity catID (key attribute) showCat (attribute)
Viewers
viewerID (PK)viewerFirstNameviewerLastName
Viewers - entity viewerID (key attribute) viewerFirstName (attribute) viewerLastName (attribute)
Networks
networkID (PK)networkName
Networks - entity networkID (key attribute) networkName (attribute)
7
Viewings
Show Name Episode Genre Network Viewer ShowOn
Show Off
Law andOrder
S1: 01 Drama NBC Jessica 11/026 PM
11/027 PM
Law andOrder
S1: 02 Drama NBC Jessica 11/027 PM
11/028 PM
NCIS S3: 04 Action CBS Leonardo, Jessica
11/038 PM
11/039 PM
CriminalMinds
S2: 06 Thriller CBS Leonardo 11/047 PM
11/048 PM
Big BangTheory
S1: 13 Sitcom CBS Raphael 11/048 PM
11/048:30 PM
Gotham S2: 01 Drama Netflix Angie, Raphael, Leonardo
11/058 PM
11/059 PM
Big BangTheory
S1: 14 Sitcom CBS Raphael 11/059 PM
11/059:30 PM
Parks and Recreation
S1: 04 Sitcom Netflix Jessica 11/066:11 PM
11/066:41 PM
Arrow S1: 06 Superhero The CW Angie, Raphael, Leonardo
11/069 PM
11/0610 PM
Supernatural S1: 10 Drama The CW Angie 11/078 PM
11/079 PM
Family Guy S2: 04 Sitcom Fox Raphael, Leonardo
11/079 PM
11/079:30 PM
Narcos S1: 01 CrimeFiction
Netflix Jessica, Leonardo
11/083:36 PM
11/084:36 PM
Grey’sAnatomy
S2:02 Drama ABC Leonardo, Angie
11/088 PM
11/089 PM
ImpracticalJokers
S1: 01 Reality ComedyCentral
Jessica, Angie,
Raphael
11/089 PM
11/089:30 PM
Scrubs S1: 03 Comedy Netflix Angie, Raphael
11/0912:39 PM
11/091:09 PM
Scrubs S1: 04 Comedy Netflix Angie, Raphael
11/095:18 PM
11/095:48 PM
Scrubs S1: 05 Comedy Netflix Angie, Raphael
11/095:50 PM
11/096:20 PM
NCIS S3: 05 Action CBS Leonardo, Jessica
11/097 PM
11/098 PM
8
NCIS S3: 06 Action CBS Leonardo, Jessica
11/098 PM
11/099 PM
Big BangTheory
S1: 15 Sitcom CBS Raphael 11/099 PM
11/099:30 PM
The Office S1: 01 Sitcom NBC Angie, Jessica,
Leonardo
11/105:45 PM
11/106:15 PM
The Office S1: 02 Sitcom NBC Angie,Jessica, Raphael
11/106:16pm
11/106:50 PM
Narcos S3:02 CrimeFiction
Netflix Jessica, Leonardo
11/106:57 PM
11/107:58 PM
Narcos S3: 03 CrimeFiction
Netflix Jessica, Leonardo
11/108:03 PM
11/109:04 PM
Grey’sAnatomy
S2: 03 Drama ABC Leonardo, Angie
11/117 PM
11/118 PM
Grey’sAnatomy
S2: 04 Drama ABC Leonardo, Angie
11/118 PM
11/119 PM
My HeroAcademia
S1: 01 Anime Hulu Raphael 11/1111:03 PM
11/1111:33 PM
My HeroAcademia
S1: 02 Anime Hulu Raphael 11/1211:34 PM
11/1212:05 AM
My HeroAcademia
S1: 03 Anime Hulu Raphael 11/1212:06 AM
11/1212:37 AM
Family Guy S2: 07 Sitcom Fox Raphael, Leonardo
11/121 AM
11/121:30 AM
Law andOrder
S1: 03 Drama NBC Jessica 11/136 PM
11/137 PM
Law and Order
S1: 04 Drama NBC Jessica 11/137 PM
11/138 PM
Gotham S2: 02 Drama Netflix Angie, Raphael, Leonardo
11/139:12 AM
11/1310:12 AM
Gotham S2: 03 Drama Netflix Angie, Raphael, Leonardo
11/1410:13 AM
11/1411:14 AM
Law and Order
S1: 05 Drama NBC Jessica 11/148 PM
11/149 PM
Scrubs S1: 06 Comedy Netflix Angie, Raphael
11/149:02 PM
11/149:32 PM
Parks and Recreation
S1: 05 Sitcom Netflix Jessica 11/153:27 PM
11/153:57 PM
Parks and Recreation
S1: 06 Sitcom Netflix Jessica 11/154:01 PM
11/154:31 PM
9
CriminalMinds
S2: 07 Thriller CBS Leonardo 11/167 PM
11/168 PM
My Hero Academia
S1: 04 Anime Hulu Raphael 11/1611:49 AM
11/1612:19 PM
ERD
10
11
Appendix A: Change logDoc Version Change Description Change Date Author
1.1 Initial creation of document 10/23/19 George Basantes1.1 Addition of Mission Statement and Objectives 10/26/19 Holly, Matthew, George1.2 Adding TOC, grids for Fields and table sections 2/14/19 Matt Cushing1.3 Addition of Field Names 10/28/19 Holly Chok1.3 Addition of Data Types 10/28/30 Matthew Calugay1.3 Addition of Table Names 10/28/19 George Basantes1.4 Creation and addition Data Model 11/17/19 Holly Chok1.4 Creation and addition of Viewings 11/18/19 George Basantes1.4 Creation and addition of ERD 11/18/19 Matthew Calugay1.5 Creation and addition of SQL File 1 12/6/19 George Basantes1.5 Creation and addition of SQL File 2 12/6/19 George Basantes1.5 Creation and addition of SQL File 3 12/7/19 Holly Chok1.5 Completion of SQL File 3 12/8/19 Matthew Calugay1.5 Alterations to ‘Favorites’ and ‘Episodes’ table 12/8/19 George Basantes1.5 Initial Testing/Debugging 12/9/19 Matthew Calugay1.5 Final Testing/Debugging Session 12/9/19 Holly, Matthew, George,
Cushing1.5 Final Submission 12/11/19 Holly, George