Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

Anyone know of any issues with directly querying the Tridion CM database? I have used both direct queries and the core service. I like direct queries better because it seems to be faster and much easier to get what I want. The queries are select only.

share|improve this question
add comment

2 Answers 2

up vote 5 down vote accepted

Reasons to use Core Service over SQL queries

  1. You do not need access to the database server to run Core Service. Often an issue in production environments.
  2. Data manipulation - Depending on your requirements it is easy to manipulate/format data as you wish using C#, whether it be save as Excel or Email to a group.
  3. Core Service, if built into web application, can be exposed as a custom page making it very easy to be re-used by others within the organization
  4. Future proofing, as per Raj
  5. Understanding the database model, as per Raj
share|improve this answer
    
+1. For #5 the positive for the Core Service is not needing to understand the database model. –  Alvin Reyes Jul 15 at 21:48
    
I believe in using the best tool for the job. SQL queries are quicker if using a stored procedure. Correct me if I am wrong core service connections use WCF and do not make a direct connection to the database. I do use core service for many things. However, unless I am looking in the wrong place, there isn't much information for core service API and how to actually use the methods. –  BryanD 4 hours ago
    
Lots of Core Service information available in online documentation: bit.ly/1nY8zn9 [Login Required]. On that page, you will find a link to downloadable API documentation. –  Chris Morgan 4 hours ago
add comment

Direct queries are not future proof, In future upgrade your queries might not work, extra effort will go to resolve those. using Select queries You have to understand the DB structure, if you are fine and getting expected results with it, logically i don't see any issue using that. But Core service is SDL recommended approach for all. Never, ever run update queries.

share|improve this answer
1  
Adding to what Raj has said, you can use net tcp binding with core services to make it faster –  rdhaundiyal Jul 15 at 16:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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