Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Web Service vs. direct connection to the database.

Web Service vs. direct connection to the database.

Scheduled Pinned Locked Moved ASP.NET
databasevisual-studiosysadminwindows-admintesting
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Steve Holdorf
    wrote on last edited by
    #1

    I am doing some testing of the difference of an application that calls a web service for all database I/O and an application that uses embeded, direct connect, SQL calls. After testing it appears that the application that does the direct connect to the database runs faster then the one that uses the web service for the data I/O. This being the case, why would I use a web service for data I/O and not just use embeded SQL? Note: I am testing a server application that runs on Windows Server 2003 and a database running on a Sun machine. As far as the web service, it and the server application are both running on the same Server 2003 machine. Thanks!

    L 1 Reply Last reply
    0
    • S Steve Holdorf

      I am doing some testing of the difference of an application that calls a web service for all database I/O and an application that uses embeded, direct connect, SQL calls. After testing it appears that the application that does the direct connect to the database runs faster then the one that uses the web service for the data I/O. This being the case, why would I use a web service for data I/O and not just use embeded SQL? Note: I am testing a server application that runs on Windows Server 2003 and a database running on a Sun machine. As far as the web service, it and the server application are both running on the same Server 2003 machine. Thanks!

      L Offline
      L Offline
      l0kke
      wrote on last edited by
      #2

      Generally, the advantage of WebService is that you can plug in multiple clients - Web interface, WinForms client etc. to the web service, and those clients don't need to have any knowledge about the database itself. Also, it is more maintainable, if anything changes on the db level, you need to change only the webservice, not every client. Another point is a security, if you are accessing the database from WinForms client, anyone can reverse engineer the client app and see connection string or username/password combination. When you keep this information on the web service, only privileged users (users with log-on access to the server) can have possible access to this information. However, if your scenario is restricted to ASP.NET application -> WebService -> DB server structure, I don't really see the point having the WebService, especially if the WebServer and the WebService are running on the same machine. I would say you should build data access layer within your web application then. Pilo

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups