SlideShare a Scribd company logo
Chapter-5 Outline
♣Overview of ActiveX Data Objects
♣C# Data Access Features
♣Relational Database Concepts
♣Using ADO Data Control to Access Data
♣Structured Query Language (SQL)
♣Manipulating Data
♣Using the Data Form Wizard
Databases
 store information in records, fields, and tables
 Database management system (DBMS): computer programs used
to manage and query databases
 Example DBMSs include SQL server, Oracle, and Access
 Many DBMSs store data in tabular format
Data in tables are related through common data field keys
 Uses a query language to program database access
Structured query language (SQL)
 ActiveX Data Objects (ADO.NET): .NET data access technology
for accessing data in databases
Database Connectivity
 Database connection is a facility that allows client software to communicate
with database server software, whether on the same machine or not.
 Connection is required to send commands and receive answers.
 Database driver is a piece of software for accessing a database.
 There are various DB and language specific database drivers.
 For C# there are alternative ways to connect to a database(different data
access technologies):
ODBC (Open DB Connectivity) – older open standard, works with C, C++,
C#, and Visual Basic languages
ADO.NET - .NET data access technology, sit on the top of ODBC
JDBC (Java Database Connectivity) works with Java
ADO .NET
 ADO- Stands for ActiveX Data Object.NET
 It is a data access technology that is primarily disconnected manner and
designed to provide efficient and scalable data access
Database table(s) can be retrieved to a temporary file
 Used for DB connections and offers to perform DB manipulations like
insertion, deletion, updating, retrieving etc.
 Includes number of classes that can be used to retrieve, manipulate, and
update data in databases
 Implements a disconnected data access model
In this model data connections are established and left open only long
enough to perform the requested action.
Example: if an application requests data from a db, the connection opens
just long enough to load the data into the application and then it closes.
Cont.….
 To retrieve data, first you must connect to the DB
 It uses data providers to connect, execute commands, and retrieve
results from a database
 ADO.NET provides an architecture for communicating between
an application & data source.
 “data source” can be anything that has the required API, but
usually it is a DB server
Data
Source
Connection
Object
(ADO.Net)
Data Adaptor Dataset
(Local)
Application
Architecture:
Data Providers
 Classes are encapsulated into a different namespace by provider
 Four core classes make up each data provider namespace
 Connection
 Command
 DataReader
 DataAdapter
Data Providers
ADO .NET Namespace
Namespaces Description
System.Data
Contains the definition for columns, relations, tables,
database, rows, views and constraints.
System.Data.Sql
Client
Contains the classes that used to connect to a Microsoft
SQL Server database such as SqlCommand, SqlConnection,
SqlDataAdapter.
System.Data.Odb
c
Contains classes required to connect to most ODBC
drivers. These classes include
OdbcCommand,OdbcConnection.
System.Data.Or
acleClient
Contains classes such as
OracleConnection,OracleCommand required to connect to
an Oracle database.
ADO .NET DatabaseTransactions
A. Query Processing
Retrieves the data from the backend database with a select statement into
frontend application
Query (select) statement will be written in the frontend application and it will
be sent to the backend database
That statement will be executed at backend
Result will be returned to frontend application
B. Non-Query Processing
Doesn’t retrieves any data from database
The process of modifying the table’s data
Eg. Insertion, Deletion, Updation, Creating a table, Dropping a table, Altering a table
C. Stored Procedure/ Function Handling
Executes a stored procedure/ a stored function, that is already created at
backend
Connecting with database
Advanced Query Processing
Query processing is of two types:
1. Standard Query Processing
Implemented with DataReader buffer
2. Advanced Query Processing
Implemented with DataSet, DataTable, DataRow buffers
 DataAdapter: sends SQL statement and executes it at backend
 DataSet: holds data that is received from database, after execution
