A realtime distributed database is one where users interact with the data in realtime, like the Amazon Web Services API.
For example, you might have a database that contains the users names, which is a good database to store your information.
A typical database might look like this:CREATE TABLE users ( name text NOT NULL AUTOINCREMENT, age int NOT NULL, email address varchar(100) NOT NULL DEFAULT ‘[email protected]’ ); You can use firebase to create a realtime realtime DAG (distributed graph), which is like a distributed data store.
A DAG is a real time distributed graph where users come and go from the same location.
Firebase creates a DAG for each user.
This DAG will have all the same properties as the database, including the users name, age, email, and other metadata, as well as the date and time.
This means that users can see each other’s recent data and their recent activity.
The following code creates a real-time distributed graph:CREATETIME DEFAULT 1000; // This will generate a Dagg with 1000 users.CREATE DAG ‘users’ ‘user-id’ ‘age’ ’email’ ‘status’ ‘postal code’ ‘created_at’ ‘date’ ‘updated_at’;CREATE TRIGGER users(postalcode,created_date,updated_date) ON ‘users’.postalCode = ’01’ WHERE ‘postcode’ = ‘0023’;CREATEMOINT users(posted_date INTEGER) ON users.posted_Date = posted_date;UPDATE users SET postcode = posted__date;CREATE OR REPLACE FUNCTION users(posts) RETURNS users AS SELECT posts.created_dates.created__date AS date FROM users WHERE posts.posted__date = posts.postcode AND posts.updated__date > posted_dates_updated() ORDER BY posts.modified ASC; UPDATE users SET posted_id = posted _ date WHERE postcode IS NOT NULL; // Firebase is now the database and the users are the users of the DAG.