I'm trying to come up with an online database that my clients would have partial access to. This is for an artwork storage company. We have about 40 clients and would like each to have access to their collection. Is that possible?

  • 1
    How good is your DBA? – user40980 Dec 9 '14 at 0:29
  • An API is, I believe, what you're looking to build. @MichaelT's answer has the gritty details of managing who can access what. – Chris Cirefice Dec 9 '14 at 3:30
  • Please (!) define more clearly what you mean by "access" - programmatic access, interactive access by using a web application, or something in between? – Doc Brown Dec 9 '14 at 11:55

Sure, you can create a database create an account on it and put it "out there" for the clients to have access to. It is possible.

You will encounter things like "how many connections do you have?" and "can the admin log in from remote?" and "just how bad is it if one of the clients gets more access than they should have?"

Once its "out there" anyone can try to connect to it. Having a database "out there" will be the subject to cracking attempts. Data over the wire for databases isn't typically encrypted. Having it out there as a database also means that your clients are getting connections - possibly persistent ones and can accidentally denial of service themselves (or you).

All of this takes very good management from the DBA to make sure everything is set up properly. That the table visibility or views or column visibility or connection information is all set up correctly. That long running queries (they ran a query that consumes how much CPU time?) are properly dealt with. That the log files are monitored for inappropriate access attempts. It is a fair bit of work.

People kind of tried to do this in the past with Web SQL but that kind of fizzled (and probably isn't too useful unless you are using SQLite as your backend).

What you would see more of today is writing a RESTful interface to the database and present that. Don't give them full SQL access to the database. They probably don't need it. But write an interface to the system that allows them to fetch what they need and not kill your own database performance at that time.

Opening access to a raw database access across the WAN is typically a 'bad thing' and should be avoided if possible. Find out what your clients really need (not what they want) and build that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.