chap14 - Chapter 14 Creating More Complex Database...

Info iconThis preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon
Object-Oriented Application Development Using VB .NET 1 Chapter 14 Creating More Complex Database Applications
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object-Oriented Application Development Using VB .NET 2 Objectives In this chapter, you will: Implement a one-to-one association in a database application Implement a one-to-many association in a database application Apply parent-child (hierarchical) dataset relationships Implement an association class in a database application
Background image of page 2
Object-Oriented Application Development Using VB .NET 3 Implementing a One-to-One Association in a Database Application Relationships between Customer and Boat Mandatory One-to-one relationships in both directions A customer always owns exactly one boat A boat is always owned by exactly one customer
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object-Oriented Application Development Using VB .NET 4 Implementing a One-to-One Association in a Database Application
Background image of page 4
Object-Oriented Application Development Using VB .NET 5 Understanding the CustomerAndBoat Database Tables of CustomerAndBoatDatabase BoatTable CustomerTable
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object-Oriented Application Development Using VB .NET 6 Understanding the CustomerAndBoat Database BoatTable fields StateRegistrationNo BoatLength Manufacturer Year CustomerPhoneNo
Background image of page 6
Object-Oriented Application Development Using VB .NET 7 Understanding the CustomerAndBoat Database CustomerTable fields Name Address PhoneNo
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object-Oriented Application Development Using VB .NET 8 Understanding the CustomerAndBoat Database Primary key A field that uniquely identifies each record in a relational database table CustomerTable primary key: PhoneNo BoatTable primary key: StateRegistrationNo Foreign key A field in one table that serves as a primary key in a related table BoatTable foreign key: CustomerPhoneNo
Background image of page 8
Object-Oriented Application Development Using VB .NET 9 Understanding the CustomerAndBoat Database
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object-Oriented Application Development Using VB .NET 10 Using SQL to Join Tables in the Database Joining two tables in SQL Using foreign and primary keys to link information in one table to information in another table Example Find and display the state registration number and manufacturer of all boats in BoatTable, with the name, address, and phone number of each boat’s owner SELECT StateRegistrationNo, Manufacturer, Name, Address, PhoneNo FROM BoatTable, CustomerTable WHERE CustomerPhoneNo = PhoneNo
Background image of page 10
Object-Oriented Application Development Using VB .NET 11 Using SQL to Join Tables in the Database Example: Display the name and address of the owner of the boat with state registration number MO98765 SELECT StateRegistrationNo, Name, Address FROM BoatTable, CustomerTable WHERE CustomerPhoneNo = PhoneNo AND StateRegistrationNo = 'MO98765'
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object-Oriented Application Development Using VB .NET 12 Establishing a Common Connection to the Database CustomerAndBoatDatabaseConnect program Establishes a common connection to CustomerAndBoatDatabase Used by CustomerDA BoatDA
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/07/2008 for the course CSC 208 taught by Professor Walker during the Spring '06 term at Monroe CC.

Page1 / 51

chap14 - Chapter 14 Creating More Complex Database...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online