Presentation is loading. Please wait.

Presentation is loading. Please wait.

Overview of Data Access MacDonald Ch. 15 MIS 324 Professor Sandvig.

Similar presentations


Presentation on theme: "Overview of Data Access MacDonald Ch. 15 MIS 324 Professor Sandvig."— Presentation transcript:

1 Overview of Data Access MacDonald Ch. 15 MIS 324 Professor Sandvig

2 Overview ADO.NET overview Datasets & Datatables Data Access Displaying data  Web Controls

3 ADO.NET Overview “Any web application worth writing involves data access.” Stephen Walther ADO  ActiveX Data Objects  Microsoft’s data access technologies  Set of classes that provide data access services  Class Library System.DataSystem.Data

4 ADO.NET Overview Data sources include:  relational databases  XML files  Web Services  Text files, etc… Goal  loose coupling between data source and application minimize dependencies

5 DataSet & DataTable Dataset is object for holding data Central feature of ADO.NET  Provides tools for working with data DataSet is a collection of DataTables  Relationships between tables Data Sources: Relational database XML file Web Service Text file etc… Dataset (data tables) Web Controls: List controls Tabular controls Navigation controls

6 DataSet & DataTable Provides many capabilities of relational database  Relationships  Keys  Referential integrity  Dataviews: sort and filtering  Change history Data stored as XML  Behind the scenes

7 .NET Data options 1. Programmatically  Use connection & command objects Pass SQL to database  Very flexible approach  Similar to PHP 2. Data Source Controls  Drag & drop in Visual Studio  Declarative approach  Easy but inflexible  Added in.NET 2.0 3. Entity Framework  Creates objects representing database structure  Query with SQL or Entity SQL  Added to.NET 3.5

8 Retrieving Data MIS 324  Will use programmatic approach  Benefits Flexible Uses standard OOP programming techniques MIS 424  Data Source Controls  Entity Framework

9 Displaying Data Steps: 1. Retrieve data from datasource 2. Fill DataTable 3. “Bind” to web control a. List controls (1 column) b. Tabular controls (>1 column) c. Single record controls

10 B. Displaying Data Bind datatable to web control Web Controls  List Controls  Tabular Controls  Single record controls Example: source, outputsourceoutput

11 Summary ADO.NET 1. Classes that handle data access 2. Provides consistent programming interface to data sources Dataset  Memory resident data container  Bind to Web Controls Web Controls  Write HTML & data to client Next: SQL Server Express  Creating databases & using with ASP.NET


Download ppt "Overview of Data Access MacDonald Ch. 15 MIS 324 Professor Sandvig."

Similar presentations


Ads by Google