본문 바로가기

『Dexie.js』비관계형 web storage라이브러리

by Recstasy 2021. 1. 7.

Dexie.js는 비관계형 DB 라이브러리다.

몽고DB와 같은 DB를 사용하고 있는 유저라면,

sql.js와 같은 관계형 DB라이브러리가 불편할 수 있다.

 

실제로 Dexie.js가 sql.js보다 좀더 쉽게 느껴진다.

 

 

Getting Started

Dexie.js can be consumed as a module. But let’s skip that for now and just show the simplest possible setup. You will just need a text editor and a web browser. Quick Start Copy this code to and save as ‘whatever.html’ // // Define your database // v

dexie.org

CDN : <script src="https://unpkg.com/dexie@latest/dist/dexie.js"></script>

 

 

 

사용법

Dexie.js의 사용법은 몽고DB와 같다.

스키마, 컬렉션을 생성하고, 

배열-객체 형식의 DB구조에서 쿼리를 실행하면 된다.

 

쿼리와 관련된 기능은 아래 dexie.org에서 확인해보자. 

 

Understanding the basics

Creating Database vs opening existing IndexedDB (and Dexie) has a built-in system for db installation and schema upgrades. Many people think they will have to check if database needs to be created and run different code depending on whether the database wa

dexie.org

 

 

실행

getStarted에 공개된 코드를 직접 실행해보자.

 

 

 

dexie.js는 sql.js보다 좀더 간편하다.

특히, 비관계형 DB에 익숙한 유저는 dexie.js를 추천한다.

 

댓글

최신글 전체

이미지
제목
글쓴이
등록일