2
8 Comments

Best way to store data for a small project?

Hello here I'm looking to start a small project that will capture information about books and will help me (and maybe others) to find relevant information about them.

I'm wondering what would be the best way to store the book information (title, author, tags, pages, editor, etc) so it can be:

  • Easy to access by a client (React)
  • Easy indexable & searchable (looking at Elastic Search ATM)
  • Easy to host (less time I need to focus on hosting the better)

My options so far are:
Regular MySQL (or any of its variants)
MongoDB
Firebase

Am I missing something? What would be the benefits of one over the other?
Any suggestions would be appreciated.

  1. 2

    I would say that it really dosen't matter. It least not at the point where you are.
    Pick whatever you are comfortable with and maybe have prior experience with.

    Unless you're looking to store data millions about millions of books any of the options you've listed would do just fine.

    1. 1

      Eventually I would like to list millions but yes you are right. At this point it can be anything. My only concern is the search-ability. Do you have any recommendations for it?

  2. 2

    Hi I built the exact thing what you’re asking for few weeks back

    You can check it out here https://Poth.club

    It’s only index local books but you can implement the same

    I used MySQL to store data. I gave different columns for different meta data like pages,author etc

    I used MySQL because if I wanted to add reviews I needed a relational database.

    If you are interested more hit me up on Twitter @justruky

    1. 2

      A non-relational DB would also work for reviews, you would basically add a unique field for the book being reviewed when saving the review in the DB. And if you are thinking about data coherence, you can do that check on the application side instead of the DB, before writing the review (on Mysql it would be a foreign key)

      1. 1

        True but it’s much easier to get data via a single query by using joints

        I don’t think Mongodb supports joints

        So you don’t have to run 2 queries

    2. 1

      Hey thanks for the response. What are you using as a search engine (if you don't mind sharing?)

      1. 2

        I wrote a python script to scrape data from book publisher websites in my country and collected the data to the database.

  3. 1

    This comment was deleted 3 years ago.

Trending on Indie Hackers
How I grew a side project to 100k Unique Visitors in 7 days with 0 audience 49 comments Competing with Product Hunt: a month later 33 comments Why do you hate marketing? 29 comments My Top 20 Free Tools That I Use Everyday as an Indie Hacker 17 comments $15k revenues in <4 months as a solopreneur 14 comments Use Your Product 13 comments