/    Sign up×
Community /Pin to ProfileBookmark

Can I use Javascript instead of SQL in databases?

I want to create a new website based on databases. However, I don’t want to learn SQL. Is it possible to Javascript instead? Or how can I use minimal SQL? Can I pass variables from Javascript to SQL?

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@tirnaApr 28.2010 — If you are going to use your own database containing your customised tables then you really should learn at least the basic sql to create a database, create its tables and insert, delete, edit table data.

You should also be aware of how to write your server side code and sql to minimise the risk of sql injection where hackers could run malicious code on your database.

If you are going to build your own databases, I assume you are aware of the concepts behind database design. If not, then imo that is probably the best place to start.
Copy linkTweet thisAlerts:
@callumdApr 28.2010 — [B]narutodude000[/B], what do you mean you want to build a website "based on databases"?

If by this you mean, you want your website to be able to capture user inputted data and store that data in a database, then you're definitely going to have to learn some basic SQL.

I am not aware of any method by which you can pass Javascript variables directly to an SQL statement. What you can do is pass the Javascript variables to a script (like a PHP script), that can validate the data and then put it in to a database for you.
Copy linkTweet thisAlerts:
@KorApr 28.2010 — 
Can I use Javascript instead of SQL in databases?
[/quote]

JavaScript is a client-side language, while SQL is a Structured Query Language - a database computer language designed for managing data in relational database management systems. You can not use one instead of the other. They are different things.

But you may probably store your data in an XML file instead in a database, case in which, yes, you may use javascript (in fact AJAX) to handle those data.
Copy linkTweet thisAlerts:
@narutodude000authorApr 28.2010 — Thanks. I tried learning some SQL and PHP, and I'll go to the library today to borrow some books on SQL and PHP.
×

Success!

Help @narutodude000 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...