views:

99

answers:

2

Hi,

we have several sites for several different clients, each with several different databases.

Some of the databases are at client location, some are on our site.

I have been tasked with creating a few sharepoint sites that will display information from the databases.

Is it okay to call stored procedures from my sharepoint sites? Since the database is not for the sharepoint site, I feel like that site should not have direct access to the DB and should get the data through web services. Certainly, this would be the case if the data were exposed to another company, but since we are responsible for all of it, is that okay?

+1  A: 

In my opinion you save yourself from lot of trouble by just going directly to the database, since you control both ends. The direct access to DB will also have better performance than writing some web services in between the two systems.

If the other system wouldn't be yours, I'd definitely hope that it had a web services (or RESTful web services) interface. My reasoning here is that in most software, web services are really actually meant for integrations and thus changes to them are kept at minimum. Database schema changes are fairly typical during the lifetime of a software product and thus it's not generally easy to evolve the schema if other people build integrations directly against the DB.

Kaitsu
+1  A: 

Querying the database directly is not a supported scenario, thus you shouldn't ever need to do that.

Best practice is to use the existing Web Services, or implement your own custom Web Service.

The database does not belong to the SharePoint site (according to the question)
Alex Angas
Ah, my bad - read it too hastily :)