עבודה עם נתונים באמצעות ADO.NET

Slides:



Advertisements
Similar presentations
17. Data Access ADO.Net Architecture New Features of ADO.NET
Advertisements

ADO.Net Modelo para acesso a dados nas aplicação.Net Componentes: DataSet.Net Data providers: Connection Command DataReader DataAdapter.
ADO.NET: Working in Disconnected Environment Sergey Baidachni MCT, MCSD, MCDBA.
ActiveX Data Objects (ADO) מרצה : דורון אמיר MCSD Doron Amir
אקסס מבוא למערכות מידע.
Chapter 10 ADO. What is ADO? ADO is a Microsoft technology ADO stands for ActiveX Data Objects ADO is a programming interface to access data in a database.
Introduction to Database Processing with ADO.NET.
תוכנית דעת, שנה"ל תשס"ז, מרצה יהודה הופמן מערכות מידע ארגוניות מערכות מידע ארגוניות הרצאה מס' 10: מסדי נתונים.
VB.NET Database Access ISYS546. Microsoft Universal Data Access ODBC: Open Database Connectivity –A driver manager –Used for relational databases OLE.
1 Formal Specifications for Complex Systems (236368) Tutorial #5 Refinement in Z: data refinement; operations refinement; their combinations.
1 ADO.NET. 2.NET Framework Data Namespaces System.Data –Base set of classes and interfaces for ADO.NET System.Data.Common –Classes shared by the.NET Data.
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.
Chapter 8 Binding Data to Web Controls. ASP.NET 2.0, Third Edition2.
Chapter 9 Using the SqlDataSource Control. References aspx.
Programming with Visual Basic.NET An Object-Oriented Approach  Chapter 8 Introduction to Database Processing.
ADO.NET A2 Teacher Up skilling LECTURE 3. What’s to come today? ADO.NET What is ADO.NET? ADO.NET Objects SqlConnection SqlCommand SqlDataReader DataSet.
A Simple Introduction. What is ADO.net? First the word ADO stands for ActiveX Data Objects And it is an integral part of.Net Framework of Microsoft hence.
Needs for Accessing Database To make your web site more dynamic and maintainable, you can display information on your web pages that are retrieved from.
Databases and Data Access  Introduction to ADO.NET  ADO.NET objects  ADP.NET namespaces  Differences between ADO and ADO.NET.
.NET Data Access and Manipulation ADO.NET. Overview What is ADO.NET? Disconnected vs. connected data access models ADO.NET Architecture ADO.NET Core Objects.
1 Introduction to ADO.NET Microsoft ADO.NET 2.0 Step by Step Rebecca M Riordan Microsoft Press, 2006.
Chapter 3 Introduction to ADO.NET 3.1 The ADO and ADO.NET ActiveX Data Object (ADO) is developed based on Object Linking and Embedding (OLE) and Component.
Moving from Microsoft ® ADO 2.X To ADO.NET Jackie Goldstein Renaissance Computer Systems Ltd. MSDN Regional Director, Israel Prerequisites.
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.
ASP.NET Rina Zviel-Girshin Lecture 5
Module 9: Accessing Relational Data Using Microsoft Visual Studio.NET.
Session 8: ADO.NET. Overview Overview of ADO.NET What is ADO.NET? Using Namespaces The ADO.NET Object Model What is a DataSet? Accessing Data with ADO.NET.
Module 7: Accessing Data by Using ADO.NET
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Introduction to ADO.NET ADO.NET - Lesson 01  Training time: 10 minutes  Author:
Presented by Joseph J. Sarna Jr. JJS Systems, LLC
An Introduction to ADO.Net Marmagna Desai.NET Seminar, Fall-2003.
Mauricio Featherman, Ph.D. Washington St. University
DEV383 The ADO.NET DataSet and You Jackie Goldstein General Manager Renaissance Computer Systems
Module 3: Working with Local Data. Overview Using DataSets Using XML Using SQL Server CE.
HNDIT Rapid Application Development
ADO.NET FUNDAMENTALS BEGINNING ASP.NET 3.5 IN C#.
Module 4 Introduction ADO.NET.
Active Data Objects Using.Net ADO.Net Farooq Ahmed Amna Umber Summayya Shehzad.
Module 2: Using ADO.NET to Access Data. Overview ADO.NET Architecture Creating an Application That Uses ADO.NET to Access Data Changing Database Records.
Querying Information in a Database. CONTENTS Relational Database Systems Creating Database with SQL Server Reading Data with LINQ Requirements to Get.
Data Access. ADO.NET ADO.NET is the primary library for building database solutions within the.NET Framework. ADO.NET does not replace ADO. ADO and OLEDB.
ADO .NET from. ADO .NET from “ADO .Net” Evolution/History of ADO.NET MICROSOFT .NET “ADO .Net” Evolution/History of ADO.NET History: Most applications.
.NET Data Access and Manipulation
C# 1 CSC 298 ADO.NET. C# 2 ADO.NET  A data access technology that maps very well to the world of the web (disconnected architecture)  data is retrieved.
DAT 390 Advanced ADO.NET Programming Techniques Jackie Goldstein Renaissance Computer Systems
Data Access with ADO.NET
Introduction to Database Processing with ADO.NET
Introduction to Database Processing with ADO.NET
ADO.NET Framework.
Structured Query Language
Lecture 6 VB.Net SQL Server.
Active Data Objects Binding ASP.NET Controls to Data
ADO.NET Accessing Databases in VS.NET
XML מבוא כללי MCSD Doron Amir
VB.NET Using Database.
XML מבוא כללי פרק ג' MCSD Doron Amir
Tonga Institute of Higher Education
מתחברים למסד נתונים היכרות עם ADO.Net.
מסדי נתונים מסד נתונים הינו אוסף של טבלאות המכיל לפחות טבלה אחת. כל טבלה הינה אוסף של רשומות (לפחות רשומה בודדת) וכל רשומה מכילה אוסף של שדות ולבסוף.
Bài 5: ADO.NET 5.1. Khái niệm 5.2. Các lớp và không gian tên cơ bản của ADO.NET 5.3. Thao tác với dữ liệu kết nối – Connected 5.4. Thao tác với dữ liệu.
برنامه نویسی سیستم های شی گرا
Browser (Client Side) 瀏覽器 (客戶端)
Shell Scripts בסביבת UNIX
Chapter 10 ADO.
Visual Studio + SQL Server Is Better
04 | Data Acess Technologies
Active Data Objects Binding ASP.NET Controls to Data
M S COLLEGE OF ART’S, COMM., SCI. & BMS Advance Web Programming
Introduction to Database Programming through ADO. NET
Presentation transcript:

