Database Reference
In-Depth Information
1.2. Graph data in a relational database
In a relational database, you'd typically have two relational tables for storing social net-
work data: one for user information, and another for the relationships between users (see
figure 1.2 ) .
Figure 1.2. SQL diagram of tables representing user and friend data
The following listing shows the SQL script for creating tables using a MySQL database.
 
Search WWH ::




Custom Search