{"id":26754972,"url":"https://github.com/himusharier/isdb-journal-publication-database-oracle-postgres","last_synced_at":"2026-05-15T20:05:03.406Z","repository":{"id":269083806,"uuid":"898921668","full_name":"himusharier/isdb-journal-publication-database-oracle-postgres","owner":"himusharier","description":"This project contains complete database of a journal publication company and a collection of SQL queries. The queries cover various operations from basic data retrieval to complex data analysis across multiple related tables.","archived":false,"fork":false,"pushed_at":"2025-03-17T22:51:45.000Z","size":466,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-28T19:02:22.654Z","etag":null,"topics":["database","isdb","oracle","plsql","postgres","round62","sql","sql-query"],"latest_commit_sha":null,"homepage":"","language":null,"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/himusharier.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":"2024-12-05T09:40:38.000Z","updated_at":"2025-03-17T22:52:56.000Z","dependencies_parsed_at":"2025-07-28T19:02:23.738Z","dependency_job_id":"e28143c7-5b5c-46ca-bbaf-afc112d2596d","html_url":"https://github.com/himusharier/isdb-journal-publication-database-oracle-postgres","commit_stats":null,"previous_names":["himusharier/isdb-oracle-journal-publication","himusharier/isdb-oracle-journal-publication-database","himusharier/isdb-journal-publication-database-oracle","himusharier/isdb-journal-publication-database-oracle-postgres"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/himusharier/isdb-journal-publication-database-oracle-postgres","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himusharier%2Fisdb-journal-publication-database-oracle-postgres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himusharier%2Fisdb-journal-publication-database-oracle-postgres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himusharier%2Fisdb-journal-publication-database-oracle-postgres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himusharier%2Fisdb-journal-publication-database-oracle-postgres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/himusharier","download_url":"https://codeload.github.com/himusharier/isdb-journal-publication-database-oracle-postgres/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himusharier%2Fisdb-journal-publication-database-oracle-postgres/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33078018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["database","isdb","oracle","plsql","postgres","round62","sql","sql-query"],"created_at":"2025-03-28T14:17:31.369Z","updated_at":"2026-05-15T20:05:03.368Z","avatar_url":"https://github.com/himusharier.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## ER Diagram for Journal Database\n![Journal Database ER Diagram](https://github.com/himusharier/isdb-oracle-journal-publication-database/blob/5e431cb70b3feaf3deb04c50f96338253ffa1781/journal-publication%2C%20er-diagram%20(actual).png)\n\n# Journal Database SQL Queries\n\n## Basic Queries\n\n### 1. Retrieve Journal Names and Publication Types\n```sql\nSELECT journal_name, publication_type FROM journals;\n```\n\n### 2. Find Researchers\n```sql\nSELECT first_name, last_name, profession \nFROM users \nWHERE profession = 'Botanist';\n```\n\n### 3. Journals with Impact Factor \u003e 2\n```sql\nSELECT journal_name, impact_factor \nFROM journals \nWHERE impact_factor \u003e 2;\n```\n\n### 4. Articles by Volume/Issue\n```sql\nSELECT a.article_title, j.journal_name\nFROM articles a\nJOIN journals j ON a.journal_id = j.journal_id\nWHERE a.vol_issue = 'Vol5Issue01';\n```\n\n### 5. Journals and Publication Frequency\n```sql\nSELECT journal_name, publication_frequency \nFROM journals;\n```\n\n### 6. Users with Ecology in Profession\n```sql\nSELECT first_name, last_name, profession\nFROM users\nWHERE profession LIKE '%Plant%';\n```\n\n## Aggregation \u0026 Filtering\n\n### 7. Total Crop Science Journal\n```sql\nSELECT COUNT(*) AS total_articles\nFROM articles a\nJOIN journals j ON a.journal_id = j.journal_id\nWHERE j.journal_name = 'Crop Science Journal';\n```\n\n### 8. Journals with Acceptance Rate \u003e 40%\n```sql\nSELECT journal_name, acceptance_rate\nFROM journals\nWHERE acceptance_rate \u003e 40;\n```\n\n### 9. Announcements for Journal of Plant Pathology\n```sql\nSELECT topic, announcement, announce_date\nFROM announcements a\nJOIN journals j ON a.journal_id = j.journal_id\nWHERE j.journal_name = 'Journal of Plant Pathology';\n```\n\n### 10. Average Impact Factor of Journals\n```sql\nSELECT AVG(impact_factor) AS avg_impact_factor\nFROM journals j\nWHERE j.journal_id IN (\n    SELECT journal_id \n    FROM issues i \n    WHERE i.journal_id = j.journal_id\n);\n```\n\n## Complex Joins\n\n### 11. Editorial Members of Journal of Plant Pathology\n```sql\nSELECT u.first_name, u.last_name, e.category\nFROM editorial e\nJOIN users u ON e.user_id = u.user_id\nJOIN journals j ON e.journal_id = j.journal_id\nWHERE j.journal_name = 'Journal of Plant Pathology';\n```\n\n### 12. Articles by Specific Author\n```sql\nSELECT a.article_title, j.journal_name, a.vol_issue, a.published_date\nFROM articles a\nJOIN journals j ON a.journal_id = j.journal_id\nWHERE a.author = 3;\n```\n\n### 13. Journals with Articles and Abstracts\n```sql\nSELECT j.journal_name, a.article_title, a.abstract\nFROM articles a\nJOIN journals j ON a.journal_id = j.journal_id;\n```\n\n### 14. Issues of Journal of Agricultural Biotechnology\n```sql\nSELECT vol_issue, publish_date\nFROM issues\nJOIN journals j ON issues.journal_id = j.journal_id\nWHERE j.journal_name = 'Journal of Agricultural Biotechnology';\n```\n\n## Subqueries \u0026 Advanced Filtering\n\n### 15. Users Authoring in High Impact Journals\n```sql\nSELECT DISTINCT u.first_name, u.last_name\nFROM users u\nWHERE u.user_id IN (\n    SELECT a.author\n    FROM articles a\n    JOIN journals j ON a.journal_id = j.journal_id\n    WHERE j.impact_factor \u003e 3\n);\n```\n\n### 16. Most Recent Article in Specific Volume/Issue\n```sql\nSELECT a.article_title, u.first_name, u.last_name, j.journal_name\nFROM articles a\nJOIN users u ON a.author = u.user_id\nJOIN journals j ON a.journal_id = j.journal_id\nWHERE a.vol_issue = 'Vol2Issue01'\nORDER BY a.published_date DESC\nFETCH FIRST 1 ROWS ONLY;\n```\n\n### 17. Journals Above Average Acceptance Rate\n```sql\nSELECT journal_name, acceptance_rate\nFROM journals\nWHERE acceptance_rate \u003e (SELECT AVG(acceptance_rate) FROM journals);\n```\n\n### 18. Editorial Members in High Impact Journals\n```sql\nSELECT DISTINCT u.first_name, u.last_name\nFROM editorial e\nJOIN users u ON e.user_id = u.user_id\nJOIN journals j ON e.journal_id = j.journal_id\nWHERE j.impact_factor \u003e 2;\n```\n\n### 19. Most Recent Announcement per Journal\n```sql\nSELECT a.journal_id, a.topic, a.announce_date\nFROM announcements a\nWHERE a.announce_date IN (\n    SELECT MAX(announce_date)\n    FROM announcements\n    GROUP BY journal_id\n);\n```\n\n### 20. Articles Without Corresponding Author\n```sql\nSELECT article_title, vol_issue, journal_id\nFROM articles\nWHERE crosponding_author IS NULL;\n```\n\n## Data Integrity \u0026 Constraints\n\n### 21. Insert New Journal\n```sql\nINSERT INTO journals (\n    journal_name, eissn_id, publication_type, \n    impact_factor, publication_frequency, acceptance_rate\n)\nVALUES (\n    'Journal of Advanced Research', '1234-5678', 'Academic', \n    3.5, 'Monthly', 30\n);\n```\n\n### 22. Update Journal Acceptance Rate\n```sql\nUPDATE journals\nSET acceptance_rate = 45\nWHERE journal_name = 'Plant Biotechnology Review';\n```\n\n### 23. Delete User\n```sql\nDELETE FROM users WHERE user_id = 4;\n```\n\n## Advanced Data Operations\n\n### 24. Journals with No Published Articles\n```sql\nSELECT journal_name\nFROM journals j\nWHERE j.journal_id NOT IN (\n    SELECT DISTINCT journal_id FROM articles\n);\n```\n\n### 25. Journals with More Than 3 Announcements\n```sql\nSELECT j.journal_name, COUNT(a.announcement_id) AS total_announcements\nFROM journals j\nLEFT JOIN announcements a ON j.journal_id = a.journal_id\nGROUP BY j.journal_name\nHAVING COUNT(a.announcement_id) \u003e 3;\n```\n\n# SQL Question Bank for Database Schema\n\n## 1. Table Creation Questions\n\n### 1.1. How would you create a table `journals` with columns: `journal_id`, `journal_name`, `eissn_id`, `publication_type`, `impact_factor`, `publication_frequency`, and `acceptance_rate`?\n\n### 1.2. How would you create a table `issues` with columns: `journal_id`, `vol_issue`, and `publish_date`, and create a foreign key relationship with the `journals` table?\n\n### 1.3. How would you create a table `announcements` with columns: `journal_id`, `topic`, `announcement`, and `announce_date`, and create a foreign key relationship with the `journals` table?\n\n### 1.4. How would you create a table `users` with columns: `user_id`, `first_name`, `last_name`, `gender`, `date_of_birth`, `email`, `phone`, `profession`, `institute`, `country`, and `address`? Ensure a gender constraint.\n\n### 1.5. How would you create a table `editorial` with columns: `journal_id`, `user_id`, and `category`, and create foreign key relationships with the `journals` and `users` tables?\n\n### 1.6. How would you create a table `articles` with columns: `journal_id`, `article_id`, `vol_issue`, `article_title`, `abstract`, `article_type`, `keywords`, `doi_id`, `author`, `crosponding_author`, and `published_date`, and create foreign key relationships with the `issues` and `users` tables?\n\n## 2. Data Insertion Questions\n\n### 2.1. How would you insert a record into the `journals` table with values: `journal_name`, `eissn_id`, `publication_type`, `impact_factor`, `publication_frequency`, and `acceptance_rate`?\n\n### 2.2. How would you insert a record into the `issues` table with values: `journal_id`, `vol_issue`, and `publish_date`?\n\n### 2.3. How would you insert a record into the `announcements` table with values: `journal_id`, `topic`, `announcement`, and `announce_date`?\n\n### 2.4. How would you insert a record into the `users` table with values: `first_name`, `last_name`, `gender`, `date_of_birth`, `email`, `phone`, `profession`, `institute`, `country`, and `address`?\n\n### 2.5. How would you insert a record into the `editorial` table with values: `journal_id`, `user_id`, and `category`?\n\n### 2.6. How would you insert a record into the `articles` table with values: `journal_id`, `vol_issue`, `article_title`, `abstract`, `article_type`, `keywords`, `doi_id`, `author`, `crosponding_author`, and `published_date`?\n\n## 3. Query Questions\n\n### 3.1. How would you fetch all articles from the `articles` table where the `article_type` is `Research`?\n\n### 3.2. How would you fetch the journal name and the acceptance rate of journals with `impact_factor` greater than 3 from the `journals` table?\n\n### 3.3. How would you find the number of articles published in each volume and issue from the `articles` table?\n\n### 3.4. How would you fetch all the users who are working as `Research Scientists`?\n\n### 3.5. How would you fetch all announcements that were made after `2024-01-01` from the `announcements` table?\n\n### 3.6. How would you list the details of articles that were published in a specific volume (e.g., 'Vol 1 Issue 01') of a journal?\n\n### 3.7. How would you fetch the details of articles and their corresponding authors from the `articles` table, joining the `users` table to get author names?\n\n### 3.8. How would you fetch all the journals with `publication_type` as `Research` and `acceptance_rate` as `high`?\n\n### 3.9. How would you get the total number of issues published per journal from the `issues` table?\n\n### 3.10. How would you find the average impact factor of all journals in the `journals` table?\n\n## 4. Alter Table and Constraints Questions\n\n### 4.1. How would you add a new column `language` to the `journals` table?\n\n### 4.2. How would you modify the `users` table to allow a `NULL` value for the `phone` column?\n\n### 4.3. How would you add a constraint to the `articles` table to ensure that the `published_date` is not in the future?\n\n### 4.4. How would you create a unique constraint on the `email` column in the `users` table?\n\n### 4.5. How would you remove the foreign key constraint `editorial_journal_id_fk_journals` from the `editorial` table?\n\n### 4.6. How would you rename the `articles` table to `journal_articles`?\n\n## 5. Data Deletion and Update Questions\n\n### 5.1. How would you delete all articles where the `article_type` is `Review` from the `articles` table?\n\n### 5.2. How would you update the `impact_factor` of a journal in the `journals` table where `journal_id` is 3?\n\n### 5.3. How would you delete a specific user from the `users` table by their `user_id`?\n\n### 5.4. How would you update the `address` of a user in the `users` table based on their `user_id`?\n\n### 5.5. How would you delete all records from the `announcements` table that are older than `2024-01-01`?\n\n### 5.6. How would you delete all issues from the `issues` table related to a specific journal (`journal_id = 2`)?\n\n### 5.7. How would you delete a specific editorial entry from the `editorial` table based on `journal_id` and `user_id`?\n\n## 6. Join and Subquery Questions\n\n### 6.1. How would you retrieve a list of all articles along with their respective journal names using a JOIN between the `articles` and `journals` tables?\n\n### 6.2. How would you find the users who are part of the editorial board of a particular journal, say `journal_id = 3`?\n\n### 6.3. How would you retrieve the titles of articles that were published after `2024-01-01` and their corresponding journal names?\n\n### 6.4. How would you retrieve the authors who have more than one article published, using a subquery in the `articles` table?\n\n### 6.5. How would you fetch the list of articles published in a journal whose name starts with \"Botanical\" from the `journals` and `articles` tables?\n\n### 6.6. How would you retrieve the details of all announcements related to a specific journal by joining the `announcements` and `journals` tables?\n\n### 6.7. How would you retrieve the number of articles published in each journal, including the journal name, by using a GROUP BY clause in the `articles` table?\n\n### 6.8. How would you fetch the names of the users who are editors for a journal with a specific `journal_id`?\n\n### 6.9. How would you list the journals that have published more than 10 issues?\n\n### 6.10. How would you fetch the latest articles for each journal based on the `published_date`?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimusharier%2Fisdb-journal-publication-database-oracle-postgres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhimusharier%2Fisdb-journal-publication-database-oracle-postgres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimusharier%2Fisdb-journal-publication-database-oracle-postgres/lists"}