{"id":18700883,"url":"https://github.com/rabestro/sap-cds-erd","last_synced_at":"2026-03-19T05:58:20.525Z","repository":{"id":105046269,"uuid":"587826432","full_name":"rabestro/sap-cds-erd","owner":"rabestro","description":"AWK script to create a ER diagram for SAP Cloud Application Programming Model ","archived":false,"fork":false,"pushed_at":"2024-08-20T08:07:20.000Z","size":61,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-28T05:25:09.261Z","etag":null,"topics":["cds","entity-relationship-diagram","erdiagram","mermaid-diagrams","plantuml","sap","sap-cloud-platform","script"],"latest_commit_sha":null,"homepage":"","language":"CAP CDS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rabestro.png","metadata":{"files":{"readme":"README.adoc","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":"2023-01-11T17:18:58.000Z","updated_at":"2024-08-20T08:06:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"41292fe9-321e-4260-8a15-1589a308c70a","html_url":"https://github.com/rabestro/sap-cds-erd","commit_stats":null,"previous_names":["rabestro/sap-cds-erd"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabestro%2Fsap-cds-erd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabestro%2Fsap-cds-erd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabestro%2Fsap-cds-erd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabestro%2Fsap-cds-erd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rabestro","download_url":"https://codeload.github.com/rabestro/sap-cds-erd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239565650,"owners_count":19660154,"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":["cds","entity-relationship-diagram","erdiagram","mermaid-diagrams","plantuml","sap","sap-cloud-platform","script"],"created_at":"2024-11-07T11:39:41.225Z","updated_at":"2025-10-29T14:06:53.272Z","avatar_url":"https://github.com/rabestro.png","language":"CAP CDS","funding_links":[],"categories":[],"sub_categories":[],"readme":"= SAP CDS Entity Relationship Diagrams\n:hide-uri-scheme:\n\nThe small AWK script generate https://mermaid.js.org/[mermaid] Entity Relationship diagrams from SAP Cloud Application Programming Model files.\n\n== How to run script\n\n[source,shell]\n----\ngawk -f src/cds2erd.awk db/* \u003e bookstore.mermaid\n----\n\nAlternatively, you can move the script to the bin directory and make it executable:\n\n[source,shell]\n----\nchmod +x cds2erd.awk\n----\n\nIn this case you can call the script without specifying an interpreter:\n\n[source,shell]\n----\ncds2erd.awk schema.cds \u003e schema.mermaid\n----\n\n== Sample generated ER diagram\n\nBelow is the database schema from the project https://github.com/SAP-samples/cloud-cap-samples/[SAP Cloud CAP Samples Bookstore]\n\n[source,mermaid]\n----\nerDiagram\n    Books {\n        String title \n        String descr \n        Integer stock \n        Decimal price \n        Currency currency \n        Decimal rating \n        TechnicalBooleanFlag isReviewable \n    }\n\n    Authors {\n        String name \n        Date dateOfBirth \n        Date dateOfDeath \n        String placeOfBirth \n        String placeOfDeath \n    }\n\n    Genres {\n        String name \n        String descr \n        Integer ID PK\n    }\n\n    Notes {\n        String note \n    }\n\n    Orders {\n        String OrderNo \n        User buyer \n        Decimal total \n        Currency currency \n    }\n\n    OrderItems {\n        Integer quantity \n        Decimal amount \n    }\n\n    Reviews {\n        Rating rating \n        String title \n        String text \n    }\n\n    Orders |o--o{ OrderItems : \"\"\n    OrderItems |o--o| Books : \"\"\n    Genres }o--o| Genres : \"\"\n    Books |o--o{ Reviews : \"\"\n    Books |o--o| Genres : \"\"\n    Books }o--o| Authors : \"\"\n\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frabestro%2Fsap-cds-erd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frabestro%2Fsap-cds-erd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frabestro%2Fsap-cds-erd/lists"}