CHAPTER EIGHT Accessing Data Processing Databases.

Slides:



Advertisements
Similar presentations
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Advertisements

Database Management Using Microsoft Access Xinhua Chen, Ph.D. Chinese Association of Professionals in Science and Technology March 23, 2003.
Data Base. Objective Become familiar with database terminology. Create a project to display data for a single database table. Use a DataGrid control.
Chapter 10 Database Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
Introduction to Databases
Chapter 18 - Data sources and datasets 1 Outline How to create a data source How to use a data source How to use Query Builder to build a simple query.
Chapter 12: Using ADO.NET 2.0 Programming with Microsoft Visual Basic 2005, Third Edition.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Chapter 3 Database Management
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
Using ADO.NET Chapter Microsoft Visual Basic.NET: Reloaded 1.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
3-1 Chapter 3 Data and Knowledge Management
ASP.NET Database Connectivity I. 2 © UW Business School, University of Washington 2004 Outline Database Concepts SQL ASP.NET Database Connectivity.
VB.NET Database Access ISYS 812. Microsoft Universal Data Access ODBC: Open Database Connectivity –A driver manager –Used for relational databases OLE.
1 Pertemuan 09 Database Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
Introduction to ADO.Net, VB.Net Database Tools and Data Binding ISYS 512.
Information Technology in Organizations
Chapter 12 Database Connectivity with ASP.NET JavaScript, Third Edition.
Mgt 20600: IT Management & Applications Databases Tuesday April 4, 2006.
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
PHASE 3: SYSTEMS DESIGN Chapter 7 Data Design.
Some Basic Database Terminology
Chapter 5 Database Processing.
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2007 (Week 3, Tuesday 9/4/2007)
ASP.NET Programming with C# and SQL Server First Edition
Introduction to ADO.Net and Visual Studio Database Tools ISYS 512.
10-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 30 – Bookstore Application: Client Tier Examining.
CHAPTER EIGHT Accessing Data Processing Databases.
Introduction to Database Development Using Borland Data Providers 2128 Martin Rudy.
 2006 Pearson Education, Inc. All rights reserved Database, SQL and ADO.NET.
Objectives In this lesson, you will learn to: *Identify the need for ADO.NET *Identify the features of ADO.NET *Identify the components of the ADO.NET.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
C-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module.
6.1 © 2010 by Prentice Hall 6 Chapter Foundations of Business Intelligence: Databases and Information Management.
1 Chapter 20 – Data sources and datasets Outline How to create a data source How to use a data source How to use Query Builder to build a simple query.
Mauricio Featherman, Ph.D. Washington St. University
Introduction to ADO.Net and VS Database Tools and Data Binding ISYS 350.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 25.1 Test-Driving the ATM Application 25.2.
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
Databases and ADO.NET Programming Right from the Start with Visual Basic.NET 1/e 11.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 25 I’m Suffering from Information Overload.
Database Connectivity with ASP.NET. 2 Introduction Web pages commonly used to: –Gather information stored on a Web server database Most server-side scripting.
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
6.1 © 2007 by Prentice Hall Chapter 6 (Laudon & Laudon) Foundations of Business Intelligence: Databases and Information Management.
Introduction to ADO.Net and Visual Studio Database Tools ISYS 350.
CSCI 3327 Visual Basic Chapter 13: Databases and LINQ UTPA – Fall 2011.
CHAPTER NINE Accessing Data Using XML. McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Introduction The eXtensible.
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 2 Objectives: Understanding and Creating Table.
Data Resource Management Data Concepts Database Management Types of Databases Chapter 5 McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies,
1 SQL SERVER 2005 Express CE-105 SPRING 2007 Engr. Faisal ur Rehman.
Databases and Information Management
Brief description on how to navigate within this presentation (ppt)
CIS16 Application Programming with Visual Basic
Databases and Information Management
Chapter 10 ADO.
Database Applications
Chapter 10 Accessing Database Files
Databases and Information Management
Introduction to ADO.Net and Visual Studio Database Tools.
Presentation transcript:

