-1

Thanks for being out here. For educational purposes I want to create a website that queries a database of rising temperatures across the globe. The data can be seen here in an .xlsx format: Climate-Impact-Lab_Global-Data

Bear in mind that my knowledge of data structing is at a beginner level. Does a cloud-hosted noSQL database make sense? Should I create my own database? Would MongoDB make more sense? How do you determine this?

The website is created with the React framework and ultimately just wants to let users query the database. Users should be able to query their country and get a result of the temperature around the mid-century 2040-2059 or 2080-2099. For authentication purposes, I use Google Cloud Firestore to store user information. Hence I thought it made sense to use the Google Firebase Realtime Database. Yet when I imported the JSON into firebase, the data wasn't structured properly anymore. Also, I wonder if this is overkill. Thus, I think I should reconsider my options from the beginning.

What would you be the best practice here? If this is not the proper way to ask questions on dba.stackexchange, I would appreciate it if you can recommend an alternative method. Also, once I succeed to create the web app, I will surely let you know :)

Thank you for the help.

New contributor
BridlerShoc is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • 2
    Anything that fits a spreadsheet will probably fit a table in a relational database, but your question is too broad and also opinion based. Also, you should think about what you want to do with the data before fixing on an architecture and specific software components. – Laurenz Albe Jan 11 at 10:25
  • @LaurenzAlbe Thanks for the reply. So you are saying that if it doesn't matter, I could just try to import it in Firebase again and query the data from there right? – BridlerShoc Jan 11 at 10:40
  • Hi, and welcome to the forum! You should really consider an RDBMS for this sort of data - it excels (forgive the pun on Microsoft's Excel spreadsheet product :-) ) at aggegating, summing, averaging... whenever you want to "slice 'n dice" your data, use an RDBMS and SQL - otherwise you'll end up doing a lot of stuff programmatically (with the associated errors and debugging overhead) - personally, I would recommend PostgreSQL which is by far and away the best F/LOSS db for this sort of work. MySQL is more suited to a read-heavy workload (although I'd avoid it like the plague anyway!). – Vérace Jan 11 at 13:55
  • Thank you for your reply! Is there anything else I need to know when picking a PostgreSQL database? – BridlerShoc Jan 12 at 8:51
0

As Laurenz mentioned, this is mostly an opinionated question, but there are a couple of objective things you should consider when choosing a database, as follows:

  1. Is your data structured, unstructured, or highly varying in structure? Structured data fits best in a standard relational database, where NoSQL was designed for unstructured or highly changing structured data.

  2. Is your data relational, i.e. do multiple objects related to each other (like a School database has Classrooms and Classrooms have Teachers and Students)? As the name implies, a relational database system is intended to house relational data, a NoSQL database is not meant for that purpose.

  3. What type of questions will you be asking your database? Again with the example of a School database, if you wanted to know things like "How many Students both have Teacher1 and Teacher2?" or "Which Classroom has the most and least Students?" Essentially any non-basic question is best handled in a relational database system, NoSQL is intended for very simple questions.

After you've decided on the above then you can better choose which database system fits best.

If you were to use a relational database system then I'd recommend PostgreSQL or MySQL since they're free and fit your open source stack (but you can look into Oracle or Microsoft SQL Server if you want to pay for an enterprise system that's highly built out).

If you end up choosing a NoSQL database then stick to something standard like MongoDB, Redis, or AWS's DynamoDB.

The reason to stick to any of these more popular database systems is because they'll have the best documentation and are backed by good communities to ask specific questions on as you navigate your way through them.

  • 1
    Thank you for your reply! This definitely made things more clear. :) – BridlerShoc Jan 12 at 8:51
  • @BridlerShoc, No problem! If you have any other questions feel free, and I'll do my best to answer them. Feel free to accept and/or upvote my answer so other users with similar questions see it verified as helpful. – J.D. Jan 12 at 13:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.