Thameera Senanayaka
Allion Technologies
{
_id: xxxxx,
article_id: yyyy,
time: yymmdd,
text: abcde
}
{
_id: xxxxx,
article_id: yyyy,
time: yymmdd,
text: abcde,
author: {
id: xxx,
name: 'user'
}
}
{
_id: xxxxx,
article_id: yyyy,
time: yymmdd,
text: abcde,
author: {
id: xxx,
name: 'user'
},
replies: [
{ ... },
{ ... }
]
}
{
title: 'some title',
post: 'post',
date: yymmdd,
comments: [
{
_id: xxxxx,
time: yymmdd,
text: abcde,
author: {
id: xxx,
name: 'user'
},
replies: [
{ ... },
{ ... }
]
},
{
...
}
]
}| SQL | NoSQL |
|---|---|
| Rows | Documents |
| Tables | Columns |
| Requires a schema | Schema-less |
| JOINs | No JOINs (data is denormalized) |
| Transactional guarantees | No guarantees for multiple documents |
| Can be scaled (with some effort) | Excellent performance & scalability |
| SQL querying | JSON data object querying |