E
E
egorvodopyanov2019-01-27 12:50:43
Database design
egorvodopyanov, 2019-01-27 12:50:43

How is the Yula application database designed?

Or something similar with functionality: a profile, ads, private messages and, most importantly, a search by category.
I want to try to implement a similar service for educational purposes, I’m thinking about what to use on the backend, a related question: is it possible to use something like firebase for this (I read that it would be inconvenient to implement a search)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
luna3956, 2019-01-27
@egorvodopyanov

firebase is suitable for implementing personal correspondence (instant messages), otherwise it is not needed. Use Postgresql or Mysql and be happy.
The database is designed quite normally, there is nothing tricky:
Users table Users(id, name, ...)
Ads table Ads(id, title, text, category_id, user_id, ...)
Messages table Messages(id, text, from_user_id, to_user_id , ...)
Google "full text search".
Well, it is worth considering that in the case of large projects there is a lot of caching. The data is spread across many different servers. Each user and his data (ads, correspondence, etc.) are stored on one server. The methods of "separating" users to different servers may be different, but usually they calculate a hash from a login or, for example, a number, take the remainder of the division by the number of virtual servers, and depending on the result, the user is directed to the appropriate server. But you hardly need this, it is only for projects with a lot of data and high loads, I just said for your understanding how it works.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question