Slide 1

Slide 1 text

υϝΠϯͷຊ࣭Λ௫Ή Roppongi.rb #24 2024/11/14 1

Slide 2

Slide 2 text

ࣗݾ঺հ • ໊લ: ਖ਼ಙ ޼(aka: ਆ଎) • GitHub: @sinsoku (ը૾ӈ্) • X: @sinsoku_listy (ը૾ӈԼ) • Railsྺ: 10೥͘Β͍ 2

Slide 3

Slide 3 text

Omotesando.rb ͷೋ࣍ձޙ 3

Slide 4

Slide 4 text

! LTͰ࿩ͤΔωλΛ୳͢ 4

Slide 5

Slide 5 text

࠷ۙͷۀ຿ • طଘͷ࢓༷Λௐ΂Δ • ςʔϒϧߏ଄Λ೺Ѳ͢Δ • ERਤ ΛோΊΔ • υϝΠϯڥքΛߟ͑Δ • ERਤ ͰςʔϒϧΛάϧʔϓԽ͢Δ 5

Slide 6

Slide 6 text

࣮ମؔ࿈ϞσϧʢERDʣ1 1 https://ja.wikipedia.org/wiki/ %E5%AE%9F%E4%BD%93%E9%96%A2%E9%80%A3%E3%83%A2%E3%83%87%E3%83%AB 6

Slide 7

Slide 7 text

ERਤΛѻ͏πʔϧͷ঺հ 1. SchemaSpyʢੜ੒ʣ 2. dbdocs.ioʢੜ੒ʣ 3. MySQL Workbenchʢੜ੒ɾฤूʣ 4. pgAdminʢੜ੒ɾฤूʣ 5. dbdiagram.ioʢੜ੒ɾฤूʣ 7

Slide 8

Slide 8 text

rails-mermaid_erd ͷ࿩͸͠ͳ͍2 2 https://speakerdeck.com/sanfrecce_osaka/rails-and-mermaid 8

Slide 9

Slide 9 text

SchemaSpy3 • Java • طଘͷDBʹ઀ଓͯ͠ੜ੒Մ • HTMLͷϑΝΠϧΛੜ੒͢Δ • ! DockerΠϝʔδ͋Γ • JREΛೖΕΔඞཁ͸ͳ͍ 3 https://schemaspy.org/ 9

Slide 10

Slide 10 text

࢖͍ํ $ docker run -"network="host" -v "$PWD/output:/output" \ schemaspy/schemaspy:snapshot \ -t pgsql11 \ -db bootcamp_development \ -host localhost \ -u postgres \ -p postgres 10

Slide 11

Slide 11 text

11

Slide 12

Slide 12 text

12

Slide 13

Slide 13 text

13

Slide 14

Slide 14 text

dbdocs4 • Node.js, Web • طଘͷDBʹ઀ଓͯ͠ੜ੒Մ • Ӿཡ੍ݶ͕Մೳʢύεϫʔυ, ϓϥΠϕʔτ ʣ • ! " Λॻ͚Δ • ⚠ ϩʔΧϧ؀ڥͰ͸ӾཡͰ͖ͳ͍ 4 https://dbdocs.io/ 14

Slide 15

Slide 15 text

࢖͍ํ $ npm install -g dbdocs $ dbdocs login $ dbdocs db2dbml postgres \ 'postgresql:/#postgres:postgres@localhost:5432/bootcamp_development' \ -%outFile=database.dbml $ dbdocs build database.dbml -%project bootcamp 15

Slide 16

Slide 16 text

16

Slide 17

Slide 17 text

17

Slide 18

Slide 18 text

18

Slide 19

Slide 19 text

MySQL Workbench • طଘͷDB͔Βςʔϒϧ৘ใΛಡΈࠐΈՄʢMySQLͷΈʣ • ςʔϒϧΛάϧʔϓԽͰ͖Δ • ڞಉฤूͰ͖ͳ͍ • ! Λॻ͚Δʢ͔͠͠ " ͸౾෗දࣔʣ 19

Slide 20

Slide 20 text

20

Slide 21

Slide 21 text

pgAdmin 4 • طଘͷDB͔Βςʔϒϧ৘ใΛಡΈࠐΈՄʢpgͷΈʣ • ςʔϒϧΛάϧʔϓԽͰ͖ͳ͍ • ڞಉฤूͰ͖ͳ͍ • ! Λॻ͚ͳ͍ 21

Slide 22

Slide 22 text

22

Slide 23

Slide 23 text

23

Slide 24

Slide 24 text

dbdiagram.io5 • schema.rb ͔Βςʔϒϧ৘ใΛಡΈࠐΈՄ • ! ςʔϒϧΛάϧʔϓԽͰ͖Δ • ! ڞಉฤूͰ͖Δ • ! " Λॻ͚Δ • ⚠ ϩʔΧϧ؀ڥͰ͸ӾཡͰ͖ͳ͍ 5 https://dbdiagram.io/ 24

Slide 25

Slide 25 text

25

Slide 26

Slide 26 text

͓·͚: The Top 6 Database Design Tools for 20246 6 https://vertabelo.com/blog/database-design-tools/ 26

Slide 27

Slide 27 text

ERਤʹ͍ͭͯৄ͍͠ਓ͸ ͥͻޙ΄Ͳ࿩͠·͠ΐ͏ 27