levo

Building a Desktop Solution with a Database

Data adaptors

  • 3 things to know
  • A2 Unit 2
Start revising · £5/month

Overview

Data adaptor and adaptor's role in a disconnected design.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

What does filling a data set actually do?

Key term

How does the adaptor know which rows to update when changes are sent back?

Key term

How are parameters supplied to an adaptor's select command?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What is a data adaptor?

    Model answer

    A data adaptor is the component that moves data between the database and an in-memory data set. It fills the data set from a query and sends the changes in the data set back to the database.

  2. 2

    What are the two directions a data adaptor works in?

    Model answer

    Filling, in which the adaptor runs a select command and loads the result into a data set; and updating, in which it examines the changes made in the data set and issues the insert, update and delete commands needed to apply them.

  3. 3

    Which commands does a data adaptor hold?

    Model answer

    A data adaptor holds a select command that fetches the rows, and insert, update and delete commands that apply changes. The three change commands can be generated from the select command or written by hand.

  4. 4

    Why might the change commands be written by hand rather than generated?

    Model answer

    Generated commands assume a simple single-table query with a primary key, so a query joining tables, using a view or applying a business rule needs commands written deliberately.

  5. 5

    What does filling a data set actually do?

    Model answer

    Filling opens the connection if it is closed, runs the select command, copies every returned row into a table inside the data set, and closes the connection again if the adaptor opened it.

  6. 6

    How does the adaptor know which rows to update when changes are sent back?

    Model answer

    Each row in the data set records its state — unchanged, added, modified or deleted — and the adaptor issues the corresponding command only for the rows whose state is not unchanged.

Other ways to work this

The same content, four other ways.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

Software and the Development Environment
Defining Data: Types, Variables and Classes
Program Control Structures
Objects, Classes and Data Structures

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

A null is the of one.
absencepresencetype

Blank Blitz consolidates the facts

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

An error is the mistake a person made.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Building a Desktop Solution with a Database, on a schedule.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.