{"id":19691937,"url":"https://github.com/s1rserg/movie-app-db-sql","last_synced_at":"2026-03-07T14:01:57.972Z","repository":{"id":250196987,"uuid":"833694821","full_name":"s1rserg/movie-app-db-sql","owner":"s1rserg","description":"movie app database","archived":false,"fork":false,"pushed_at":"2024-07-26T15:07:55.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T11:42:06.750Z","etag":null,"topics":["sql"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s1rserg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-25T14:57:16.000Z","updated_at":"2024-10-29T14:07:36.000Z","dependencies_parsed_at":"2024-11-11T19:11:59.445Z","dependency_job_id":"7a3e91e8-5d36-4a77-bdb6-8817b8edba9e","html_url":"https://github.com/s1rserg/movie-app-db-sql","commit_stats":null,"previous_names":["s1rserg/movie-app-db-sql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/s1rserg/movie-app-db-sql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1rserg%2Fmovie-app-db-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1rserg%2Fmovie-app-db-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1rserg%2Fmovie-app-db-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1rserg%2Fmovie-app-db-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s1rserg","download_url":"https://codeload.github.com/s1rserg/movie-app-db-sql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1rserg%2Fmovie-app-db-sql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30216492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T13:35:13.914Z","status":"ssl_error","status_checked_at":"2026-03-07T13:35:13.569Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sql"],"created_at":"2024-11-11T19:11:52.735Z","updated_at":"2026-03-07T14:01:57.957Z","avatar_url":"https://github.com/s1rserg.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# movie-app-db-sql\n\n```mermaid\nerDiagram\n    Country ||--o{ Person : \"has\"\n    Country ||--o{ Movie : \"produces\"\n    File ||--o{ User : \"is avatar of\"\n    File ||--o{ Person : \"is primary photo of\"\n    File ||--o{ Movie : \"is poster of\"\n    User ||--o{ FavoriteMovies : \"has\"\n    Person ||--o{ Movie : \"directs\"\n    Person ||--o{ MovieCharacter : \"acts in\"\n    Movie ||--o{ FavoriteMovies : \"is favorite of\"\n    Movie ||--o{ MovieCharacter : \"has\"\n    Movie ||--o{ MovieGenre : \"has\"\n    Genre ||--o{ MovieGenre : \"belongs to\"\n    Character ||--o{ MovieCharacter : \"is portrayed in\"\n    Person ||--o{ PersonPhotos : \"has\"\n    File ||--o{ PersonPhotos : \"is used in\"\n\n    Country {\n        int CountryID PK\n        varchar(100) CountryName\n        char(2) ISOCode\n        timestamp createdAt\n        timestamp updatedAt\n    }\n\n    File {\n        int FileID PK\n        varchar(100) FileName\n        varchar(50) MIMEType\n        varchar(255) Key\n        varchar(255) URL\n        timestamp createdAt\n        timestamp updatedAt\n    }\n\n    User {\n        int UserID PK\n        varchar(50) Username\n        varchar(50) FirstName\n        varchar(50) LastName\n        varchar(255) Email\n        varchar(255) Password\n        int AvatarFileID FK\n        timestamp createdAt\n        timestamp updatedAt\n    }\n\n    Person {\n        int PersonID PK\n        varchar(50) FirstName\n        varchar(50) LastName\n        text Biography\n        date DateOfBirth\n        enum Gender\n        int CountryID FK\n        int PrimaryPhotoFileID FK\n        timestamp createdAt\n        timestamp updatedAt\n    }\n\n    Movie {\n        int MovieID PK\n        varchar(100) Title\n        text Description\n        decimal Budget\n        date ReleaseDate\n        smallint Duration\n        int DirectorID FK\n        int CountryID FK\n        int PosterFileID FK\n        timestamp createdAt\n        timestamp updatedAt\n    }\n\n    Genre {\n        int GenreID PK\n        varchar(50) GenreName\n        timestamp createdAt\n        timestamp updatedAt\n    }\n\n    Character {\n        int CharacterID PK\n        varchar(100) Name\n        text Description\n        timestamp createdAt\n        timestamp updatedAt\n    }\n\n    MovieCharacter {\n        int MovieCharacterID PK\n        int MovieID FK\n        int CharacterID FK\n        int ActorID FK\n        enum Role\n        timestamp createdAt\n        timestamp updatedAt\n    }\n\n    MovieGenre {\n        int MovieID FK\n        int GenreID FK\n        timestamp createdAt\n        timestamp updatedAt\n    }\n\n    FavoriteMovies {\n        int UserID FK\n        int MovieID FK\n        timestamp createdAt\n        timestamp updatedAt\n    }\n\n    PersonPhotos {\n        int PersonID FK\n        int FileID FK\n        timestamp createdAt\n        timestamp updatedAt\n    }\n```\n\n## Notes\n\n* Role attribute is in CharacterMovies table. It makes more sense for this schema to put it in here, rather than in Character table: in one movie a character can play leading role and in another play supporting role. So by doing this, I can avoid creating duplicate characters with different role values.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs1rserg%2Fmovie-app-db-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs1rserg%2Fmovie-app-db-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs1rserg%2Fmovie-app-db-sql/lists"}