The paper presents the comparison study of relational, document and graph databases. A social networking web application supporting all three types of database was developed. The analysis consists in data models analysis and performance tests. Data models analysis discusses requirements meeting and difficulties of different implementation. Performance tests present results of obtained for five different tasks. Each of analyzed solutions revealed their strengths and weaknesses. The analysis showed that the graph model the most accurately models the reality. Document database queries occur to be the simplest in use. In terms of performance, PostgreSQL occurred to be the best.