Question about data bases and hosting... advise?

A while back I wrote about part number search that I want to do on a website… I would have thousands of part numbers maybe in different files or databases to do a search and find results.

Anyway… what method do you think would work better to get this done? and what would be more cost friendly?

Currently I am moving away from the Wordpress platform and coding my own site, right now I am doing a bit of html, css, javascript… and I am not yet doing anything with the back end.

OPTIONS??

At the moment I have shared hosting C-panel with MySQL… Do I need to learn some PHP and just do it on MySQL database?

I would like to use Json files and eventually move everything on REACT… but what kind of database should I use? The price tag for hosting with MongoDB is pretty high. Maybe I am looking at the wrong place? Godaddy told me to get MongeDB hosting I need a dedicated server and I think that goes for $120. a month…, which would be an automatic no …

Is there anyway to use the Express.js, REACT, Json, platform without having to pay all that much? My traffic is low, and I am just looking to do the back end and be able to use the Json structure rather than MySQL.

Use a hosting provider like Digital Ocean or similar where you get a server (virtual or not) and can do what you want. I’ve got a $10/month droplet (virtual host; $5/month one would probably work) that runs multiple sites (django, rails, and node behind nginx), mongodb and postgresql databases, postfix/dovecot for email, and td-agent for logs. One time I even had elasticsearch and kibana running on it, but that killed everything else.

The downside is you need to know how to do the administration yourself or be willing to learn quickly.

You’re definitely going to want to use a database backend as opposed to a file for your data for basically anything other than testing. In production, you may have multiple instances of your site trying to read and write that data file simultaneously and you would have to get that right or corrupt your data. With a database, you just say “I need this data” or “store this data” and the database handles the magic, with all kinds of other bells and whistles.

1 Like

Two things:

  1. There’s no need to learn PHP just to use MySQL. There are MySQL bindings for just about every mainstream language. Use what you know. BUT – if you’re going to use your existing MySQL instance, make sure it’s got the juice to do what you need and is configured so it won’t trash your website if you’ve got a data access bug.
  2. You can get a 3 node MongoDB Atlas instance for free at mongodb.com. That should get you started and you can worry about paying for scale up when it becomes necessary.

jrm

1 Like

Thanks… I saw that from mongodb, much better pricing for small things.

Question… do I need to host my website with mongodb.com in order to use their database hosting? I think I am gonna need to call them…

No, not at all. They’ll host the database and you can put the frontend website wherever you want.

jrm

If costs are a concern I’d start there. Because your requirements don’t sound too complicated you don’t need anything fancy.

There are actually free tier options for building your full stack app, along with a free tier option for mongodb. There’s also a free tier option for an SQL database (postgres) as well.
There’s also a multitude of cheap hosting solutions out there.

Below is the list of resources I know about:

Free tier tech

  1. Heroku
  • free tier can handle full stack apps, but will sleep after 30 mins and have very limited runtime performance.
  • also provides freetier postgres databases
  1. Firebase
  • note this isn’t a full stack option, it’s a development platform that provides API’s to interact with a client-side application. Functionality wise it could work, but your mileage may vary and your completely locked in. I honestly wouldn’t go this route due to the limited options, and the need to understand the limitations before starting. I’m only providing it as it is at least an interesting option. The API acts as the database (Firestore)
  1. Mongodb Atlas
  • mongodb is a database, which can handle your data.

Cheap Options

  • Digital Ocean (5$ for cheapest droplet or App Platform a month)
    • this has 2 options, either an IaaS option, which they call Droplets or the newer App Platform, which is a PaaS. Which is similar to Heroku in price point and functionality
  • All Major cloud providers (0$ - 30$+ a month), I’m talking AWS, Azure, and GCP. You can set things up pretty cheaply, but due to the number of offerings its easy to get confused.

Generally you have to decide if you want to optimize for cost, or optimize for features. There are actually a number of ways you can fit simpler projects into a free tier or even architect it to be essentially free anywhere. Something like a JAMStack app can be blazing fast, leverage a few API’s, and be easy to work with. However it also means mixing more newer technologies, and tacking a non-full stack approach.

I’d start with your price point, and what sorta requirements your looking at of what you want your app to be able to do. From there you can get more in detail with if a given approach/hosting provider can meet your needs.

1 Like

Thank you much, brad…

The price point wasn’t an issue, until somebody from Godaddy told me the only way to get a MongoDB from them was on a dedicated server and their price starts at $129.00 per month… well, that was shocker.

So, I figure to better ask around, and what better place to do it but to ask the coding guys?!

The biggest part of the website would be the database, which I want to handle with json and MongoDB, but surely it seems weird to have to pay so much money just to use that type of technology.

For now I am finalizing a few things, and the next project will be start working on one of the databases.

Thank you much for all the information!

1 Like

I’m not sure how many records you plan on working with, or how complex their relationships are, but I don’t think the database will be the “largest part” of the website.
A few thousand records isn’t much. A hundred thousand might be where you’d need to be concerned about how you’re doing to do things, but even with simple requirements this isn’t a big issue still, even if you just have a single basic instance.

However things can go much further than just how many records you have. If each record is “large”, then your database will get slower faster than if your records are much smaller with just a few basic attributes each.

Regardless of if you want MongoDB or some SQL database, you will probably use some kind of library to interact with its data, and thus if your using something like nodejs, you could end up with just JSON data objects as you desire, regardless of how the data is actually saved or modeled within your database.

Finally, I remember you mentioning a number of features about what user’s can do with your data from your database. Those features could range from simple to incredible complex. I’d consider those features to be the “largest” part of the app, as almost any feature you can think of will require you to consider the entire stack. Where-as how you design the database, and manage it is isolated to just the database itself. I am just going off the few details I remember from what you’ve mentioned in the past though, so its possible the features you do have are straight forward and you should be ok.

Good luck, keep building, keep learning :+1:

1 Like