CCEA A-Level Software Systems Development CL4
Software and the Development Environment
Defining Data: Types, Variables and Classes
Program Control Structures
Objects, Classes and Data Structures
Exception Handling and Managing Input and Output
Testing an Object Oriented Application
Graphical User Interface Objects and Events
Multiple Forms and Linking to Files
Designing, Testing and Evaluating an Event Driven Application
Reasons for Systems Development and Systems Methodologies
Managing Projects
Testing Strategies
Database Concepts and Entity Relationship Modelling
Normalisation and Structured Query Language
Project Management and the Systems Approach in Practice
Defining Requirements and Documenting the Design
Building a Desktop Solution with a Database
Testing and Evaluating the Solution
Building a Desktop Solution with a Database
Connecting the application to the database
- 3 things to know
- A2 Unit 2
Overview
Connection in a database application, connection string and steps in using a connection.
What you need to know
Answer each one before you reveal it.
Why should database credentials not be written into the source code?
Why must a connection be closed as soon as the work is done?
Questions from this subtopic
Each one with the model answer underneath.
- 1
What is a connection in a database application?
Model answer
A connection is the open channel between the application and the database, established with the details of the server, the database name and the credentials, and used by every command the application issues.
- 2
What is a connection string?
Model answer
A connection string is the single piece of configuration holding everything needed to reach the database: the provider, the server or file, the database name, and the authentication details.
- 3
Why is a connection string held in configuration rather than written into the code?
Model answer
Because it differs between the development, test and live machines, and changing it should not require the application to be rebuilt. Holding it in one place also means it is changed once rather than everywhere it was copied.
- 4
Why should database credentials not be written into the source code?
Model answer
Source code is copied, shared and often stored in version control, so credentials written into it are exposed to everyone with access to the code and cannot be changed without a rebuild.
- 5
What are the steps in using a connection?
Model answer
The connection is created from the connection string, opened, used by one or more commands, and then closed, and it is closed in a construct that runs even if an error is raised part way through.
- 6
Why must a connection be closed as soon as the work is done?
Model answer
A database allows a limited number of simultaneous connections and each holds resources on both machines, so connections left open eventually exhaust the pool and the application stops being able to reach the database at all.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Building a Desktop Solution with a Database, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.