Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am creating an application like facebook which would have features like posting, chatting,adding stories etc. I am using Django for it. I am confused over choice of databases(sql or nosql) and over ther database models. I am Django's default user model for authentication and I think I must extend it to add fields like Bio,Gender,Hobbies etc. Can you show me example model?

What I have tried:

As stated I am using default user model of Django for authentication and I need suggestion over the fields like friends,bio,posts etc. Help with example would be appreciated.
Posted
Updated 9-May-20 19:54pm

1 solution

It depends, if you want to make a real-time chat application usually there is no database at all.
Read more about it here: simple-chat-app-using-django-channel-ed5032b79b9c[^]

If you want to use a database, PostgreSQL is a good choice, see:
databases-for-building-social-network-like-apps[^]
And: best-resources-to-learn-postgresql[^]

A simple database model can be found here: Facebook Like Chat Application in PHP - Codedodle[^]
When using PostgreSQL I would recommend using a SERIAL data type for the id field, see: PostgreSQL: Re: pgAdmin 4 - How to set auto increment primary key[^]
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900