This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Program Table: | |
id; | |
name; | |
a.k.a; | |
description; | |
director; Foriegn key of id in Director Table | |
country; | |
actor; | |
catagory; Catagory is much more simple than tags. Some third party lib can handle this column (BLOB Type) | |
watch_url; | |
finished; | | |
season_total; | | |
current_season; | Can create some procedures to reduce the business logic work. | |
episode_tatal; | | |
current_episode; | | |
Program Season Indexing Table: | |
program_id; Foreign key of id in Program; | |
season_id; => hash(program_id, season_num); Primary key; | |
season_desc; | |
season_url; | |
season_whatever; | |
Director Table: | |
id; | |
name; | |
a.k.a; | |
description; | |
imdb_url; | |
Actor Table: | |
id; | |
name; | |
a.k.a; | |
description; | |
imdb_url; | |
Catagory Table: | |
id; | |
name; | |
EpisodeURL Table: | |
id; | | |
url; | make them two as the primary, not only id. | |
.. | |
1. id as primary key expect for mentioned above. | |
2. Owing to the M2M relationship between Program Table and actor Table (catagory & url also), we have to design the M to M index table. | |
Program Actor Indexing Table: | |
program_id; Foriegn key with Program Table id | |
actor_id; Foriegn key with Actor Table id | |
Program Catagory Indexing Table; | |
.. | |
.. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment