windows database applications cis 341 chapter 4. objectives related tables format data grid parent...

10
Windows Database Applications CIS 341 Chapter 4

Upload: anne-manning

Post on 04-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Windows Database Applications CIS 341 Chapter 4. Objectives Related tables Format Data Grid Parent retrieval Child retrieval Bound and unbound controls

Windows Database Applications

CIS 341 Chapter 4

Page 2: Windows Database Applications CIS 341 Chapter 4. Objectives Related tables Format Data Grid Parent retrieval Child retrieval Bound and unbound controls

Objectives

Related tablesFormat Data GridParent retrievalChild retrievalBound and unbound controls

Page 3: Windows Database Applications CIS 341 Chapter 4. Objectives Related tables Format Data Grid Parent retrieval Child retrieval Bound and unbound controls

Data Relationships

One-to-many (1:M)One-to-one (1:1) Many-to-many (M:N)

Page 4: Windows Database Applications CIS 341 Chapter 4. Objectives Related tables Format Data Grid Parent retrieval Child retrieval Bound and unbound controls

Many-to-many (M:N)

student coursestu1 John class1 Math stu2 Mary class2 English

student stu_course courseStu1 Mary stu1 class1 class1 MathStu2 John stu1 class2 class2

Englishstu2 class1stu2 class2

Page 5: Windows Database Applications CIS 341 Chapter 4. Objectives Related tables Format Data Grid Parent retrieval Child retrieval Bound and unbound controls

Grid Related Tables

Dataset creationRelationship

Page 6: Windows Database Applications CIS 341 Chapter 4. Objectives Related tables Format Data Grid Parent retrieval Child retrieval Bound and unbound controls

Data Grid Format

Data Grid

Data Table Styles Collection

Data Grid Table Style

Data Grid Column Style

Grid Column Styles Collection

Page 7: Windows Database Applications CIS 341 Chapter 4. Objectives Related tables Format Data Grid Parent retrieval Child retrieval Bound and unbound controls

Parent / Child records

Dataset for both tablesRelationshipDataset for combo box

Page 8: Windows Database Applications CIS 341 Chapter 4. Objectives Related tables Format Data Grid Parent retrieval Child retrieval Bound and unbound controls

Unbound

Parent / Child recordsRetrieve a selected parent rowRetrieve an array of matching child rowsReference fields in the selected rows

Page 9: Windows Database Applications CIS 341 Chapter 4. Objectives Related tables Format Data Grid Parent retrieval Child retrieval Bound and unbound controls

Data Grid Format

Data Table

Data Rows Collection

Data Row (0)

Data Row (1)

Page 10: Windows Database Applications CIS 341 Chapter 4. Objectives Related tables Format Data Grid Parent retrieval Child retrieval Bound and unbound controls

Retrieve Parent Row