The basic concept IndexedDB

Console

  • Under IndexedDB database
  • Under the database table, the table of contents to show the rest of the main keys and values, which include the remaining value of the index and any other fields, as objects behave
  • The following table shows the index field in the table, to show all data has the same index fields (how many how many there will be a corresponding index table)
  • The console displays will not synchronous, there will be a yellow exclamation mark may differ when reminded, you can get the latest status by refreshing the current database

——————————————————————————————————————————————————————————

IndexedDB Overview

  • indexedDB also comply with the agreement homologous
  • API contains asynchronous (Asynchronous) and API (Synchronous) two synchronization API. Asynchronous API for the most part, the synchronization API must be used with the same WebWorkers. At present, no major browser supports synchronization API.
  • IndexedDB is key-value database (Simple Haoshi)

basic concept

  • IndexedDB database using key-value pairs stored key-value data. key can be a binary object.
  • Providing IndexedDB API index (indexes), tables (tables), the pointer (Cursors) etc.
  • Transaction (transaction) has a life cycle, use it after being given life cycle. And transaction (transaction) is automatically submitted, not manual submission.
  • A transaction is an asynchronous operation to read and write in order to avoid conflicts that may arise
  • IndexedDB notify the user by DOM DOM events after the results are ready in the event there is always a type (type) attribute (in IndexedDB, this property is usually set to success or error). DOM event there is a target (target) property, used to tell whom the event is triggered. Typically, the target (target) attribute database is generated by the operation IDBRequest. Success (success) events are not prompted and can not be undone, errors (error) event will be prompted and can be revoked. This is very important because unless the error event is canceled, or they will terminate any transaction is located.
  • IndexedDB is object-oriented. (Different indexes may be established in the same table based on the object type stored distinguish)

Glossary

database

  • When the operating system is told to write data IDBTransaction.oncomplete event is triggered (before if the operating system crashes or power failure in the data is written to disk, then the entire transaction will be lost)
  • Warehouse data object keys are arranged in ascending order. (Sorted according to the primary key?)
  • Object storage can have a key generator and a key path. If the object warehouse key path, using in-line keys; otherwise, use out-of-line keys
    • Key generator (key generator) automatically incremented add a primary key
    • Critical Path (key path) a valid key path may be in the form: an empty string, a JavasScript identifier, or identifiers JavaScript divided by a plurality of periods. But it can not include spaces. (Primary key)
    • Internal bond (in-line key) is stored as part of the value of the key. (Primary key and other values ​​are stored together in the value)
    • Foreign key (out-of-line key) and the key value stored separately.

Guess you like

Origin www.cnblogs.com/qq3279338858/p/10971975.html
Recommended