paper 3 Flashcards
(47 cards)
Database
An organized collection of data stored and accessed electronically.
DBMS
Database Management System: software that creates, reads, updates, and deletes data in a database.
Table (Relation)
A set of related data organized into rows (records) and columns (fields).
Record (Tuple)
A single row in a table representing one real-world entity instance.
Field (Attribute)
A column in a table representing one property of the entity.
Domain
The set of all valid values for a given attribute.
Primary Key
A field (or combination of fields) that uniquely identifies each record in a table.
Foreign Key
A field in one table that references a primary key in another table to enforce relationships.
Composite Key
A primary key made up of two or more fields combined.
Entity
An object or concept about which data is stored (e.g., Student, Car).
Relationship
An association between two entities (e.g., Student enrolls in Course).
Cardinality
Specifies how many instances of one entity relate to instances of another (1:1, 1:M, M:N).
1NF
First Normal Form: all fields contain only atomic (indivisible) values.
2NF
Second Normal Form: all non-key fields depend on the whole primary key (no partial dependencies).
3NF
Third Normal Form: no non-key field depends on another non-key field (no transitive dependencies).
Data Integrity
Ensuring the accuracy and consistency of data over its lifecycle.
Referential Integrity
Guarantee that foreign-key values match existing primary-key values (no orphan records).
NOT NULL
Constraint that prevents a field from having empty (NULL) values.
UNIQUE
Constraint that ensures all values in a field (or combination) are distinct.
CHECK
Constraint that enforces a Boolean condition on field values (e.g., age ≥ 0).
SELECT
Retrieve specified columns or all columns from a table (e.g., SELECT * FROM Students;).
INSERT INTO … VALUES (…)
Add new rows to a table (e.g., INSERT INTO Students (name, age) VALUES (‘Alice’, 17);).
UPDATE … SET … WHERE …
Modify existing rows in a table (e.g., UPDATE Students SET age = 18 WHERE name = ‘Alice’;).
DELETE FROM … WHERE …
Remove rows from a table (e.g., DELETE FROM Students WHERE age < 16;).