עבודה עם נתונים באמצעות ADO.NET MCSD Doron Amir www . dorronamir . com

מהו ניהול נתונים ? Disconnected Data Architecture ניהול נתונים : שליפה , עריכה ,עדכון , מחיקה , בחירה וכו' של נתונים ממסד נתונים ( קובץ נתונים ). Disconnected Data Architecture Application DB ADO.NET מבוססת על ארכיטקטורת נתונים מנותקת כך שהחיבור למסד הנתונים יהיה קצר ביותר למטרות שליפה ועדכון נתונים.

מהם רכיבי ה -? ADO.NET DataSet Data Provider Connection Data Adapter DataReletion SelectCommand Command DB DataTable InsertCommand DataReader UpdateCommand DeleteCommand XML

רכיבי ה – ADO.NET DataTable : אובייקט המייצג טבלה . DataSet :1(מכיל אוסף אחד או יותר של אובייקטים מסוג DataTable 2( מכיל מידע לגבי היחסים בין הטבלאות ב- DataRelation Objects Data Provider : מספק רכיבים המאפשרים התקשרות ועבודה מול המסד נתונים . ישנם שני ספקים מוכנים עבור מסדי נתונים. 1) עבור מסדי נתונים מסוג OleDb 2 ) עבור מסדי נתונים מסוג SQL Server

DataTable 1 2 1112 Moshe Levi 1113 Sarit Mor 1114 Lilah Tibon

DataSet 1 2 1:1 1112 Moshe Levi DataReletion 1113 Sarit Mor 1114 Lilah 1 2 1:1 1112 Moshe Levi DataReletion 1113 Sarit Mor 1114 Lilah Tibon DataTable(1) 1 2 1112 23 Tel-Aviv 1113 32 Haifa 1114 20 ramat gan DataTable(2)

Data Provider Connection : מייצג את הקשר למסד הנתונים Command : מייצג פקודה הנשלחת למסד הנתונים לצורך אחזור או עדכון נתונים. DataAdapter : מאפשר עבודה נוחה וקלה עם ה DataSet מול ה DataBase DataReader : מאפשר שליפה מהירה של נתונים אך לא ע"פ Disconnected System.Data.OleDb : הספרייה המספקת את המימוש עבור מסדי OleDb System.Data.SqlClient : הספרייה המספקת את המימוש עבור SQL Server Data Provider Data Adapter DataSet SelectCommand DataReader InsertCommand DataReletion Command UpdateCommand DataTable DeleteCommand Connection

Data Reader ה- DataReader משמש לקרוא נתונים בכיוון אחד בלבד אין העתק של הנתונים בזיכרון , בכל רגע נתון יש בזיכרון רשומה בודדת Customers

Why Command ? כאשר רוצים לבצע פעולות פשוטות ישירות מול מסד הנתונים ExecuteNonQuery Method : ביצוע פקודה שאיננה שאילתה הוספת שורה ישירות למסד הנתונים ע"י פקודת INSERT

Why Command ? ExecuteScalar Method : שליפת נתון בודד ממסד הנתונים

Data Adapter Data Adapter : מתווך בין מסד הנתונים לאובייקט ה DataSet Fill Method : שיטה זו מפעילה את התכונה SelectCommand תכונות ה Data Adapter : SelectCommand :משפטי בחירה ממסד הנתונים(Fill Method) InsertCommand: פקודות ביצוע ( Update Method ) DeleteCommand : פקודות ביצוע ( Update Method ) : UpdateCommand פקודות ביצוע ( Update Method )

Data Adapter Data Set Update Fill Data Adapter SelectCommand DB DeleteCommand UpdatetCommand InsertCommand

Disconnected

Typed DataSet dataSet.Tables[0].Rows[1][1]; dataSet.Customers[1].Name Regular הטבלה הראשונה שורה (2) עמודה (2) id name age 0,0 0,1 0,2 1,0 1,1 1,2 2,0 2,1 2,2 dataSet.Customers[1].Name Typed שם הטבלה שורה (2) עמודה (2)

Typed DataSet

Code

עבודה עם נתונים באמצעות ADO.NET