- can hold multiple/array of table’s data at-a-time
DataTable: holds a single table, from the DataSet
DataRow: holds a single row, from the DataTable
ADO.NET Data Architecture
Data access in ADO.NET relies on two entities.
Cont.….
1. Data Set
oStores data from the database on the local machine
oRepresents a subset of the database
oIt is disconnected, in memory representation of data
- to update the database a reconnection is required
oData can be loaded to a data set from any valid data source such
as SQL Server db, MS-Access db, My SQL db or xml
oDataset object contains: DataTable objects and DataRelation objects
- DataTable is defined by data Columns, data Rows and Constraints,
- DataRelations: allows you to create associations between
rows in one table and rows in another table.
Cont.….
Cont.….
Cont.….
Cont.….
Properties Description
CaseSensitive Indicates whether string comparisons within the
data tables are case-sensitive.
Container Gets the container for the component.
DataSetName Gets or sets the name of the current data set.
DefaultViewManager Returns a view of data in the data set.
DesignMode Indicates whether the component is currently in
design mode.
EnforceConstraints Indicates whether constraint rules are followed
when attempting any update operation.
Events Gets the list of event handlers that are attached to
this component.
Cont.….
Properties Description
ExtendedProperties Gets the collection of customized user information
associated with the DataSet.
HasErrors Indicates if there are any errors.
IsInitialized Indicates whether the DataSet is initialized.
Locale Gets or sets the locale information used to compare
strings within the table.
Namespace Gets or sets the namespace of the DataSet.
Prefix Gets or sets an XML prefix that aliases the
namespace of the DataSet.
Relations Returns the collection of DataRelation objects.
Tables Returns the collection of DataTable objects.
Questions,
Ambiguities

More Related Content

Similar to Chapter 4 event it theory programming.pptx (20)

PDF
Ado.Net Architecture
Umar Farooq
 
PPTX
111111112222223333335555555666Unit-4.pptx
sachaniajay26
 
DOC
Ado
actacademy
 
PPT
Introduction to ado.net
Paneliya Prince
 
PPT
Ado.net & data persistence frameworks
Luis Goldster
 
PPTX
ADO.NET by ASP.NET Development Company in india
iFour Institute - Sustainable Learning
 
PPS
Ado.net session05
Niit Care
 
PDF
WEB PROGRAMMING USING ASP.NET
DhruvVekariya3
 
PPTX
Chapter 3: ado.net
Ngeam Soly
 
PPTX
Ado .net
Manish Singh
 
PPTX
6 database
siragezeynu
 
DOCX
Ado dot net complete meterial (1)
Mubarak Hussain
 
PPTX
Day4
madamewoolf
 
PPTX
Ch 7 data binding
Madhuri Kavade
 
PPT
ado.net
ZAIYAUL HAQUE
 
PPT
Introduction to ADO.NET
rchakra
 
PDF
Unit4
Abha Damani
 
PPT
the .NET Framework. It provides the claf
TesfahunMaru1
 
PPTX
Is2215 lecture7 lecturer_ado_intro
dannygriff1
 
PPT
Chap14 ado.net
mentorrbuddy
 
Ado.Net Architecture
Umar Farooq
 
111111112222223333335555555666Unit-4.pptx
sachaniajay26
 
Introduction to ado.net
Paneliya Prince
 
Ado.net & data persistence frameworks
Luis Goldster
 
ADO.NET by ASP.NET Development Company in india
iFour Institute - Sustainable Learning
 
Ado.net session05
Niit Care
 
WEB PROGRAMMING USING ASP.NET
DhruvVekariya3
 
Chapter 3: ado.net
Ngeam Soly
 
Ado .net
Manish Singh
 
6 database
siragezeynu
 
Ado dot net complete meterial (1)
Mubarak Hussain
 
Ch 7 data binding
Madhuri Kavade
 
ado.net
ZAIYAUL HAQUE
 
Introduction to ADO.NET
rchakra
 
the .NET Framework. It provides the claf
TesfahunMaru1
 
Is2215 lecture7 lecturer_ado_intro
dannygriff1
 
Chap14 ado.net
mentorrbuddy
 

Recently uploaded (20)

PDF
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
PPTX
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
PPTX
Artificial Intelligence in Gastroentrology: Advancements and Future Presprec...
AyanHossain
 
