Understanding SQL Flashcards
Database
a container (usually a file or set of files) to store organized data.
DBMS
Database Management System
Table
a structured list of data of a specific type.
Table names
– a combination of several things, including the database name and table name. Some databases also use the name of the name of the database owner as part of the unique name.
Schema
– information about database and table layout and properties.
Column
– a single field in table. All tables are made up of one or more columns.
Breaking Up Data
– when you break up data, the level of granularity is up to you and your specific requirements. For example, addresses are typically stored with the house number and street name together. This is fine, unless you might one day need to sort data by street name, in which case splitting house number and street name would be preferable.
Datatype
- a type of allowed data. Every table column has an associated datatype that restricts (or allows) specific data in that column.
Datatype Compatibility
– names of datatypes in different DBMSs can be different. Keep it in mind.
Rows
– a record in a table.
Primary Key
– a column (or set of columns) whose values uniquely identify every row in a table.
Defined for every row (no NULL values)
Should never be modified or updated.
Should never be reused (If a row is deleted from the table, its primary key may not be assigned to any new rows in the table).
Always define Primary Keys to make data manipulation possible and manageable.