CHAPTER EIGHT Accessing Data Processing Databases

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Introduction Data is efficiently managed by storing them in files on disk. Data files and programs are separate. The program does not need to be modified when the data changes. Different programs can share the same data sets.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Introduction (cont.) Most businesses organize their data into databases. A database is an organizes collection of data. A database management system (DBMS) is a program that is used to create and maintain databases. Visual Basic.NET provides tools for developers to access databases from their programs.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Objectives Understand and use relational databases. Understand a subset of the ADO.NET object model. Apply the ADO.NET object model within Visual Basic.NET to access databases. Use the properties and methods of the DataGrid control to display record from a DataSet.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Objectives (cont.) Write SQL Select queries to extract data from a database. Bind controls such as TextBoxes and Labels to a DataSet. Create Master/Detail DataSets. Use several tools within Visual Basic.NET to manage and use databases.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved A Relational Database Primer Entities and Relationships –Every database contains: Entities – anything of interest to a business. Relationships – real-world associations between entities. –Database developers often use an entity- relationship diagram (ERD). To document a database’s structure. Symbols are used to designate relationships between entities.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved A Relational Database Primer (cont.) Relational Database Tables –A relational database stores the data for each entity in a table with rows and columns. –Compatible with Visual Basic.NET. –A key field guarantees the uniqueness of records. –A combination key is a key field with a combination of two or more fields.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved A Relational Database Primer (cont.) –One-to-Many Relationships Established by placing the key field of the “one” entity’s table into the “many” entity’s table as a foreign key. –Many-to-Many Relationships Constructed by creating a new table with the key fields from related tables.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved A Relational Database Primer (cont.) –Normalized Databases Normalization is a process used to eliminate or reduce data redundancy. Designers must determine which tables to place information in. A table should be in third normal form.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved A Relational Database Primer (cont.) Database Queries –Most relational database systems use a query language called structured query language (SQL). To specify how to combine data in related tables. To specify how to select only the desired data.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved An Introduction to ADO.NET Visual Basic.NET uses ADO.NET to manage data in a database. –ADO.NET (ActiveX Data Objects) uses an extensive set of classes to manage data. –This chapter covers the foundations of ADO.NET. –Also we will cover some of the wizards and tools provided to work with relational databases.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved An Introduction to ADO.NET (cont.) An Overview of ADO.NET –A DataProvider object directly interacts with a database and its DBMS. –A Connection object makes the physical connection to the database. –A DataSet class holds the actual data. –User interface components work directly with the DataSet.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Using ADO.NET with Visual Basic.NET Data Access Using the DataGrid Control –Provides a method of displaying records from a database in a grid-like manner. –Building the DataAdapter Create a DataAdapter by a wizard. –Building the DataSet Follow the procedure to create a DataSet.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Using ADO.NET with Visual Basic.NET (cont.) –Adding the DataGrid Follow the procedure to add a DataGrid to the form. Set the DataGrid properties to connect it to the DataAdapter and DataSet. Found on the Windows Form tab in the Toolbox. Will display fields specified in the SQL Select statement.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Using ADO.NET with Visual Basic.NET (cont.) The DataGrid Control –Designed to display the data stored in a DataSet. –An expander allows navigation from a parent table to a child table.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Using ADO.NET with Visual Basic.NET (cont.) –Properties AllowSortingCurrentCell AlternatingBackColorCurrentRowIndex BackColorDataMember BackgroundColorDataSource BorderStyleEnabled CaptionBackColorFirstVisibleColumn CaptionFontForeColor CaptionForeColorGridLineColor CaptionTextGridLineStyle CaptionVisibleHeaderBackColor ColumnHeadersVisibleHeaderFont

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Using ADO.NET with Visual Basic.NET (cont.) –Properties (cont.) HeaderForeColor ParentRowsBackColor ParentRowsForeColor ParentRowsVisible PreferredColumnWidth ReadOnly RowHeadersVisible RowHeaderWidth SelectionBackColor SelectionForeColor

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Using ADO.NET with Visual Basic.NET (cont.) –Methods Collapse(row) Expand(row) IsExpanded(row) IsSelected(row) Select(row) SetDataBinding(dataSourceObject, dataMemberString) UnSelect(row)

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Using ADO.NET with Visual Basic.NET (cont.) Updating a Table –ADO.NET provides support for table update. –Changes in the DataGrid can be relayed back to the original source data.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Using ADO.NET with Visual Basic.NET (cont.) Parameterized Queries –Users will often want to specify information that will determine the results of a query. –A parameter of a query could be a zipcode.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Using ADO.NET with Visual Basic.NET (cont.) Master/Detail Record Display –Here we examine a DataSet that includes two tables related to a common field. –A master/detail DataSet is a dataset with more than one table. –Each master record is related to zero or more records from the second table. –Parent and child terms may refer to master and detail records.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Additional Visual Basic.NET Database Tools We look at using the Server to work with databases. We show how to add a data connection to the server. The data connection will be used to create a data adapter and data set.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Chapter Summary A database is an organized collection of data and relationships that describe entities of interest to a business. An entity-relationship diagram (ERD) documents entities and their relationships. Visual Basic.NET supports the relational database approach for organizing data. Normalization is process used to minimize data redundancy.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Chapter Summary (cont.) Visual Basic.NET uses ADO.NET to access and manage databases. The DataGrid control is a control that can be bound to a specific dataset. Parameterized queries provide for the ability to determine how records will be selected at run time. Many of Visual Basic.NET’s controls can be bound to a dataset and its fields.

McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Chapter Summary (cont.) ADO.NET supports master/detail record relationships. The Server Explorer provides access and management tools for connections and servers.