PPTX
Virus sequence retrieval from NCBI database
yamunaK13
 
PPTX
LDP-2 UNIT 4 Presentation for practical.pptx
abhaypanchal2525
 
PPTX
Cybersecurity: How to Protect your Digital World from Hackers
vaidikpanda4
 
PPTX
Unlock the Power of Cursor AI: MuleSoft Integrations
Veera Pallapu
 
PDF
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
PPTX
I INCLUDED THIS TOPIC IS INTELLIGENCE DEFINITION, MEANING, INDIVIDUAL DIFFERE...
parmarjuli1412
 
PPT
DRUGS USED IN THERAPY OF SHOCK, Shock Therapy, Treatment or management of shock
Rajshri Ghogare
 
PPTX
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
PPTX
Electrophysiology_of_Heart. Electrophysiology studies in Cardiovascular syste...
Rajshri Ghogare
 
PPTX
The Future of Artificial Intelligence Opportunities and Risks Ahead
vaghelajayendra784
 
PPTX
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
PPTX
Digital Professionalism and Interpersonal Competence
rutvikgediya1
 
PPTX
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
PPTX
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
DOCX
pgdei-UNIT -V Neurological Disorders & developmental disabilities
JELLA VISHNU DURGA PRASAD
 
PPTX
Basics and rules of probability with real-life uses
ravatkaran694
 
PPTX
Introduction to Probability(basic) .pptx
purohitanuj034
 
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
Artificial Intelligence in Gastroentrology: Advancements and Future Presprec...
AyanHossain
 
Virus sequence retrieval from NCBI database
yamunaK13
 
LDP-2 UNIT 4 Presentation for practical.pptx
abhaypanchal2525
 
Cybersecurity: How to Protect your Digital World from Hackers
vaidikpanda4
 
Unlock the Power of Cursor AI: MuleSoft Integrations
Veera Pallapu
 
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
I INCLUDED THIS TOPIC IS INTELLIGENCE DEFINITION, MEANING, INDIVIDUAL DIFFERE...
parmarjuli1412
 
DRUGS USED IN THERAPY OF SHOCK, Shock Therapy, Treatment or management of shock
Rajshri Ghogare
 
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
Electrophysiology_of_Heart. Electrophysiology studies in Cardiovascular syste...
Rajshri Ghogare
 
The Future of Artificial Intelligence Opportunities and Risks Ahead
vaghelajayendra784
 
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
Digital Professionalism and Interpersonal Competence
rutvikgediya1
 
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
pgdei-UNIT -V Neurological Disorders & developmental disabilities
JELLA VISHNU DURGA PRASAD
 
Basics and rules of probability with real-life uses
ravatkaran694
 
Introduction to Probability(basic) .pptx
purohitanuj034
 
Ad

