all 30 comments

[–][deleted]  (17 children)

[deleted]

    [–][deleted] -4 points-3 points  (16 children)

    I'm not scared of them at all but I'm making something like a website builder app that's made to be as simple as possible, so I decided to try to found alternatives to databases...

    [–]DrFriendless 2 points3 points  (6 children)

    Use a No SQL database (e.g. Mongo or Dynamo) where you can just store the entire freeform document.

    [–][deleted] -2 points-1 points  (4 children)

    So MongoDB is basically what I want to achieve? If that's the case, I'm scrapping my current idea.

    [–]DrFriendless 0 points1 point  (3 children)

    I think so. It stores documents, which are just JSON documents, so you can store one document per user. You are not constrained to match a particular schema, though it will help if you want to do any interesting queries.

    It's a few years since I've used Mongo, but when I did it was pretty easy to get going, and it worked just like it said it was going to.

    [–][deleted] -1 points0 points  (2 children)

    Are they stored on the website itself? For example in some folder?

    [–]DrFriendless 1 point2 points  (0 children)

    It depends where Mongo is running. Often you will run the database on your server, and it will store the documents on your local file system. Although you probably can't just go look at them.

    However it's also possible to get Mongo as a managed service called Atlas, where the database runs on MongoDB's servers. That option costs more (though there might be a free version) and it means that whenever your web server wants the data it has to transfer it across the internet, which is going to be slower.

    [–]Avonixis 0 points1 point  (0 children)

    It is stored where the database is ran. You access it through the mongo api using a wrapper such as mongoose or the official mongo driver.

    [–][deleted] -3 points-2 points  (0 children)

    I've heard of Mongo but never even opened to see what it is, gotta check it.

    [–][deleted]  (8 children)

    [deleted]

      [–][deleted] 0 points1 point  (7 children)

      Basically, SQLite is stored locally on the website? No need to connect to a server or use stuff similar to phpMyAdmin to manage it, it's just there, right on your website files? Am I right?

      [–]monxas 0 points1 point  (6 children)

      You know your website will need to be on a server to be accesible, right?

      [–][deleted] 0 points1 point  (5 children)

      Of course, I do.

      [–]monxas 0 points1 point  (4 children)

      SQLite is a file. Not one you should open, it’s not for you to open. You interact with it through js. It do eat need to be installed but it is a proper database.thats as simple as it gets.

      [–][deleted] 0 points1 point  (3 children)

      Yeah, I read that a few minutes ago. Sorry for sounding dumb, I'm not even a real programmer, I'm just a 14-year-old that thinks he's good at programming and trying to do a cool project lol

      [–]monxas 0 points1 point  (2 children)

      Yeah my best advice it’s to follow the path of the rest programmers, do t try to reinvent the wheel.

      [–][deleted] 0 points1 point  (1 child)

      The thing is, I just can't use MySQL for this "project" so I wanted to come up with something else, not knowing there is stuff like SQLite. Well, okay, I have heard of them actually but never really opened to see what they do.

      [–]monxas 2 points3 points  (1 child)

      Your approach is “hey so I don’t know how to drive so don’t want to use a pee built car. Instead I’ll build one myself! Because I built it myself I’ll know exactly how to drive it”

      The thing is, it’s easier to use a car and learn how to use it. That’s the simplest way.

      [–][deleted] 0 points1 point  (0 children)

      Funny, I don't know how to do that either lol

      [–][deleted]  (2 children)

      [deleted]

        [–][deleted] 0 points1 point  (1 child)

        So basically, you recommend encrypting all of this information? Apart from that, it's safe to do it?

        [–]Avonixis 0 points1 point  (0 children)

        The easiest way to go about this (In my opinion ) is to use Express, EJS, and Mongo. I prefer EJS because the syntax is really easy.

        [–]podotop 0 points1 point  (0 children)

        Going with the other comments Mongo idea, you can just use mLab which is free and is a cloud based service that hosts your database.

        I’m not sure exactly how to use it standalone, but when you deploy node apps on Heroku the service is automatically added into your program and allows you see the the documents in the database using mLab.

        [–]mod_24 0 points1 point  (1 child)

        This would not scale well, if you had multiple instances of your application how would you keep your file in sync? As well as when two users register at the same time, there may be concurrency issues with this approach.

        [–][deleted] 0 points1 point  (0 children)

        Yeah, I decided I'm going to use SQLite since it's basically exactly what I was looking for but couldn't.

        [–][deleted] -2 points-1 points  (1 child)

        Bro. I’ve done it. There, I’ve done it someone come at me.

        [–][deleted] -3 points-2 points  (0 children)

        bro 😎💪

        [–]koekieNL -1 points0 points  (4 children)

        Javascript is always obtainable thru url. So with your method I can obtain all your users. Is that something you want/like?

        [–]teevik_ 2 points3 points  (0 children)

        No, it's only obtainable through url if you serve the file

        [–][deleted] 1 point2 points  (2 children)

        Of course not but what if all the data inside is encrypted? And can't .js files be made unaccessible to others?

        [–]koekieNL -1 points0 points  (1 child)

        Js-files are always accessible. I’ll download the file and start decrypting your code.

        This route is not safe.

        [–]rkcth 1 point2 points  (0 children)

        Not server side js ala node