{"id":2112,"date":"2026-05-26T08:05:43","date_gmt":"2026-05-26T08:05:43","guid":{"rendered":"https:\/\/www.vpascode.com\/fr\/docs\/uncategorized\/mermaid-js-erd-syntax-guide\/"},"modified":"2026-05-26T08:05:43","modified_gmt":"2026-05-26T08:05:43","slug":"mermaid-js-erd-syntax-guide","status":"publish","type":"ld_docs","link":"https:\/\/www.vpascode.com\/fr\/docs\/vpascode-docs\/mermaid-js-erd-syntax-guide\/","title":{"rendered":"Guide de syntaxe Mermaid.js ERD"},"content":{"rendered":"<h2>Qu&#8217;est-ce qu&#8217;un diagramme d&#8217;entit\u00e9-association (ERD) ?<\/h2>\n<p>Un <strong>Diagramme d&#8217;entit\u00e9-association (ERD)<\/strong> est un plan structurel utilis\u00e9 pour concevoir, documenter et analyser les sch\u00e9mas de bases de donn\u00e9es relationnelles. Il d\u00e9crit les tables de donn\u00e9es sp\u00e9cifiques (entit\u00e9s) au sein d&#8217;une application, les colonnes (attributs) imbriqu\u00e9es dans ces tables, ainsi que les r\u00e8gles d&#8217;int\u00e9grit\u00e9 r\u00e9f\u00e9rentielle qui les relient. R\u00e9dig\u00e9 en utilisant la notation standard <strong>notation d&#8217;ing\u00e9nierie des informations (IE)<\/strong>, elle utilise clairement <strong>notation en pied de corbeau<\/strong> des t\u00eates pour illustrer les contraintes de donn\u00e9es et les d\u00e9pendances entre plusieurs tables.<\/p>\n<p>Avec <strong>Mermaid.js<\/strong>, vous pouvez d\u00e9finir les index de table de production, les types de donn\u00e9es et les connexions de cl\u00e9s \u00e9trang\u00e8res \u00e0 l&#8217;aide d&#8217;un bloc de texte clair et d\u00e9claratif. Le moteur g\u00e8re automatiquement la taille des conteneurs de mise en page \u00e0 plusieurs colonnes et route les lignes de connexion sans que les \u00e9tiquettes de texte se superposent.<\/p>\n<h2>Guide de syntaxe principale : \u00e9l\u00e9ments et constructions<\/h2>\n<p>La cr\u00e9ation d&#8217;un sch\u00e9ma de base de donn\u00e9es valide et enti\u00e8rement ex\u00e9cutable dans Mermaid repose sur des blocs d&#8217;entit\u00e9s structurales, des mappages de types de donn\u00e9es, des balises d&#8217;index et des op\u00e9rateurs de cardinalit\u00e9.<\/p>\n<h3>1. D\u00e9claration des entit\u00e9s et des colonnes de table<\/h3>\n<p>Vous initialisez une toile ERD \u00e0 la premi\u00e8re ligne en utilisant le mot-cl\u00e9 <code>erDiagram<\/code> mot-cl\u00e9. Pour d\u00e9finir une table, \u00e9crivez le nom de l&#8217;entit\u00e9 suivi d&#8217;une accolade ouverte, puis listez vos configurations de colonnes de mani\u00e8re s\u00e9quentielle sur des lignes distinctes :<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLXLJTEwvSszl5VIAgtBg16BghWoIBwQy80oUMlMQ\/OKSosy8dIXU3MTMHIRoSWZuanFJYm6BQnJRamJJakp8YglEthYAu7UZoQ==\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Modifier Mermaid dans VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLXLJTEwvSszl5VIAgtBg16BghWoIBwQy80oUMlMQ\/OKSosy8dIXU3MTMHIRoSWZuanFJYm6BQnJRamJJakp8YglEthYAu7UZoQ==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">erDiagram\r\n    USERS {\r\n        int id\r\n        string email\r\n        timestamp created_at\r\n    }<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLXLJTEwvSszl5VIAgtBg16BghWoIBwQy80oUMlMQ\/OKSosy8dIXU3MTMHIRoSWZuanFJYm6BQnJRamJJakp8YglEthYAu7UZoQ==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLXLJTEwvSszl5VIAgtBg16BghWoIBwQy80oUMlMQ\/OKSosy8dIXU3MTMHIRoSWZuanFJYm6BQnJRamJJakp8YglEthYAu7UZoQ==\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Modifier Mermaid dans VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"VkXootV\"><img alt=\"\" class=\"alignnone size-full wp-image-629\" decoding=\"async\" height=\"187\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1903a383fb3.png\" width=\"221\"\/><\/p>\n<h3>2. Marquage des cl\u00e9s primaires, des cl\u00e9s \u00e9trang\u00e8res et des commentaires<\/h3>\n<p>Le moteur ERD de Mermaid vous permet d&#8217;attribuer des balises d&#8217;indexation structurelle directement apr\u00e8s la d\u00e9finition du nom de colonne et du type de donn\u00e9es. Vous pouvez \u00e9galement ajouter un commentaire facultatif \u00e0 une colonne en l&#8217;entourant de guillemets doubles :<\/p>\n<ul>\n<li><code>PK<\/code> \u2014 Marque explicitement une colonne comme cl\u00e9 primaire de la table.<\/li>\n<li><code>FK<\/code> \u2014 Marque une colonne comme cl\u00e9 \u00e9trang\u00e8re li\u00e9e \u00e0 une table parente.<\/li>\n<\/ul>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLXLJTEwvSszl5VIAAv8gF9egYIVqCA8EMvNKFDJTFAK8UYVKi1OL4oHibt4KSj6ZednFCiX5CqHBQM16mSlKCLXFJUWZeekKyfmlBfl58cn5KakQuVoAct0gOw==\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Modifier Mermaid dans VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLXLJTEwvSszl5VIAAv8gF9egYIVqCA8EMvNKFDJTFAK8UYVKi1OL4oHibt4KSj6ZqXkKZalFxQqhwUDdepkpSgjFxSVFmXnpCsn5pQX5efHJ+SmpELlaAJhFIJ8=\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">erDiagram\r\n    ORDERS {\r\n        int id PK\r\n        int user_id FK \"Lien vers USERS.id\"\r\n        string coupon_code\r\n    }<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLXLJTEwvSszl5VIAAv8gF9egYIVqCA8EMvNKFDJTFAK8UYVKi1OL4oHibt4KSj6ZqXkKZalFxQqhwUDdepkpSgjFxSVFmXnpCsn5pQX5efHJ+SmpELlaAJhFIJ8=\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLXLJTEwvSszl5VIAAv8gF9egYIVqCA8EMvNKFDJTFAK8UYVKi1OL4oHibt4KSj6ZednFCiX5CqHBQM16mSlKCLXFJUWZeekKyfmlBfl58cn5KakQuVoAct0gOw==\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Modifier Mermaid dans VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"aCCwRBw\"><img fetchpriority=\"high\" alt=\"\" class=\"alignnone size-full wp-image-632\" decoding=\"async\" fetchpriority=\"high\" height=\"817\" sizes=\"(max-width: 268px) 100vw, 268px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1903b8be451.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1903b8be451.png 268w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1903b8be451-98x300.png 98w\" width=\"268\"\/><\/p>\n<h3>3. Ma\u00eetriser les modificateurs de cardinalit\u00e9 en forme de pied de corbeau<\/h3>\n<p>Pour connecter les tables et appliquer les r\u00e8gles d&#8217;int\u00e9grit\u00e9 r\u00e9f\u00e9rentielle, cartographiez leurs relations \u00e0 l&#8217;aide d&#8217;op\u00e9rateurs de ligne sp\u00e9cialis\u00e9s. Les t\u00eates de caract\u00e8re forment des formes visuelles en pied de corbeau qui d\u00e9finissent les contraintes de multiplicit\u00e9 des donn\u00e9es :<\/p>\n<ul>\n<li><code>||--||<\/code> **Exactement un vers exactement un :** Une correspondance stricte et obligatoire 1:1.<\/li>\n<li><code>||--o|<\/code> **Exactement un vers z\u00e9ro ou un :** Une d\u00e9pendance 1:1 facultative.<\/li>\n<li><code>||--|{<\/code> **Exactement un vers un ou plusieurs :** Une liaison parentale obligatoire 1:N.<\/li>\n<li><code>||--o{<\/code> **Exactement un vers z\u00e9ro, un ou plusieurs :** Une relation 1:N standard et facultative.<\/li>\n<\/ul>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLXLJTEwvSszl5VIAgtBg16BghZoaXd38agX\/IBcQz0pBqSAnMTm1WAkAMZMNNw==\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Modifier Mermaid dans VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLXLJTEwvSszl5VIAgtBg16BghZoaXd38agX\/IBcQz0pBqSAnMTlVCQAkCwzE\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">erDiagram\r\n    USERS ||--o{ ORDERS : \"place\" <\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLXLJTEwvSszl5VIAgtBg16BghZoaXd38agX\/IBcQz0pBqSAnMTlVCQAkCwzE\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLLXLJTEwvSszl5VIAgtBg16BghZoaXd38agX\/IBcQz0pBqSAnMTm1WAkAMZMNNw==\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Modifier Mermaid dans VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p><img alt=\"\" class=\"alignnone size-full wp-image-631\" decoding=\"async\" height=\"285\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1903aca991c.png\" width=\"116\"\/><\/p>\n<h2>Meilleures pratiques pour les sch\u00e9mas de donn\u00e9es relationnelles<\/h2>\n<ul>\n<li><strong>Maintenez une casse de table coh\u00e9rente :<\/strong> Gardez les noms d&#8217;entit\u00e9s pr\u00e9visibles. Utilisez des cha\u00eenes en majuscules (par exemple, <code>USER_ACCOUNTS<\/code>) ou snake_case en minuscules strictes (par exemple, <code>user_accounts<\/code>) pour correspondre \u00e0 votre code d&#8217;infrastructure SQL du monde r\u00e9el.<\/li>\n<li><strong>Incluez toujours les types de donn\u00e9es :<\/strong> \u00c9vitez de d\u00e9clarer du texte de colonne brut sans types. D\u00e9clarez explicitement des d\u00e9finitions telles que <code>int<\/code>, <code>varchar<\/code>, ou <code>boolean<\/code> garantit que vos diagrammes d&#8217;architecture servent de r\u00e9f\u00e9rence technique pr\u00e9cise.<\/li>\n<li><strong>Gardez les \u00e9tiquettes de relation au verbe :<\/strong> Lors du lien entre \u00e9l\u00e9ments, fournissez une courte cha\u00eene de verbe \u00e0 l&#8217;infinitif en minuscules dans votre affectation de relation (par exemple, <code>||--o{ : \"contient\"<\/code>) pour documenter le mappage de la logique m\u00e9tier.<\/li>\n<\/ul>\n<h2>Exemples r\u00e9els de diagrammes ERD Mermaid.js<\/h2>\n<h3>Exemple 1 : Mod\u00e8le transactionnel central pour e-commerce (Cl\u00e9s et mappages)<\/h3>\n<p>Ce plan fonctionnel mod\u00e9lise une boucle transactionnelle centrale pour une base de donn\u00e9es e-commerce, en montrant comment les utilisateurs, les commandes et les syst\u00e8mes de suivi des paiements sont li\u00e9s \u00e0 l&#8217;aide de contraintes strictes en forme de pied de corbeau.<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNqNkM0KwjAQhO+C7xB69wW8iVURfyptPYelXWuwSSS7RcT67qZU8aeC7inMJJlvB12ooHCg+z3hZ7xN0mg1iRNxaYVmlGGhcrFZPCVip0whUIMqO+oRiE7W5XIPtG\/da7\/XHqI4\/P17I2UVsdXopPemL16OmdJQCrYMpQRtK8MdAmLgij6i03i0TkbjdB6t5XISzv7j8Ht0Ie4xDnfo0GQo2R7QdPwCGE9w\/uB4dlzXg4G9PDoZiuBYQoYUvFXVXKrrr\/T+RYEGnY+h4Aa9SHin\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Modifier Mermaid dans VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNqNkE0OgjAQhfcm3qFh7wXcGUBj\/MEArpsJjNhIW9MOIUa8j57DiwlB4w8mOqvJe9PONw+NJyAzIPs9Vpe7juJg4YcRO7ZCU0IREylbzZ6SJSNUxlCCyDvqHqwttUn5Fuy2dU\/9XtsEoff790ZKCktaouG1N37xUkyEhJyRJsg5SF0o6hBYAirsx+o4HC2jkRtPgyWf+97kP476ji7EfY3BDRpUCXLSO1QdPwPCEg4fHM+Mq2ow0MdHJkPm7HNI0HlLqpmpqq\/w9YPselHXs0HnBspyePk=\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">erDiagram\r\n    CUSTOMERS {\r\n        int id PK\r\n        string email\r\n        string password_hash\r\n    }\r\n\r\n    ORDERS {\r\n        int id PK\r\n        int customer_id FK\r\n        decimal total_amount\r\n        string status\r\n    }\r\n\r\n    TRANSACTION_LEDGERS {\r\n        int id PK\r\n        int order_id FK\r\n        string reference_token\r\n        string gateway\r\n    }\r\n\r\n    CUSTOMERS ||--o{ ORDERS : \"place\"\r\n    ORDERS ||--|| TRANSACTION_LEDGERS : \"g\u00e9n\u00e8re\" <\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNqNkE0OgjAQhfcm3qFh7wXcGUBj\/MEArpsJjNhIW9MOIUa8j57DiwlB4w8mOqvJe9PONw+NJyAzIPs9Vpe7juJg4YcRO7ZCU0IREylbzZ6SJSNUxlCCyDvqHqwttUn5Fuy2dU\/9XtsEoff790ZKCktaouG1N37xUkyEhJyRJsg5SF0o6hBYAirsx+o4HC2jkRtPgyWf+97kP476ji7EfY3BDRpUCXLSO1QdPwPCEg4fHM+Mq2ow0MdHJkPm7HNI0HlLqpmpqq\/w9YPselHXs0HnBspyePk=\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNqNkM0KwjAQhO+C7xB69wW8iVURfyptPYelXWuwSSS7RcT67qZU8aeC7inMJJlvB12ooHCg+z3hZ7xN0mg1iRNxaYVmlGGhcrFZPCVip0whUIMqO+oRiE7W5XIPtG\/da7\/XHqI4\/P17I2UVsdXopPemL16OmdJQCrYMpQRtK8MdAmLgij6i03i0TkbjdB6t5XISzv7j8Ht0Ie4xDnfo0GQo2R7QdPwCGE9w\/uB4dlzXg4G9PDoZiuBYQoYUvFXVXKrrr\/T+RYEGnY+h4Aa9SHin\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Modifier Mermaid dans VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"qqEcCcA\"><img fetchpriority=\"high\" alt=\"\" class=\"alignnone size-full wp-image-632\" decoding=\"async\" fetchpriority=\"high\" height=\"817\" sizes=\"(max-width: 268px) 100vw, 268px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1903b8be451.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1903b8be451.png 268w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1903b8be451-98x300.png 98w\" width=\"268\"\/><\/p>\n<p><strong>Analyse syntaxique :<\/strong> Ce sch\u00e9ma d\u00e9finit clairement les limites des transactions. Les r\u00e8gles de mappage indiquent qu&#8217;un client peut passer z\u00e9ro ou plusieurs commandes au fil du temps (<code>||--o{<\/code>), tandis qu&#8217;un enregistrement de commande individuel doit g\u00e9n\u00e9rer exactement une entr\u00e9e correspondante dans le registre des transactions (<code>||--||<\/code>).<\/p>\n<h3>Exemple 2 : Sch\u00e9ma d&#8217;un syst\u00e8me de gestion de contenu d&#8217;entreprise (intersection plusieurs-\u00e0-plusieurs)<\/h3>\n<p>Ce plan avanc\u00e9 de base de donn\u00e9es d\u00e9crit l&#8217;architecture d&#8217;une plateforme de gestion de contenu. Il d\u00e9taille comment r\u00e9soudre des configurations complexes plusieurs-\u00e0-plusieurs en introduisant une entit\u00e9 de mappage explicite pont.<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNqNkU1uwjAQhfdI3GHEulygO9QGhFBIRNh0ZU0d14wU25E9SCDo3RuTtjQ1FZ2VPT9+\/t4o\/0yoPZrxCLooi2pbwam\/xCDLQDWUq2sqsCergYkblWRDs9fXJKsDw6urj0I6y8pyX3ofj\/rD02ybLYrNMvunpkWTStYqSE8tk7O\/no804lPjReSzslyuF4lU6wKLi94DzFfDmkRW2vnjrTqTUYHRtIAhkLaqFpgAFnmere9a+vMb8xQb97xzXgzpL95KZ0xnq4ge34Cv4HyeTt3pLyceYRIXg2TDJNnI\/dEmgr+R+hoeSH6jd53IjHLX9X0AN3qkJw==\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Modifier Mermaid dans VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNqNkcFuwjAMhu9IvEPU83iB3dAoCKHSauWyU+SlVrDUJFViJBDs3ZfSaYylE\/MpsRP\/\/n6jXxBoD2Y6ETGqst7V4jxc+iDLghpRbW6pwJ6sFkzcYpIN7UHfkoxHFu+uOUnlLKPlofQxnQyHl\/kuX5Wv6\/yfmhZMKtlgUJ46Jmd\/te9p5JfGmyzmVbXerhKpzgWWV70nsdzc1xQwaudPY3Umg4HBdAJCIG2xkZAAlkWRbx9a+nOMZYoNB947L+\/pr94qZ0y0VfYej8DX4nKZzdz5LyeeRdYvhmKLLNnI469tBMdsRO4bO74CZlB7zD4B8PCiDg==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">erDiagram\r\n    POSTS {\r\n        int id PK\r\n        string title\r\n        string slug\r\n        text body_content\r\n    }\r\n\r\n    CATEGORIES {\r\n        int id PK\r\n        string name\r\n        string description\r\n    }\r\n\r\n    POST_CATEGORY_MAPPINGS {\r\n        int post_id PK, FK\r\n        int category_id PK, FK\r\n        timestamp assigned_at\r\n    }\r\n\r\n    COMMENTS {\r\n        int id PK\r\n        int post_id FK\r\n        string author_name\r\n        text comment_body\r\n    }\r\n\r\n    POSTS ||--o{ POST_CATEGORY_MAPPINGS : \"contient\"\r\n    CATEGORIES ||--o{ POST_CATEGORY_MAPPINGS : \"classe\"\r\n    POSTS ||--o{ COMMENTS : \"attache\" <\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNqNkcFuwjAMhu9IvEPU83iB3dAoCKHSauWyU+SlVrDUJFViJBDs3ZfSaYylE\/MpsRP\/\/n6jXxBoD2Y6ETGqst7V4jxc+iDLghpRbW6pwJ6sFkzcYpIN7UHfkoxHFu+uOUnlLKPlofQxnQyHl\/kuX5Wv6\/yfmhZMKtlgUJ46Jmd\/te9p5JfGmyzmVbXerhKpzgWWV70nsdzc1xQwaudPY3Umg4HBdAJCIG2xkZAAlkWRbx9a+nOMZYoNB947L+\/pr94qZ0y0VfYej8DX4nKZzdz5LyeeRdYvhmKLLNnI469tBMdsRO4bO74CZlB7zD4B8PCiDg==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNqNkU1uwjAQhfdI3GHEulygO9QGhFBIRNh0ZU0d14wU25E9SCDo3RuTtjQ1FZ2VPT9+\/t4o\/0yoPZrxCLooi2pbwam\/xCDLQDWUq2sqsCergYkblWRDs9fXJKsDw6urj0I6y8pyX3ofj\/rD02ybLYrNMvunpkWTStYqSE8tk7O\/no804lPjReSzslyuF4lU6wKLi94DzFfDmkRW2vnjrTqTUYHRtIAhkLaqFpgAFnmere9a+vMb8xQb97xzXgzpL95KZ0xnq4ge34Cv4HyeTt3pLyceYRIXg2TDJNnI\/dEmgr+R+hoeSH6jd53IjHLX9X0AN3qkJw==\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>Modifier Mermaid dans VPasCode<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"NkBriQB\"><img loading=\"lazy\" alt=\"\" class=\"alignnone size-full wp-image-633\" decoding=\"async\" height=\"545\" loading=\"lazy\" sizes=\"auto, (max-width: 709px) 100vw, 709px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1903d115d5e.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1903d115d5e.png 709w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/05\/img_6a1903d115d5e-300x231.png 300w\" width=\"709\"\/><\/p>\n<p><strong>Analyse syntaxique :<\/strong> Pour g\u00e9rer la relation plusieurs-\u00e0-plusieurs entre `POSTS` et `CATEGORIES`, le script introduit une table d&#8217;intersection (`POST_CATEGORY_MAPPINGS`). Cette bo\u00eete de mappage utilise des cl\u00e9s compos\u00e9es agissant simultan\u00e9ment comme cl\u00e9s primaires et \u00e9trang\u00e8res (<code>PK FK<\/code>), reliant les n\u0153uds externes \u00e0 l&#8217;aide de connexions standard en forme de pied de corbeau un-\u00e0-plusieurs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Qu&#8217;est-ce qu&#8217;un diagramme d&#8217;entit\u00e9-association (ERD) ? Un Diagramme d&#8217;entit\u00e9-association (ERD) est un plan structurel utilis\u00e9 pour concevoir, documenter et analyser les sch\u00e9mas de bases de donn\u00e9es relationnelles. Il d\u00e9crit les tables de donn\u00e9es sp\u00e9cifiques (entit\u00e9s) au sein d&#8217;une application, les&#8230;<\/p>\n","protected":false},"author":4,"featured_media":2113,"parent":0,"menu_order":4,"template":"","meta":{"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}}},"ld_collection":[14],"class_list":["post-2112","ld_docs","type-ld_docs","status-publish","has-post-thumbnail","hentry","ld_collection-vpascode-docs"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Mermaid ERD Diagram Syntax | VPasCode Text to Diagram Guide<\/title>\n<meta name=\"description\" content=\"Draft database schemas effortlessly using Mermaid entity relationship diagrams in VPasCode, your text to diagram tool.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vpascode.com\/fr\/docs\/vpascode-docs\/mermaid-js-erd-syntax-guide\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mermaid ERD Diagram Syntax | VPasCode Text to Diagram Guide\" \/>\n<meta property=\"og:description\" content=\"Draft database schemas effortlessly using Mermaid entity relationship diagrams in VPasCode, your text to diagram tool.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vpascode.com\/fr\/docs\/vpascode-docs\/mermaid-js-erd-syntax-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"VPasCode\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.vpascode.com\/fr\/wp-content\/uploads\/sites\/6\/2026\/05\/img_6a1903d115d5e-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"709\" \/>\n\t<meta property=\"og:image:height\" content=\"545\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/docs\\\/vpascode-docs\\\/mermaid-js-erd-syntax-guide\\\/\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/docs\\\/vpascode-docs\\\/mermaid-js-erd-syntax-guide\\\/\",\"name\":\"Mermaid ERD Diagram Syntax | VPasCode Text to Diagram Guide\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/docs\\\/vpascode-docs\\\/mermaid-js-erd-syntax-guide\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/docs\\\/vpascode-docs\\\/mermaid-js-erd-syntax-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/wp-content\\\/uploads\\\/sites\\\/6\\\/2026\\\/05\\\/img_6a1903d115d5e-1.png\",\"datePublished\":\"2026-05-26T08:05:43+00:00\",\"description\":\"Draft database schemas effortlessly using Mermaid entity relationship diagrams in VPasCode, your text to diagram tool.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/docs\\\/vpascode-docs\\\/mermaid-js-erd-syntax-guide\\\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/docs\\\/vpascode-docs\\\/mermaid-js-erd-syntax-guide\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/docs\\\/vpascode-docs\\\/mermaid-js-erd-syntax-guide\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/wp-content\\\/uploads\\\/sites\\\/6\\\/2026\\\/05\\\/img_6a1903d115d5e-1.png\",\"contentUrl\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/wp-content\\\/uploads\\\/sites\\\/6\\\/2026\\\/05\\\/img_6a1903d115d5e-1.png\",\"width\":709,\"height\":545},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/docs\\\/vpascode-docs\\\/mermaid-js-erd-syntax-guide\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Lean Docs\",\"item\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/docs\\\/%ld_collection%\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Guide de syntaxe Mermaid.js ERD\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/#website\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/\",\"name\":\"VPasCode\",\"description\":\"by Visual Paradigm\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/#organization\",\"name\":\"VPasCode\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/wp-content\\\/uploads\\\/sites\\\/6\\\/2026\\\/06\\\/cropped-vp-online-logo-v1.png\",\"contentUrl\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/wp-content\\\/uploads\\\/sites\\\/6\\\/2026\\\/06\\\/cropped-vp-online-logo-v1.png\",\"width\":128,\"height\":138,\"caption\":\"VPasCode\"},\"image\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/fr\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Mermaid ERD Diagram Syntax | VPasCode Text to Diagram Guide","description":"Draft database schemas effortlessly using Mermaid entity relationship diagrams in VPasCode, your text to diagram tool.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vpascode.com\/fr\/docs\/vpascode-docs\/mermaid-js-erd-syntax-guide\/","og_locale":"fr_FR","og_type":"article","og_title":"Mermaid ERD Diagram Syntax | VPasCode Text to Diagram Guide","og_description":"Draft database schemas effortlessly using Mermaid entity relationship diagrams in VPasCode, your text to diagram tool.","og_url":"https:\/\/www.vpascode.com\/fr\/docs\/vpascode-docs\/mermaid-js-erd-syntax-guide\/","og_site_name":"VPasCode","og_image":[{"width":709,"height":545,"url":"https:\/\/www.vpascode.com\/fr\/wp-content\/uploads\/sites\/6\/2026\/05\/img_6a1903d115d5e-1.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Dur\u00e9e de lecture estim\u00e9e":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vpascode.com\/fr\/docs\/vpascode-docs\/mermaid-js-erd-syntax-guide\/","url":"https:\/\/www.vpascode.com\/fr\/docs\/vpascode-docs\/mermaid-js-erd-syntax-guide\/","name":"Mermaid ERD Diagram Syntax | VPasCode Text to Diagram Guide","isPartOf":{"@id":"https:\/\/www.vpascode.com\/fr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.vpascode.com\/fr\/docs\/vpascode-docs\/mermaid-js-erd-syntax-guide\/#primaryimage"},"image":{"@id":"https:\/\/www.vpascode.com\/fr\/docs\/vpascode-docs\/mermaid-js-erd-syntax-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.vpascode.com\/fr\/wp-content\/uploads\/sites\/6\/2026\/05\/img_6a1903d115d5e-1.png","datePublished":"2026-05-26T08:05:43+00:00","description":"Draft database schemas effortlessly using Mermaid entity relationship diagrams in VPasCode, your text to diagram tool.","breadcrumb":{"@id":"https:\/\/www.vpascode.com\/fr\/docs\/vpascode-docs\/mermaid-js-erd-syntax-guide\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vpascode.com\/fr\/docs\/vpascode-docs\/mermaid-js-erd-syntax-guide\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.vpascode.com\/fr\/docs\/vpascode-docs\/mermaid-js-erd-syntax-guide\/#primaryimage","url":"https:\/\/www.vpascode.com\/fr\/wp-content\/uploads\/sites\/6\/2026\/05\/img_6a1903d115d5e-1.png","contentUrl":"https:\/\/www.vpascode.com\/fr\/wp-content\/uploads\/sites\/6\/2026\/05\/img_6a1903d115d5e-1.png","width":709,"height":545},{"@type":"BreadcrumbList","@id":"https:\/\/www.vpascode.com\/fr\/docs\/vpascode-docs\/mermaid-js-erd-syntax-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vpascode.com\/fr\/"},{"@type":"ListItem","position":2,"name":"Lean Docs","item":"https:\/\/www.vpascode.com\/fr\/docs\/%ld_collection%\/"},{"@type":"ListItem","position":3,"name":"Guide de syntaxe Mermaid.js ERD"}]},{"@type":"WebSite","@id":"https:\/\/www.vpascode.com\/fr\/#website","url":"https:\/\/www.vpascode.com\/fr\/","name":"VPasCode","description":"by Visual Paradigm","publisher":{"@id":"https:\/\/www.vpascode.com\/fr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vpascode.com\/fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/www.vpascode.com\/fr\/#organization","name":"VPasCode","url":"https:\/\/www.vpascode.com\/fr\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.vpascode.com\/fr\/#\/schema\/logo\/image\/","url":"https:\/\/www.vpascode.com\/fr\/wp-content\/uploads\/sites\/6\/2026\/06\/cropped-vp-online-logo-v1.png","contentUrl":"https:\/\/www.vpascode.com\/fr\/wp-content\/uploads\/sites\/6\/2026\/06\/cropped-vp-online-logo-v1.png","width":128,"height":138,"caption":"VPasCode"},"image":{"@id":"https:\/\/www.vpascode.com\/fr\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.vpascode.com\/fr\/wp-json\/wp\/v2\/ld_docs\/2112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vpascode.com\/fr\/wp-json\/wp\/v2\/ld_docs"}],"about":[{"href":"https:\/\/www.vpascode.com\/fr\/wp-json\/wp\/v2\/types\/ld_docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.vpascode.com\/fr\/wp-json\/wp\/v2\/users\/4"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.vpascode.com\/fr\/wp-json\/wp\/v2\/media\/2113"}],"wp:attachment":[{"href":"https:\/\/www.vpascode.com\/fr\/wp-json\/wp\/v2\/media?parent=2112"}],"wp:term":[{"taxonomy":"ld_collection","embeddable":true,"href":"https:\/\/www.vpascode.com\/fr\/wp-json\/wp\/v2\/ld_collection?post=2112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}