Big Data-Databases SQL

Relational databases:

Aggregate Data Models: A collection of data that we interact with as a unit. It makes distribution of data easier, since the distribution mechanism has to move the aggregate and not have to worry about related data, as all the related data is contained in the aggregate.

MySQL, PostgreSQL, SQLite

List all users following bob:

1
2
3
4
5
6
7
8
SELECT
User.username
FROM
User
WHERE User.username IN
SELECT from_user FROM User LEFT JOIN Following
ON User.user_id = Following.to_user
WHERE User.username = ‘bob’