Installation and deployment
Version 7.x > Installation and deployment > SQL Azure best practice View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
wdaugherty-dataspringinc - 7/22/2013 4:12:02 PM
   
SQL Azure best practice
What is considered the best practice for custom stored procedures in Kentico and Azure SQL? I have a stored procedure that pivots the custom fields and values for document types so I can use it as a data source for a repeater in a transformation. If there is a built in solution for this as opposed to a custom stored procedure I would be open to that as well.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 8/2/2013 6:10:37 PM
   
RE:SQL Azure best practice
Haven't done this with Azure but in a "normal" environment I've created the SP in the database using a similar naming convention as what Kentico uses but with my custom names. Then I create a custom document type and add a custom query within the new document type that calls this stored procedure. This way I can use a custom query webpart to display the data without having to write any code. This way will also allow me to write as many transformations as I'd like as well even if you getting a different dataset each time.

User avatar
Member
Member
Swainy - 8/7/2013 4:55:13 AM
   
RE:SQL Azure best practice
Hi it all depends on what you are trying to do. We generally store our data in custom tables and then use the API to retrieve/set the data.

If you are creating very stand alone tables yourself you can still create custom tables based on an existing database table and use the API to get the data in and out.

If you are set on using stored procedures and your own processes and or tables then just use a sensible naming convention.

Azure SQL does handle general stored procedures but not every type of stored procedures in MSSQL. Here is a link to show what's supported and what isn't...

http://msdn.microsoft.com/en-us/library/windowsazure/ee336237.aspx

Any questions just ask,

Thanks,

Matt

User avatar
Certified Developer v7
Certified  Developer v7
wdaugherty-dataspringinc - 8/7/2013 8:41:03 AM
   
RE:SQL Azure best practice
Thank you for the suggestions. What we needed to do was flatten parts of the content tree (specifically the products for e-commerce) because of the way a client wanted to view the data and we were just trying to figure out the best way to maintain that from a source control perspective as well as best practices in relation to Azure as this is our first Azure based project, but it has become a non-issue as our client changed their mind. Again thank you for the suggestions and we will keep them in mind for future projects.