blob: 908cf84dcfa7bfe6ffeeae707ae4b6794888a5fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# Non-Scalar Data
https://joind.in/event/php-uk-conference-2019/storing-non-scalar-data
Derick Rethans
## Redis sets SSAD
- key binding - safe string
- sets of data
- taggable
## Document data stores
- Usually JSON
- Richer
- MongoDB - single master
- CouchDB - multi master
- ES - text search index
## MongoDB
- pecl/mongodb
- mongodb/mongodb
docs are PHP objects or assoc arrays
## Relational Database
- normalisation
- postgres
- HSTORE
- JSON/JSONB
# Querying data
Sets - SISMEMBER and SMEMBER
- Aggregations
- buckets
- postgres - non standard
## Redis
- Can add to sets
- Atomic
- fast
- counters
DONT: RETRIVE MANIPULATE STORE
Do we do this at d3R?
redis bad at scaling
joned.in/25887
# Useful links
https://redis.io/commands/sadd
https://www.postgresql.org/docs/9.1/hstore.html
https://wiki.openstreetmap.org/wiki/PostgreSQL
https://en.m.wikipedia.org/wiki/Benford%27s_law
https://php-ml.readthedocs.io/en/latest/machine-learning/workflow/pipeline/
|