DDD Flashcards

(23 cards)

1
Q

Searching
(Soffritto from Westphalia’s Alps - Order it!)

A

SELECT fieldName1, fieldName2
FROM tableName1, tableName2
WHERE tableName1.PK = tableName2.FK
AND fieldName = data;
ORDER BY fieldName ASC OR DESC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Adding (insects intermittently vivacious)

A

INSERT INTO tableName (fieldName1, fieldName2)
VALUES (value1, value2);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Editing (United States of Where?)

A

UPDATE tableName
SET fieldName to updated value
WHERE criteria to be met;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Deleting (don’t forget whisky)

A

DELETE FROM tableName
WHERE criteria to be met;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Database End-User Requirements

A

The tasks that the user needs to carry out

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Database Functional Requirements

A

The processes and activities that the database has to perform and the information that the system needs to store in order to perform these functions.
Should include any tables that will be used, a list of fields in each table, queries to be carried out, functions / calculations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Compound Key

A

Two or more attributes are used to uniquely identify each record in a table.
Each attribute from the compound key is a primary key in its own right.
Used when no single attribute in a table can be used as a primary key.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

SQL Wildcards

A

Used with LIKE operator:
% - matches one or more character(s)
_ - Matches exactly one character
eg:
SELECT surname
FROM patient
WHERE forename LIKE ‘s_i%’;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Aggregate Functions

A

An aggregate function performs a calculation on a set of values and returns a single value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

SQL MAX / MIN

A

The MAX() function returns the largest value of the selected column.
The MIN() function returns the smallest value of the selected column.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

SQL Sum

A

SUM() returns the sum of a numeric column.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

SQL Average

A

The AVG() function returns the average value of a numeric column.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

SQL Count

A

The COUNT() function returns the number of rows that match a specified criteria.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Computed Values

A

A computed value can be calculated by using arithmetic expressions in a SELECT statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Aliases

A

SQL aliases are used to give any column in a table a more readable name. Can be assigned to a column by using the AS keyword in the SELECT statement.
eg:
SELECT surname, COUNT(appointmentID) AS [Number of Appointments]
FROM doctor, appointment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

GROUP BY

A

The GROUP BY statement arranges rows with the same values into groups, commonly used with aggregate functions.

17
Q

Testing

A

To test a query, come up with a table of expected results then run the queries and check that the actual results match the expected results.

18
Q

Fitness for Purpose

A

A database is fit for purpose if it meets the end-user requirements and the functional requirements.

19
Q

Accuracy of output

A

queries are tested by comparing actual results against a table of expected results. The output is accurate if the actual results match the expected results.

20
Q

Range check testing

A

If there are range checks (ie data must be entered within certain limits) you must check if the lower and upper limits are working

21
Q

Restricted choice testing

A

When there is a restricted choice (ie select options from a dropdown) it must be tested to ensure that it has the correct choices and that a user cannot enter any new data

22
Q

Presence Checks Testing

A

If there are any presence checks (ie fields that cannot be left blank) you must check what happens if no input is entered

23
Q

Length Check Testing

A

It is not enough to just use the field length as this will only set a maximum number of characters. If a phone number has to be 11 characters then you must test happens if an invalid length of characters is entered (eg 10)