DB/SQL Terminology Flashcards
What is a database?
A shared collection of logically related data, designed to meet the information needs of multiple users. A collection of related tables and other objects (views, triggers, procedures…)
Define: Character
Various alphanumerical characters, digital, and special characters. eg. D b 4 7 *
Define: Column
Sometimes referred to as a field, the vertical columns of a database that contains actual value consisting of one or more characters. Each column contains the same type of information for every record in the table. Common columns relate data in multiple tables.
Define: Row
Sometimes referred to as a record, the horizontal rows of a database. Each row contains one or more columns, and each row in a table contains the same columns.
Define: Table
A collection of related rows. Tables can be linked together to view (or manipulate) data as if one table.
Define: Entity
A person, place or thing, represented by a table
Define: Attribute
A descriptor of an entity, represented by column headings
Define: Data Dictionary
The repository of all data definitions for all objects within the scope of the database. It contains meta-data. eg. table name, column name, data constraints, primary and foreign keys, index
What does DDL stand for?
Data Definition Language
Give Data Definition Language (DLL) examples.
CREATE table CREATE index
What does DML stand for?
Data Manipulation Language
Give Data Manipulation Language (DML) examples.
SELECT, INSERT, UPDATE, DELETE
Define: Expressions
An expression can be: - A column name - Text - ‘this is a text string’, 10, last_name + ‘, ‘ + first_name - A function - LEN(‘Blake’), SQRT(144) + 5, STR(SQRT(99), 5, 3), GETDATE()
Define: Conditions
Purpose: To specify a combination of one or more expressions and logical operators that evaluates to either TRUE, FALSE or unknown Comparison operators =, !=, >, =, <=, [NOT] IN, [NOT] BETWEEN x AND y, [NOT] LIKE, EXISTS, IS [NOT] NULL
What are _ and % used for in expressions?
What are the different built-in functions?
Scalar, Column, Mathematical, String, Date and Time
Give examples of scalar functions.
Number, Character, Date
Give examples of mathematical functions.
Give examples of string functions.
Give examples of date and time functions.
Give column function examples.
What is the function at groups data?
GROUP BY
What is the function to sort data?
ORDER BY
Define: Relation
Define: Tuple
A row of data (another name for a row)
Define: Attribute
A column in a table (another name for column)
Define: Primary Key
Define: Determinant
Define: Functional Dependency
Define: Candidate Key