Fireship · @fireship

SurrealDB in 100 Seconds

Uploaded September 15, 2022 · Length 2:47

SurrealDB in 100 Seconds

Summary

surrealDB: open-source new SQL database with multimodel paradigm, supports real-time graph, relational, and document data models.

  • surrealDB
  • new SQL database
  • multimodel database
  • graph database
  • relational database
  • document database

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    surreal DB an open-source new SQL

  2. 0:03

    database that delivers every feature

  3. 0:05

    you've ever dreamed of acid scalable

  4. 0:07

    fulltech search real time graph

  5. 0:09

    relational multi-tenant temporal schema

  6. 0:11

    list schema full server list embedded

  7. 0:14

    are all words that can describe surreal

  8. 0:16

    DB a multimodel database that combines

  9. 0:18

    elements of relational graph and

  10. 0:20

    document paradigms into a simple package

  11. 0:22

    that can be queried with an SQL like

  12. 0:24

    language development was started by

  13. 0:26

    Jamie and Toby Morgan Hitchcock in 2015

  14. 0:28

    and it was open sourced in July 2022 the

  15. 0:31

    engine is written in Rust and can

  16. 0:33

    support multiple persistence layers like

  17. 0:35

    tikv to scale horizontally in the cloud

  18. 0:37

    or as a single node both in memory or on

  19. 0:40

    disk most importantly though it can

  20. 0:41

    handle complex relationships like

  21. 0:43

    traditional relational databases but

  22. 0:45

    does so without joins instead it uses

  23. 0:47

    techniques like record links and graph

  24. 0:49

    connections that not only handle complex

  25. 0:52

    data models but also result in concise

  26. 0:54

    developer friendly code by default it's

  27. 0:56

    schema list which means you can

  28. 0:58

    implicitly create unstructured data in

  29. 1:00

    any table however you can opt into

  30. 1:02

    schema full tables when the data model

  31. 1:04

    becomes well defined it's also asset

  32. 1:06

    compliant allowing you to run

  33. 1:07

    transactions across multiple tables

  34. 1:09

    which also emit events when the data

  35. 1:11

    changes so you can listen to real-time

  36. 1:13

    updates from a front-end application

  37. 1:14

    kind of like Firebase and the feature

  38. 1:16

    list goes on with things like geospatial

  39. 1:18

    data and predefined analytics views all

  40. 1:20

    of which can be locked down with

  41. 1:22

    permissions out of the box to get

  42. 1:23

    started install it on your machine then

  43. 1:25

    run it locally with the CLI then execute

  44. 1:27

    code using its rest API or a client

  45. 1:30

    library for your favorite language just

  46. 1:31

    like SQL we can use statements like

  47. 1:34

    create to add a record to the database

  48. 1:36

    every record has a unique ID comprised

  49. 1:38

    of two parts the left side is the table

  50. 1:40

    the record belongs to and the right side

  51. 1:42

    can be whatever you want or if left out

  52. 1:44

    it will be automatically generated and

  53. 1:46

    now use set to define the data for that

  54. 1:48

    record or try content for a more Json

  55. 1:51

    like syntax now that we have some data

  56. 1:53

    populated we can query it with a select

  57. 1:55

    statement it supports the wear Clause to

  58. 1:57

    filter by a condition and has a variety

  59. 1:59

    of built-in functions like count to