Ask coding questions

← Back to all posts
A few questions about sql.
ia13ru (43)

I am new to sql and I have 3 questions about it.
1. How would I put data in the cloud? Or could I just store it in a file for later use?
2. How would you use sql with javascript?
3. In a HTML page, how can I display a database?
I am using sqlite.

Answered by Baconman321 (1061) [earned 5 cycles]
View Answer
Baconman321 (1061)

Ok, so first things first, replit sqlite AFAIK doesn't allow remote connection (chezcoder and I tried this to no avail).

Second, sql is a query language that allows you to store data in a file on the server.

JavaScript is a client-side language, which means that it is not capable of accessing sql (for a good reason, too! People could use devtools to delete things from your database or add things too it, which could be quite the predicament).

To use sql, you need a server language (like NodeJS). Additionally, you will need a MySql server set up which will handle queries to the database.

Mysql is a database management system that uses sql queries to store information in a database and/or retrieve info from it.

Sqlite is like Mysql in that it is a database management system.

IDK exactly how to do it, so you will need to read the Sqlite documentation.