Validation and Verification
Databases
Database
In a database, information is organized into tables, each comprising numerous records. Each record is composed of multiple fields. The quantity of records within a table can fluctuate, as new records may be added and existing ones can be deleted as needed.
Field
Field
Record
Data
Data
Record
Data
Data
Record
Data
Data
From Text Books
Data Types
There are six basic data types that you need to be able to use in a database:
Data Type
Description
Text/Alphanumeric
A number of characters. Short text/long text
Character
A single character. Short text with a field size of one
Boolean
One of two values: either True or False, 1 or 0, Yes or No
Integer
Whole number. Number formatted as fixed with zero decimal places
Real
A decimal number. Number formatted as decimal
Date/Time
Date and/or time
From Text Books
Structured Query
Language
SQL Scripts
Query Statement
Description
SELECT
Fetches specified fields (columns) from a table; queries always begin with SELECT.
FROM
Identifies the table to use.
WHERE
Includes only records (rows) in a query that match a given condition.
ORDER BY
Sorts the results from a query by a given column, either alphabetically or numerically.
SUM
Returns the sum of all the values in a field (column). Used with SELECT.
COUNT
Counts the number of records (rows) where the field (column) matches a specified condition. Used with SELECT.
From Text Books
Primary Keys
In SQL, a primary key is a unique identifier for each record in a table. It uniquely distinguishes each row, ensuring that there are no duplicate values in the specified column or combination of columns. The primary key is crucial for maintaining data integrity and facilitating efficient data retrieval.
SQL Commands
SELECT [Field Name]
FROM [Database Name]
Query [WHERE, ORDER BY, SUM, COUNT]
Query [WHERE, ORDER BY, SUM, COUNT];
From Text Books
© Copyright 2024 - Made with Passion