{"id":15002932,"url":"https://github.com/yeisonmontoya1815/sql-relational-database-design","last_synced_at":"2026-03-14T22:16:30.229Z","repository":{"id":222936282,"uuid":"758785500","full_name":"yeisonmontoya1815/SQL-Relational-Database-Design","owner":"yeisonmontoya1815","description":"This Database I course project owes its success to Edanur's valuable contributions. An exemplary showcase of database concepts, it reflects dedication and proficiency, offering insights into real-world application.","archived":false,"fork":false,"pushed_at":"2024-06-28T06:45:30.000Z","size":56,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T13:56:27.422Z","etag":null,"topics":["database","frontend-web","mssql-database","mysql-database","php-framework","sql","webdevelopment"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yeisonmontoya1815.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-02-17T04:29:21.000Z","updated_at":"2024-06-28T06:45:33.000Z","dependencies_parsed_at":"2024-10-12T07:21:03.458Z","dependency_job_id":"53a0dac4-1fe2-4b7a-ac3e-fb65c29ed4ed","html_url":"https://github.com/yeisonmontoya1815/SQL-Relational-Database-Design","commit_stats":null,"previous_names":["yeisonmontoya1815/sql-for-practicing"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeisonmontoya1815%2FSQL-Relational-Database-Design","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeisonmontoya1815%2FSQL-Relational-Database-Design/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeisonmontoya1815%2FSQL-Relational-Database-Design/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeisonmontoya1815%2FSQL-Relational-Database-Design/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yeisonmontoya1815","download_url":"https://codeload.github.com/yeisonmontoya1815/SQL-Relational-Database-Design/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243153666,"owners_count":20244801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["database","frontend-web","mssql-database","mysql-database","php-framework","sql","webdevelopment"],"created_at":"2024-09-24T18:54:08.572Z","updated_at":"2025-12-25T23:27:30.483Z","avatar_url":"https://github.com/yeisonmontoya1815.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Description\n\n### This is a group project developed in the Database I course, it is shared just for reference\n\n[link to the Database webpage](https://github.com/yeisonmontoya1815/SQL-Relational-Database-Design/blob/main/Final%20Project/index.html)\n\n\nThis repository is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more information.\n\n\n📌 **Find me!**\n* [Linkedin](https://www.linkedin.com/in/yeisonmontoya/)\n* [Github](https://github.com/yeisonmontoya1815)\n\n\nConsider a housing complex with several high-rise buildings. This housing complex has several recreation facilities (Swimming Pool, Gym, Tennis Course). Tenants living in these buildings can reserve these facilities and this database system is created to manage these facilities. The data requirements are summarized as follows:\n•\tEach building has a name and address.\n•\tEach facility has a unique name, type (swimming pool, tennis court…), location (address), and description.\n•\tEach tenant or the person who reserves the facility, has a name, date of birth, email, phone number, the apartment where they reside, the name of all residents in the same apartment (house…) …start time and end time they lived in that apartment.\n•\tThe person who reserves the facility can be a housing complex resident or non-resident.\n•\tThe reservation information includes the date, time interval, deposited amount (only non-residents pay it), the facility where they reserved, and the number of guests.\n•\tInformation about the employee who books the facility is stored.\n•\tIt is recorded in the database whether the person who reserved the facility showed up.\n\n### Entities and Their Attributes:\n1.\tBuilding Entity\no\tAttributes: Building ID (unique), Name, Address\n2.\tApartment Entity (a weak entity of the Building)\no\tAttributes: Apartment ID\n3.\tFacility Entity\no\tAttributes: Name (unique), Type (swimming pool, tennis court…), Location (Address), Description\n4.\tPerson entities have subclasses: Resident (Tenant), Non-resident, Employee\no\tPerson's Common Attributes: ID (unique), Name (FName, LName), Email, Phone Number,\no\tResident’s Attributes: Date of Birth, Apartment ID, Start Date (in the apartment), End Date (in the apartment), Number of people living together.\no\tNon-resident’s Attributes: Address\no\tEmployee’s Attributes: Department\n5.\tDependent Entity (a weak entity of Resident) \no\tAttributes: Dependent name, Date of Birth, Relationship\n6.\tReservation Entity\no\tAttributes: Reservation ID (unique), Start Time, End Time, Time Interval, Deposited Amount (for non-residents, so this attributes with make the relationship between Reservation and Non-resident entities), Facility Name, Number of Guests, Person Type (Resident or Non-Resident or Employee), Showed Up (Yes or No Boolean type)\nRelationships, Cardinality, Participations:\n\n1.\tHAVE/HAS Relationship between Apartment and Facility\no\tEach Apartment may have multiple Facilities.\no\tEach Facility may have multiple Apartments.\nCardinality: Many-to-Many \nParticipations: Partial, Partial\n\n2.\tLIVES Relationship between Apartment and Tenant (Resident)\no\tEach Tenant must live in one Apartment.\no\tEach Apartment may have one Tenant who is living there.\nCardinality: One-to-One\nParticipations: Total, Partial\n\n3.\tDEPENDENTS OF Relationship between Tenant (Resident) and Dependent\no\tEach Tenant may have DEPENDENTS OF multiple Dependents.\no\tEach Dependent must have DEPENDENTS OF one Tenant.\nCardinality: One-to-Many\nParticipations: Partial, Total\n\n4.\tRESERVS Relationship between Tenant (Resident) and Reservation\no\tEach Tenant can make multiple Reservations.\no\tOne Tenant must make each Reservation.\nCardinality: One-to-Many \nParticipations: Partial, Total\n \n5.\tBOOKS Relationship between Non-resident and Reservation\no\tEach Non-resident can make multiple Reservations.\no\tOne Non-resident must make each Reservation.\nCardinality: One-to-Many \nParticipations: Partial, Total\n\n6.\tMAKES Relationship between Employee and Reservation\no\tEach Employee can make multiple Reservations.\no\tOne Employee must make each Reservation.\nCardinality: One-to-Many \nParticipations: Partial, Total\n\n7.\tHAVE/HAS Relationship between Facility and Reservation\no\tEach Facilities may have multiple Reservations.\no\tEach Reservation must have one Facility.\nCardinality: One-to-Many \nParticipations: Partial, Total\n\n8.\tOverlapping Specialization\no\tEach Resident, Non-Resident, Employee must be a Person.\no\tEach Person can be a Resident, Non-Resident, or Employee.\nParticipations: Partial, Total\n\nConstraints:\n1.\tTenant ID, Facility Name, Reservation ID, and Employee ID, SIN number are all unique identifiers.\n2.\tDeposited Amount is only applicable to non-resident reservations.\n3.\tThe Start Date and End Date for tenants in the same apartment should follow logical constraints (e.g., the Start Date of a tenant cannot be after the End Date of the same tenant in the same apartment).\n4.\tShowed Up should be a Boolean value indicating whether the person who reserved the facility attended.\n5.\tThe Reservation Date and Time Interval should be valid and not overlap with existing reservations for the same facility.\n6.\tForeign key constraints to ensure that Facility ID, Tenant ID, and Employee ID in the Reservation table reference valid records in the respective tables (referential integrity).\n\n![image](https://github.com/yeisonmontoya1815/SQL-for-practicing/assets/60417674/183539d4-eccd-492a-a350-b9fef396fc3f)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeisonmontoya1815%2Fsql-relational-database-design","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyeisonmontoya1815%2Fsql-relational-database-design","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeisonmontoya1815%2Fsql-relational-database-design/lists"}