Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8107307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:43:38+00:00 2026-06-06T00:43:38+00:00

I am creating a web application that will have many users. Each user has

  • 0

I am creating a web application that will have many users. Each user has its own login and password to access the application. The data of the application will be stored in a database.

As the application will have many users, I would like to know the correct way to make the users connect to database through my application.

Is it better to create many users of the database (accounts) or simply use the master/root to connect to database from the application?

Edit/Note: the application users will not have direct access to database. The database is in the same server of the application and will not be open to external access.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T00:43:40+00:00Added an answer on June 6, 2026 at 12:43 am

    There are pros and cons to each.

    Using a shared service account to authenticate to the database has the advantage of being able to more efficiently pool connections to the database. That is, connections can be re-used between users minimizing the sometimes costly operation of opening a new connection, which you will have to do if each user authenticates separately. A definite con is that you have to be extra careful about validating any SQL the user is running since the permissions on the account have to be able to do what the most powerful user of the system needs to be able to do.

    Using an account for each user gives you more flexibility in assigning permissions to various users without having to implement your own custom authorization scheme in your application. Also, it makes auditing the system a little easier because you know who is connected when you check the DB connections. Finally, this approach can reduce your vulnerability to SQL injection, in that you can lock down each user’s account (preferably using role-bases security in the DB platform) to only be able to do things that user should be allowed to do.

    So, for example, if they somehow inject a DELETE FROM UsersTable, you would have locked that down and the injected command would fail even if it got through your validation logic.

    There is another consideration if you have users who know how to use database tools (especially MS Access) and have direct access to the database server. If you use the per-user authorization model you may have trouble with savvy users circumventing your application and working directly against the database. If your users are a bunch of programmers you might want to go with a shared account.

    Use a shared service account for DB access if your app is very heavily trafficked by a large number of concurrent users who do small transactions.

    Use an account/per user scheme when you have fewer users connecting to the system concurrently or you want more security and/or better control over authorization to objects.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am interested in creating a simple web application that will take in user
In my web application I have created a form that will allow users to
I'm creating a web application that will use multiple types of users (e.g. Admin,
I've creating one ASP web application, in that application one form have to update
I am creating a web application that will display the dates of various events
I'm creating a web application that will involve habitual file uploading and retrieval (PDFs,
We’re creating a web application that will display contour areas as bitmaps in a
I'm creating a small application on an embedded device that has a boa web
I am Creating a web application that will get homework from schools website. I
I am creating a Grails application that has read-only access to a web service

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.