Presentation is loading. Please wait.

Presentation is loading. Please wait.

Módulo 6. Um banco de dados relacional na nuvem.

Similar presentations


Presentation on theme: "Módulo 6. Um banco de dados relacional na nuvem."— Presentation transcript:

1 Módulo 6

2

3 Um banco de dados relacional na nuvem

4 Compute Storage Management Connectivity Access control Flexible APIs Information Marketplace Reporting Relational data Management Data Sync Reporting & BI Billing & Payments Flexible APIs Information Marketplac e

5

6

7 SQL Azure acessado de dentro do Datacenter MS (Azure Compute) Application/ Browser SOAP/REST HTTP/S Astoria/REST - EDM HTTP/S App Code (ASP.NET ) App Code (ASP.NET ) App Code (ASP.NET) (ASP.NET) T-SQL (TDS) WindowsAzure Code Near SQL Azure acessado de fora de um datacenter MS (on-premise) App code/ Tools T-SQL (TDS) WindowsAzure Code Far SQL Azure acessado de dentro e de fora de um datacenter MS (on-premise & Azure Compute)Hybrid SQL Azure Data Sync Data Sync WindowsAzure SQL Server App code/ Tools App Code (ASP.NET ) App Code (ASP.NET ) App Code (ASP.NET) (ASP.NET) T-SQL (TDS)

8 Account Account Server Server DatabaseDatabase

9 Tables, indexes, views Stored Procedures TriggersConstraints Table variables, session temp tables (#t) Spatial (desde junho) … Distributed Transactions Distributed Query CLR Service Broker Physical server, catalog DDL Trace Flags http://msdn.microsoft.com/en-us/library/ff394115.aspx

10 50GB50GB5GB5GB1GB1GB10GB10GB40GB40GB30GB30GB20GB20GB

11 http://msdn.microsoft.com/en-us/library/ff394109.aspx

12

13

14

15

16

17 Réplica 1 Réplica 2 Réplica 3 DB Réplica 4 !

18 Modelo de Particionamento – Sharding Hardware Boundary BBCCDDAAAABBBBCCCCDDDDAA

19 Demo de Particionamento – Sharding Scaling Out SQL Azure with Database Sharding C:\WindowsAzureTrainingKit - Sep2010\Demos\ SQLAzureScalingOutWithDbShardingVS2010

20 SQL Azure

21

22

23

24 using System; using System.Linq; public void ConnectToSQLAzureDemo() { AdventureWorksSqlAzureDataContext context = new AdventureWorksSqlAzureDataContext(); // get all company names IQueryable companyNames = from customer in context.Customers select customer.CompanyName; // display these all on the console foreach (string company in companyNames) { Console.WriteLine(company); }

25 <?php $host = "server.database.windows.net"; $dbname = "database"; $dbuser = "user@server"; $dbpwd = "password"; $driver = "{SQL Server Native Client 10.0}"; // Build connection string $dsn="Driver=$driver;Server=$host;Database=$dbname;Encrypt=true;Tru stServerCertificate=true"; if (!($conn = @odbc_connect($dsn, $dbuser, $dbpwd))) { die("Connection error: ". odbc_errormsg()); } // Got a connection, do what you will // Free the connection @odbc_close($conn); ?>

26 // Build a connection string String connectionUrl= "jdbc:sqlserver://server.database.windows.net;" + "database=mydatabase;encrypt=true;user=user@server;password=*****"; // Next, make the sure the SQL Server Driver is loaded. Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); // Then attempt to get a connection. This will null or throw if we can't get a connection. Connection sqlConn = DriverManager.getConnection(connectionUrl); if (sqlConn == null) { System.out.println("Unable to obtain connection. exiting"); System.exit(1); } // Got a connection, do what you will // Free the connection sqlConn.close();

27

28 bcp AdventureWorksLTAZ2008R2.SalesLT.Customer in C:\load\MoveDataToSQLAzure.txt -b100 -c -U username@servername -S tcp:servername.database.windows.net -P password

29 Tipo de Engine para SQL Azure

30 http://sqlazuremw.codeplex.com/

31

32

33

34 Introdução ao SQL Azure lab #05

35


Download ppt "Módulo 6. Um banco de dados relacional na nuvem."

Similar presentations


Ads by Google