CS 204 Flashcards
(226 cards)
A _______________ consists of tables that are linked together in some meaningful way.
relational database
________________ are created using primary and foreign keys.
Relationships
A _____________ is a minimal set of attributes whose values uniquely identify a record in a table.
primary key
A _______________ is an attribute whose values are the same as the primary key of another table.
foreign key
Relationships are characterized by their ________________: how many records in one table are related to how many records another table.
cardinality
What are the four types of cardinality?
one-to-one
one-to-many
many-to-one
many-to-many
__________________ are software programs that allow users to access and maintain databases.
Database applications
A database __________ is a blueprint of a relational database.
schema
What type of schema displays the hardware, servers, and connections that need to be set up to install the database?
physical schema
What type of schema is the layout and design of the data and tables in the database?
logical schema
What is it called to reduce the redundant data among the tables?
normalizing
How to put a table into 1NF?
Break up the columns with duplication into two or more pieces that reduce duplication.
1NF rules:
Columns must have single values
Columns must have unique names
Values of a given attribute must be of the same data type
No two records (or rows) can be identical
2NF rules:
Table is in 1NF
There are no partial dependencies of any column on the primary key
3NF rules:
The table should be in the 2NF
All non-primary fields are dependent on the primary field
Transitive dependencies are removed
What is a a set of SQL statements that work on the database as a whole, rather than an individual table or row?
Data Definition Language
Common DDL statements:
CREATE (generates a new table)
ALTER (alters table)
DROP (removes a table from the database)
What is a set of SQL statements that act on the data within a table. Select, insert, update, and delete are elements of this language?
data manipulation language
What is a set of SQL statements that control privileges to the data in the database?
Data control language
Grant and revoke are elements of this language.
It’s used by database administrators.
___________ make pictures of tables.
Views
____________ create a sort order on a column
indexes.
M. Mm
An automatic operation to set to a certain event:
trigger
Data definition language (DDL) includes statements that modify the _____ of a database.
structure
The _____ command is used to completely remove a table from the database.
DROP
To build a new table from scratch, use the _____ command.
CREATE