{"id":29916631,"url":"https://github.com/mennasayed46/c43_g01_db08","last_synced_at":"2025-08-02T05:03:17.753Z","repository":{"id":306941487,"uuid":"1023331980","full_name":"MennaSayed46/C43_G01_DB08","owner":"MennaSayed46","description":"A set of SQL problem-solving tasks","archived":false,"fork":false,"pushed_at":"2025-07-28T14:07:15.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-28T16:09:24.307Z","etag":null,"topics":["dcl","index","indexed-view","security","sql","sql-server","sqlmanagement","sqlprofiler","tcl"],"latest_commit_sha":null,"homepage":"","language":"TSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MennaSayed46.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-07-21T02:19:14.000Z","updated_at":"2025-07-28T14:07:19.000Z","dependencies_parsed_at":"2025-07-28T16:09:29.597Z","dependency_job_id":"a19d572b-c49c-4330-9c62-e002221d298e","html_url":"https://github.com/MennaSayed46/C43_G01_DB08","commit_stats":null,"previous_names":["mennasayed46/c43_g01_db08"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/MennaSayed46/C43_G01_DB08","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MennaSayed46%2FC43_G01_DB08","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MennaSayed46%2FC43_G01_DB08/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MennaSayed46%2FC43_G01_DB08/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MennaSayed46%2FC43_G01_DB08/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MennaSayed46","download_url":"https://codeload.github.com/MennaSayed46/C43_G01_DB08/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MennaSayed46%2FC43_G01_DB08/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268337939,"owners_count":24234538,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["dcl","index","indexed-view","security","sql","sql-server","sqlmanagement","sqlprofiler","tcl"],"created_at":"2025-08-02T05:01:12.229Z","updated_at":"2025-08-02T05:03:17.723Z","avatar_url":"https://github.com/MennaSayed46.png","language":"TSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SQL Server Academic Project - README\n\n## Part 01 – Working with ITI Database\n\n### 📌 Task 1: Index on Department Table  \n- Create an index on the column `Hiredate` that allows clustering the data in the `Department` table.  \n- **Question:** What will happen when you try this?\n\n---\n\n### 📌 Task 2: Unique Index on Student Table  \n- Create an index that enforces uniqueness on the `Age` column in the `Student` table.  \n- **Question:** What will happen when you try this?\n\n---\n\n### 📌 Task 3: Create Login `RouteStudent`  \n- Create a SQL Server login named `RouteStudent`.  \n- Grant this login **access to only**:\n  - `Student` table  \n  - `Course` table  \n- **Permissions**:\n  - Allow: `SELECT`, `INSERT`  \n  - Deny: `UPDATE`, `DELETE`  \n\n---\n\n## Part 02 – Advanced Table \u0026 Trigger Logic\n\n### 📌 Task 4: Create `ReturnedBooks` Table  \nCreate a table named `ReturnedBooks` with the following structure:\n\n| Column Name | Data Type |\n|-------------|-----------|\n| UserSSN     |           |\n| BookId      |           |\n| DueDate     |           |\n| ReturnDate  |           |\n| Fees        |           |\n\n---\n\n### 📌 Task 5: Trigger on `ReturnedBooks`  \n- Create an **INSTEAD OF INSERT** trigger on the `ReturnedBooks` table.  \n- Logic:  \n  - If `ReturnDate` is **after** `DueDate`, calculate a fee.  \n  - Fee = 20% of the amount previously paid.\n\n---\n\n### 📌 Task 6: Restrict Actions on `Employee` Table  \n- Create a trigger to **prevent any `INSERT`, `UPDATE`, or `DELETE`** operations on the `Employee` table.  \n- The trigger must display a message to notify the user that actions on this table are not permitted.\n\n---\n\n### 📌 Task 7: Index on `Salary` in Employee Table  \n- Create a clustered index on the `Salary` column in the `Employee` table.  \n- **Question:** What happens when this index is applied?\n\n---\n\n### 📌 Task 8: Create Login with Your Name  \n- Create a login using **your name** (e.g., `MennaLogin`).  \n- Grant access **only** to:\n  - `Employee` table  \n  - `Floor` table  \n- **Permissions**:\n  - Allow: `SELECT`, `INSERT`  \n  - Deny: `UPDATE`, `DELETE`  \n- ⚠ Don’t forget to take **screenshots of each step**.\n\n---\n\n\u003e 💡 *Note: Make sure to test each step and validate behavior through SQL Server Management Studio.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmennasayed46%2Fc43_g01_db08","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmennasayed46%2Fc43_g01_db08","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmennasayed46%2Fc43_g01_db08/lists"}