Chapter 4 event it theory programming.pptx

  • 1. Chapter-5 Outline ♣Overview of ActiveX Data Objects ♣C# Data Access Features ♣Relational Database Concepts ♣Using ADO Data Control to Access Data ♣Structured Query Language (SQL) ♣Manipulating Data ♣Using the Data Form Wizard
  • 2. Databases  store information in records, fields, and tables  Database management system (DBMS): computer programs used to manage and query databases  Example DBMSs include SQL server, Oracle, and Access  Many DBMSs store data in tabular format Data in tables are related through common data field keys  Uses a query language to program database access Structured query language (SQL)  ActiveX Data Objects (ADO.NET): .NET data access technology for accessing data in databases
  • 3. Database Connectivity  Database connection is a facility that allows client software to communicate with database server software, whether on the same machine or not.  Connection is required to send commands and receive answers.  Database driver is a piece of software for accessing a database.  There are various DB and language specific database drivers.  For C# there are alternative ways to connect to a database(different data access technologies): ODBC (Open DB Connectivity) – older open standard, works with C, C++, C#, and Visual Basic languages ADO.NET - .NET data access technology, sit on the top of ODBC JDBC (Java Database Connectivity) works with Java
  • 4. ADO .NET  ADO- Stands for ActiveX Data Object.NET  It is a data access technology that is primarily disconnected manner and designed to provide efficient and scalable data access Database table(s) can be retrieved to a temporary file  Used for DB connections and offers to perform DB manipulations like insertion, deletion, updating, retrieving etc.  Includes number of classes that can be used to retrieve, manipulate, and update data in databases  Implements a disconnected data access model In this model data connections are established and left open only long enough to perform the requested action. Example: if an application requests data from a db, the connection opens just long enough to load the data into the application and then it closes.
  • 5. Cont.….  To retrieve data, first you must connect to the DB  It uses data providers to connect, execute commands, and retrieve results from a database  ADO.NET provides an architecture for communicating between an application & data source.  “data source” can be anything that has the required API, but usually it is a DB server Data Source Connection Object (ADO.Net) Data Adaptor Dataset (Local) Application Architecture:
  • 6. Data Providers  Classes are encapsulated into a different namespace by provider  Four core classes make up each data provider namespace  Connection  Command  DataReader  DataAdapter
  • 8. ADO .NET Namespace Namespaces Description System.Data Contains the definition for columns, relations, tables, database, rows, views and constraints. System.Data.Sql Client Contains the classes that used to connect to a Microsoft SQL Server database such as SqlCommand, SqlConnection, SqlDataAdapter. System.Data.Odb c Contains classes required to connect to most ODBC drivers. These classes include OdbcCommand,OdbcConnection. System.Data.Or acleClient Contains classes such as OracleConnection,OracleCommand required to connect to an Oracle database.
  • 9. ADO .NET DatabaseTransactions A. Query Processing Retrieves the data from the backend database with a select statement into frontend application Query (select) statement will be written in the frontend application and it will be sent to the backend database That statement will be executed at backend Result will be returned to frontend application B. Non-Query Processing Doesn’t retrieves any data from database The process of modifying the table’s data Eg. Insertion, Deletion, Updation, Creating a table, Dropping a table, Altering a table C. Stored Procedure/ Function Handling Executes a stored procedure/ a stored function, that is already created at backend Connecting with database
  • 10. Advanced Query Processing Query processing is of two types: 1. Standard Query Processing Implemented with DataReader buffer 2. Advanced Query Processing Implemented with DataSet, DataTable, DataRow buffers  DataAdapter: sends SQL statement and executes it at backend  DataSet: holds data that is received from database, after execution - can hold multiple/array of table’s data at-a-time DataTable: holds a single table, from the DataSet DataRow: holds a single row, from the DataTable
  • 11. ADO.NET Data Architecture Data access in ADO.NET relies on two entities.
  • 12. Cont.…. 1. Data Set oStores data from the database on the local machine oRepresents a subset of the database oIt is disconnected, in memory representation of data - to update the database a reconnection is required oData can be loaded to a data set from any valid data source such as SQL Server db, MS-Access db, My SQL db or xml oDataset object contains: DataTable objects and DataRelation objects - DataTable is defined by data Columns, data Rows and Constraints, - DataRelations: allows you to create associations between rows in one table and rows in another table.
  • 16. Cont.…. Properties Description CaseSensitive Indicates whether string comparisons within the data tables are case-sensitive. Container Gets the container for the component. DataSetName Gets or sets the name of the current data set. DefaultViewManager Returns a view of data in the data set. DesignMode Indicates whether the component is currently in design mode. EnforceConstraints Indicates whether constraint rules are followed when attempting any update operation. Events Gets the list of event handlers that are attached to this component.
  • 17. Cont.…. Properties Description ExtendedProperties Gets the collection of customized user information associated with the DataSet. HasErrors Indicates if there are any errors. IsInitialized Indicates whether the DataSet is initialized. Locale Gets or sets the locale information used to compare strings within the table. Namespace Gets or sets the namespace of the DataSet. Prefix Gets or sets an XML prefix that aliases the namespace of the DataSet. Relations Returns the collection of DataRelation objects. Tables Returns the collection of DataTable objects.