Mobile App Quiz 4 Flashcards
two main approaches to database
- RDBMS or SQL
2. noSQL
what does RDBMS stand for
relational database management system
give 3 examples of RDBMS/SQL
Oracle, MySQL, Microsoft SQL Server
SQL originated in the
1970s
SQL stores data according to
a schema
a schema allows data to be
displayed as tables with rows and columns
SQL stands for
Structured Query Language
SQL is
a collection of tables each with a schema that represent fixed attributes and data types that the items in the table will have
general functionality of SQL
CRUD (create, read, update, delete) which is all done by writing a query
what is a query
a statement saying what you want to do
tables in a relational database have keys used to
identify specific columns or rows of a table to facilitate a particular table, row, or column of interest
pros of SQL
well-documented, standards are well-defined and commonly accepted (know how to use one, can use all), work really well with structured data, ACID-compliant, limitless indexing
ACID stands for
Atomicity, Consistency, Isolation, Durability
what does atomicity refer to
no partial updates, all or nothing
cons of SQL
doesn’t work well with unstructured data, to migrate from one database to another, both schemas/structures must match, data is normalized (remove repetitive fields and put in new table), does not scale horizontally very well
noSQL stands for
not only SQL
noSQL is
nonrelational
key-value stores
simple database that only stores key-value pairs; has basic functionality for retrieving the value associated with a known key
examples of key-value stores
REDDIS, Amazon Dinamo DB
problem with key-value stores
collisions
wide column stores examples
Cassandra, Scylla, HBase
wide column stores are
schema agnostic; store data in column families or tables with a single row thought of as a record; multi-dimensional key-value store
wide column stores scales well enough to
manage pedabytes of data across as many as 1000 servers (good for big data)
wide column stores are based on
CQL, an SQL variant, for data definition and manipulation
examples of document stores
MongoDB, couch-based
documents stores
schema-free, save data in form of JSON documents, can contain many different value types
document stores are similar to key-value or wide-column except
the document name is the key and the content is the value
documents stores: individual records (do/do not) require uniform structure
do not
document stores are well-suited to manage
semi-structured data across distributed systems
graph DBs example
NEO4J
graph DBs are good for
data visualization, graph analytics
graph DBs are
a network of system nodes or objects
search engine DB examples
Splunk, Solr
search engine DBs are
schema-free JSON documents similar to document stores, but with greater emphasis on making data easily accessible via text-base searches with Strings of varying complexity
pros of noSQL
schema free, more flexible, easier to administer; more horizontally scalable and fault tolerant; data can be easily distributed across different nodes; less strict JSON docs
cons of noSQL
newer, less widely adopted, specific expertise often required, range of formats and constraints specific to each type
Firebase is specifically geared for
apps
Firebase is an example of
noSQL
Firebase provides
authentication, cloud storage
ways to store data
native (on phone), local and session browser storage, SQLite
PWA stores data using
local and session browser storage (up to 5 MB)
local and session browser storage
not highly regarded, only use if app still knows user is logged in between pages, Ionic doesn’t usually utilize (session storage good though)
Ionic uses ? for storage
SQLite
SQLite is
an embedded SQL database that can run on a mobile device also used by native apps
SQLite does not
need to run on the server and does not require configuration
one drawback of SQLite
may use too much storage on a phone
pros of SQLite
persistent data storage, no size limitation on data stored, provides SQL syntax