0

I have sqlite db runing on my server. I want to access it using client side javascript in browser. Is this possible?

As of now, I am using python to access the db and calling python scripts for db operations.

3
  • JavaScript <=> Ajax <=> Web service/API implemented in python <=> DB Commented May 16, 2017 at 11:53
  • Exactly! I have been using Ajax. Just wondering if there's another way using javascript in browser. Commented May 16, 2017 at 12:12
  • 1
    It is a bad idea to allow a client side script (which can be modified by a user) to directly access a database and allow to send statements to it. This allows to arbitrarily modify the database or to run complex calculations on your server. Commented May 16, 2017 at 12:15

1 Answer 1

1

It's not a good idea to allow clients to access directly to the db. If you have to do it be carefull to not give to the account you use full write/read access to the db or any malicius client can erase modify or steal information from the db.

An implementation with client identification server-side and rest API to return or modify DB it's safer.

Sign up to request clarification or add additional context in comments.

1 Comment

I completely agree about the fact that we should use a backend implementation for db related operations. I was just curious of how to do it in client side, if at all I want to do it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.