St. Ambrose CSCI 275 - Windows Database Applications

Unformatted text preview:

Chapter 3 Windows Database ApplicationsUniversal Data Access (UDA)OLEDBADO.NETSlide 5ADO.NET ComponentsSlide 7A Sample DataTableDataTable CharacteristicsThe DataSet Object ModelData Provider ObjectsUse the DataSet object.NET Data Provider ObjectsXML DataXML Schema File .XSDXML Data Format AdvantagesMicrosoft Database FilesObtaining DataSlide 19Display the DataSet in the DataGridShow and Tell timePopulating Combo Boxes with DataSorting Data for the ListBoxCreating a Parameterized QueryUsing the Query BuilderBinding Individual Controls to Data FieldsAdding an Expression to the DataSet SchemaUsing the ValueMember Property of Combo BoxesMultiple Tier ProjectsBinding to Combo BoxesDataBindings for Multiple TiersPowerPoint PresentationChapter 3Windows DatabaseApplicationsAdvanced Programming Using Visual Basic.NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.© 2003 by The McGraw-Hill Companies, Inc. All rights reserved.3- 2Universal Data Access (UDA)•Microsoft’s strategy for accessing data for multiple providers•Goal is to access any type of data from any application on any type of computer–Databases–Text Files–Spreadsheets–EtcVisual Basic and Database ApplicationsVisual Basic and Database Applications© 2003 by The McGraw-Hill Companies, Inc. All rights reserved.3- 3OLEDB•Technology designed to implement the UDA concept•Library routines provide low-level data access•Standardized interface that allows reference to data from any source –Using the same programming toolsVisual Basic and Database ApplicationsVisual Basic and Database Applications© 2003 by The McGraw-Hill Companies, Inc. All rights reserved.3- 4ADO.NET•Microsoft’s latest database object model•Allows VB programmers to use a standard set of objects to refer to data from any source•.NET approach uses disconnected datasets with common data representation (data types) from multiple sourcesVisual Basic and Database ApplicationsVisual Basic and Database ApplicationsActiveX Data Objects  ADOActiveX Data Objects  ADO© 2003 by The McGraw-Hill Companies, Inc. All rights reserved.3- 5ADO.NET•.NET framework is integrated with XML (Extensible Markup Language)•Multitier applications that use disconnected datasets provide for –Flexibility  adapt to changes in data or presentation tier–Scalability  handle increases in the number of users and serversVisual Basic and Database ApplicationsVisual Basic and Database ApplicationsXML is an industry standard format for storing andtransferring data over multiple platforms.XML is an industry standard format for storing andtransferring data over multiple platforms.© 2003 by The McGraw-Hill Companies, Inc. All rights reserved.3- 6ADO.NET Components•Data Providers – manipulate the data using SQL statements or stored procedures–SQLClient  for SQL Server–OleDbClient  for all other database formats–OracleClient  for Oracle DB Server–An ODBC provider is also available for•ISAM•Outlook etc.Visual Basic and Database ApplicationsVisual Basic and Database Applications© 2003 by The McGraw-Hill Companies, Inc. All rights reserved.3- 7ADO.NET Components•DataSet Objects  holds a copy of the data in memory•Dataset objects can be populated with data from many sources•Regardless of the data source, code handles DataSet objects the same•Dataset objects hold one or more DataTable objectsVisual Basic and Database ApplicationsVisual Basic and Database Applications© 2003 by The McGraw-Hill Companies, Inc. All rights reserved.3- 8A Sample DataTable•Each row represents a record of data for one entity•Each column represents a different element of data  field Visual Basic and Database ApplicationsVisual Basic and Database Applications© 2003 by The McGraw-Hill Companies, Inc. All rights reserved.3- 9DataTable Characteristics•A primary key field (or combination of fields) uniquely identifies each record•A relational database contains multiple tables•Relationships between tables are established using a foreign keyVisual Basic and Database ApplicationsVisual Basic and Database Applications© 2003 by The McGraw-Hill Companies, Inc. All rights reserved.3- 10The DataSet Object Model•DataRow Maintains–Original Value–Any changes values•DataRelation Info–Primary Keys–Foreign Keys–Enforces referential integrityVisual Basic and Database ApplicationsVisual Basic and Database ApplicationsDataSetDataTable CollectionDataTableDataRowCollectionDataColumnCollectionParentRelationsChildRelationsConstraintCollectionDataViewDataRelationCollection© 2003 by The McGraw-Hill Companies, Inc. All rights reserved.3- 11Data Provider Objects •A set of each for MS-SQL and OLEDB•Connection object – link to a data source•DataAdapter object – handles retrieving and updating data in a DataSet object•Command object – stores and executes SQL statements•DataReader object – for forward read-only access bypasses DatasetA .NET data provider is a set of components designed for fast access and manipulation of data.A .NET data provider is a set of components designed for fast access and manipulation of data.© 2003 by The McGraw-Hill Companies, Inc. All rights reserved.3- 12Use the DataSet object•A virtual database / table(s)•To transfer data between tiers•To manipulate the data without an open connection•To relate data from multiple sources•To bind data to a Windows formVisual Basic and Database ApplicationsVisual Basic and Database Applications© 2003 by The McGraw-Hill Companies, Inc. All rights reserved.3- 13.NET Data Provider ObjectsVisual Basic and Database ApplicationsVisual Basic and Database ApplicationsSelectCommandInsertCommandUpdateCommandDeleteCommandConnection.NET Data ProviderCommandData AdapterDataReader© 2003 by The McGraw-Hill Companies, Inc. All rights reserved.3- 14XML Data•XML is generated automatically•Data stored in XML is all text, identified by tags•XML files can be edited by any text editor•Tags identify fields by nameVisual Basic and Database ApplicationsVisual Basic and Database ApplicationsXML is an industry standard format for storing andtransferring data.XML is an industry standard format for storing andtransferring data.<au_id>172-32-1176</au_id>© 2003 by The McGraw-Hill Companies, Inc. All rights reserved.3- 15XML Schema File .XSD•Describes the fields, data types, and constraints for the tables contained in the dataset•View dataset schema in the


View Full Document

St. Ambrose CSCI 275 - Windows Database Applications

Download Windows Database Applications
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Windows Database Applications and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Windows Database Applications 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?