A social network PostgreSQL Database
The goal of this project is to create a SQL database for a social network. For this we used the database management system PostgreSQL, which will be implementing via the development tool PgAdmin III.
4 main agents of the network are: user, user’s friends, publisher of an article, commentator(s) of an article.
In the document below (Download) we’ll give some examples of n-tuples in tables of the database. We also wrote some SQL requests to extract informations of the network, which are inserted in Utilisateur.sql.
The database must respect some constraints, such as the visibility of a publication, or the access and comment rights for an article. For example, an user can only read its own publications and those of their friends… We used Triggers and functions in PL/pgSQL to control these rights.