Chapter 1 Flashcards
Table
Has a name, and fixed tuple of columns, and a varying set of rows
Column
Has a name and data type
Row
An unnamed tuple of values each value corresponds to a column and belongs to a columns data type
Data type
A named set of values from which column values are drawn
Set
in an ordered collection of elements, enclosed in braces, and are the same since sets are not ordered.
Database model
A conceptual framework for database systems with three parts: data structures that prescribe how data is organized, that manipulate data structures and rules that govern valid data.
Select
A command that selects a subset of rose of a table
Project
A command that eliminates 1 or more columns of the table
Product
List all combinations of rows of two tables
Join
Combines two tables by comparing related columns
Union
Select all rows of two tables
Intersect
Select rows common to 2 tables
Difference
Select rows that appear in one table, but not another.
Rename
Changes a table name
Aggregate
Computes functions over multiple table rows, such as sum and count
Relational operations
Based on set theory, each operation generates a result table from one or two input tables
Relational rules
Unique primary key – all tables have a primary key column, or group of columns in which values do not repeat
Unique column name, different columns of the same table have different names.
No duplicate rows: no two rows of the same table have identical values in every column.
Business rules
Based on business policy and specific to particular databases, EX: all rows of an employee table must have a valid entry in the department code column call or passport number values may not repeat in different employee rows.
Business rules
Based on business policy and specific to particular databases, EX: all rows of an employee table must have a valid entry in the department code column call or passport number values may not repeat in different employee rows.
SQL
A high-level computer language for storing, manipulating and retrieving data
Statement
Complete command, composed of one or more clauses
Clause
Groups, SQL keywords together
Data definition language
SQL sub language that defines the structure of the database
Data query language
Is SQL sub language that retrieve data from the database