1/24
Vocabulary flashcards covering core DBMS concepts from Lecture 1 on integrity constraints and keys.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Database
A collection of related data stored and accessed electronically (e.g., student information).
DBMS
Software used to manage, store, and retrieve data efficiently via an abstract interface.
Flat file system
Simple file-based storage without a DBMS; used for small databases but lacks data independence and efficient querying.
Integrity Constraint
Rules that enforce data correctness and consistency in a database.
Relational DBMS (RDBMS)
A DBMS based on the relational model that uses tables (relations) with rows and columns.
CODD Rule
One of Codd's 12 rules; data is stored in tabular form with unique rows; governs the design of relational DBMS.
Attribute
A named column in a table (e.g., SID, Sname, DOB).
Record (Tuple)
A row in a relation representing a single data item across attributes.
Relational Instance
The current set of rows in a relation; also called a snapshot or record set.
Relational Schema
The structure/heading of a table, i.e., its set of attributes (e.g., STUDENT(Sid, Sname, DOB)).
Arity
The number of attributes (columns) in a relation.
Cardinality
The number of records (rows) in a relation.
Candidate Key
A minimal set of attributes that can uniquely identify each row in a relation.
Simple Candidate Key
A candidate key consisting of a single attribute.
Compound (Composite) Candidate Key
A candidate key consisting of two or more attributes.
Prime Attribute
An attribute that is part of any candidate key.
Primary Key
The candidate key chosen to uniquely identify rows; cannot be NULL; only one per relation.
Alternative Keys
All candidate keys of a relation other than the primary key; may allow NULL values.
Super Key
A set of one or more attributes that can uniquely identify a row; includes candidate keys and supersets.
NULL values in keys
Null values indicate missing data; the primary key cannot be NULL, while some alternative keys may allow NULLs.
Unique Constraint
A constraint ensuring all values in a column (or a column combination) are distinct.
Defining a Table schema (CREATE TABLE)
SQL statement to define a table's structure and constraints (e.g., PRIMARY KEY, UNIQUE, NOT NULL).
STUDENTS table (example)
Example relation STUDENTS with attributes Sid, Sname, DOB used to illustrate keys.
ENROLL relation (example)
Relation with SID, CID, Fee where (SID, CID) forms a candidate key; a single SID or CID cannot identify a row.
Candidate Keys vs Primary Key
Primary Key is the chosen candidate key and is NOT NULL; other candidate keys are Alternative Keys; primary key cannot be NULL.