Introduction to SQL Azure via PHP Brian Swan PHP Developer Outreach, Microsoft @brian_swan [email protected] http://blogs.msdn.com/brian_swan http://www.linkedin.com/in/brianeswan
Feb 25, 2016
Introduction to SQL Azure via PHP
Brian SwanPHP Developer Outreach, Microsoft
http://blogs.msdn.com/brian_swanhttp://www.linkedin.com/in/brianeswan
Developer ExperienceUse existing skills and tools
The Windows Azure Platform
platformAppFabric
Compute Storage Management Relational data Management Connectivity Access control Reporting & BI
Billing & Payments
Flexible APIs
Information Marketplace
SQL Azure DatabaseThe first true relational database as a service
Elastic Scale Developer Agility
Self-managed
• Database utility; pay as you grow
• Flexible load balancing• Business-ready SLAs• Enable multi-tenant
solutions• World-wide presence
• Easy provisioning and deployment
• Auto high-availability and fault tolerance
• Self-maintaining infrastructure; self-healing
• No need for server or VM administration
• Build cloud-based database solutions on consistent relational model
• Leverage existing skills through existing ecosystem of developer and management tools
• Explore new data application patterns
SQL AzureArchitecture
SQL AzureDeployment
Web Portal(API)
SQL AzureTDS
DB Script
SQL AzureAccessing databases
Web Portal(API)
SQL AzureTDS
Your App
Change Connection String
Database Replicas
Replica 1
Replica 2
Replica 3
DB
Single Database Multiple Replicas
Single Primary
SQL AzureDatabase Monitoring & Recovery
Web Portal(API)
SQL AzureTDS
Your App !
SQL Azure Features• Supported– Tables, Indexes, Views– Stored Procedures– Triggers– Constraints– Table Variables– Temp Tables (#Name)
• Not Supported– Physical Server Access – Catalog DDL– Common Language
Runtime– Service Broker– Reporting Services– Analysis Services– Distributed Transactions
and QueriesWhitepaper: SQL Azure vs. SQL Server
SQL Azure Pricing• Web Edition
• Up to 1 GB relational database = $9.99 / month • Up to 5 GB relational database = $49.95 / month**
• Business Edition• Up to 10 GB relational database = $99.99 / month • Up to 20 GB relational database = $199.98 / month**• Up to 30 GB relational database = $299.97 / month**• Up to 40 GB relational database = $399.96 / month**• Up to 50 GB relational database = $499.95 / month**
• Data transfers • $0.10 in / $0.15 out / GB - ($0.30 in / $0.45 out / GB in Asia)
* No charge for inbound data transfers during off-peak times through October 31, 2010** SQL Azure 50 GB Business Edition Database and 5 GB Web Edition Database will be available starting on June 28, 2010.
http://www.microsoft.com/windowsazure/offers/
PHP with SQL Azure• SQL Server Driver for PHP – Binaries: http://bit.ly/sqlsrvdriver – Source code: http://sqlsrvphp.codeplex.com/
• Supports PHP access to SQL Azure
• Features– Choose between SQL Server and SQL Azure by changing
connection string– Use from on-premises or in Windows Azure
SQL Server Driver for PHP - Architecture
Windows AuthenticationConnection poolingStreamingServer-side “scrollable” cursorsUTF-8 supportSQL Azure supportPDO support (Beta)
SQL Server Driver for PHP - Features
Demo
Resources
• http://www.joshholmes.com/blog/• http://english.zachskylesowens.net/• http://blogs.msdn.com/b/sqlphp/• http://sqlazuremw.codeplex.com/• http://azurephptools.codeplex.com/• http://msdn.microsoft.com/en-us/windowsazure/s
qlazure/default.aspx• http
://www.microsoft.com/windowsazure/whitepapers/