Download DEV351 - Visual Studio: Developing Local and Mobile Data

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Extensible Storage Engine wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Oracle Database wikipedia , lookup

Tandem Computers wikipedia , lookup

Database wikipedia , lookup

Microsoft Access wikipedia , lookup

Btrieve wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Database model wikipedia , lookup

Clusterpoint wikipedia , lookup

Team Foundation Server wikipedia , lookup

Relational model wikipedia , lookup

Open Database Connectivity wikipedia , lookup

SQL wikipedia , lookup

PL/SQL wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Transcript
DEV351
Developing Local and Mobile
Data Solutions with
SQL Server Everywhere
Steve Lasker
Program Manager / Technical Lead
Microsoft Corporation
UI Framework
http://blogs.msdn.com/SteveLasker
Agenda
App evolution
Why SQL Server Everywhere
VS Designer support
SQL Server Everywhere enhancements over SQL
Mobile
Deployment options for SQL Ev
Programming Model
ADO.NET, ResultSet, LINQ to Entities w/SQL Ev
Securing the stolen laptop
Basic Components of An App
Interaction Model
User Interface
Service (Web Service, CMD Line)
Logic
Security, rules, defaults, workflow
Persistance
Data (Database, XML, Data Device)
Evolving Applications
MS Expense
Accounting
Microsoft
Exchange
MS Expense
Payroll
Owned by different teams and/or companies
Version independently of each other
Don’t necessarily know, or care, about each client
Delegate responsibility to the next app / tier
Bank
Fully Partitioned Applications
Create complete components
Delegate responsibility
Empower decision making
w/reference data & rules
Communicate complete
operations
OCS Services
Evolving Applications
OCS Services
OCS Services
Right tool for the right job
Smartphone
SQL Server Everywhere
Windows CE Device
Pocket PC
SQL Mobile
Win 32
SQL Express
Desktop (Single User)
Laptop
Tablet PC
Single User Scenarios
Server (1000’s of users)
Workgroup (Dozens of users)
SQL
Multi
User
Server
Local Database Options
Which Version of SQL Server?
SmartPhone
Enterprise
Server
Workgroup
Server
Desktop,
Workstation
Laptop
PocketPC
TabletPC
Data as a service for small, multi-user
client apps and websites requiring
advanced SQL Server features
Fully featured
database serving
dozens to
thousands of users
Ideal for single user client and device
applications requiring a maintenance
free, compact footprint
SQL Ev Notable Features
1.4 MB runtime
Smaller then a floppy disk
Admin and Non-Admin deployment options
Single file, code free format (.sdf)
In-Proc with the hosting app Doesn’t run as a service
Up to 4 gigabytes per database
Multi connections for background data operations
Simplified security with password and encryption
Query Processor w/Transaction
Runs on Windows XP, Windows 2003, Vista B2
Windows Mobile
Common programming model through ADO.NET
Multiple sync options
Proven, Lightweight, 2 Tier, Scalable Sync API (RDA)
Full Featured Merge Replication
Future investments for Occasionally Connected Apps
SQL Server Everywhere Non
Features
Sprocs, Views, Functions
Database is in-proc with the app
Why limit yourself to TSQL
Write your functions in full managed code
Triggers
Interesting scenarios, but triggers are limited
to TSQL Code
How about event notifications? (Future)
Complex user role management
Data is pre-partitioned per user
Network connectivity
Not supported for IIS/ASP.net data scenarios
Microsoft Visual Studio 2005
Designer Support
Additional Features of SQL Ev
Runtime enhancements
No longer desktop restricted
|DataDirectory| macro
Dynamically handles location of data files
.\Northwind.sdf becomes |DataDirectory|\Northwind.sdf
VS Designer enhancements
ClickOnce bootstrapper for central installations
Deployment Options
Single Central Install (MSI)
Servicing via Microsoft Update
Requires Admin Rights
ClickOnce Bootstrapper
Private Deployment (ISV Option)
Privately deploy the dlls with your application
Doesn’t require admin rights
No direct servicing by Microsoft
App author assumes servicing responsibilities as part
of their application
Deployment Options
ClickOnce with SQL Everywhere Bootstrapper
ClickOnce with Private DLL Deployment
Privately deploying SQL Ev
Central install of SQL Ev will
override private version
Enables painless deployment
‘till IT rolls out broadly
Change System.Data.SqlServer.dll
refernce Copy Local
Copy sqlce*.dll’s from
%ProgramFiles%\Microsoft SQL Server Everywhere\v3.1
Not supported by Microsoft Update
Must be serviced by the hosting application
Programming Options
ADO.NET w/DataSets & Typed DataSets
System.Data.SqlServerCe.SqlCeDataAdapter
ADO.NET w/DataReaders
System.Data.SqlServerCe.SqlCeDataReader
ADO.NET w/Updatable Result Sets
System.Data.SqlServerCe.SqlCeResultSet
ADO.NET Entity Framework (Orcas)
SqlCeResultSet
No memory caching
Think properties w/backing fields as the
database
Implements Databinding interfaces
Dim cmd As New SqlCeCommand()
cmd.CommandText = _
"SELECT EmployeeID, LastName, FirstName, " & _
"FROM Employees"
cmd.Connection = New SqlCeConnection("Data source = |DataDirectory|\Northwind.sdf")
Me.EmployeesBindingSource.DataSource = _
cmd.ExecuteResultSet(ResultSetOptions.Scrollable Or ResultSetOptions.Updatable)
SQLCeResultSet
ADO.net V3 (Entity Data Model)
Securing SQL Server Everywhere
Password Protection
Database level encryption
File system encryption
Securing SQL Server Everywhere
Summary
SQL Server Everywhere is your killer FREE
local database
Consistent database from device to desktop
Consistent data & programming model from
device to server
Best for synching with SQL Server
Base for building Occasionally Connected
Systems
Start today with Visual Studio 2005
Is the focus for future client database
investments
Resources
Product Information & CTP Download
www.Microsoft.com/Sql/Everywhere
Runtime engine
ClickOnce bootstrapper
SQL Server Everywhere Q&A
Blogs.msdn.com/SqlMobile
Blogs.msdn.com/SteveLasker
User Groups
forums.microsoft.com/MSDN/ShowForum.asp
x?ForumID=152&SiteID=1
Resources
Monday
Thursday
 Microsoft's
 SQL
Data Platform Vision
Dave Campbell, 9:00-10:15 AM, Room
254 AB
 SQL Server Everywhere - the
Lightweight Smart Client
Database Steve Lasker, 10:45-12:00
DEV booth
 SQL
Server Everywhere
Roadmap Anil Nori, 3:15-4:30 PM, DAT
booth
Wednesday
 Design
Preview - Building
Occasionally Connected Systems
with SQL Server Everywhere
Server 2005: Replication,
Gopal Ashok and Vijay Sistla, 9:45-11:00
AM, Room 157 ABC
 Smart
Client: Offline Data
Synchronization and Caching
with SQL Server Everywhere
Steve Lasker, 4:30-5:45 PM, Room 109
AB
Friday
 SQL
Server Everywhere Edition:
A new light weight database
from Microsoft Durga Gudipati, 9:0010:15 AM, DAT booth
Steve Lasker and Durga Gudipati, 10:0011:00 AM, Room 158
Hands On Lab (All Days): Developing a SQL Mobile
Application with Visual Studio 2005 and SQL Server 2005
(SQL Server Mobile is the precursor to SQL Server Everywhere)
Fill out a session
evaluation on
CommNet and
Win an XBOX 360!
© 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not
be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.
MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.