Management of Information
Management of Information
Constraints
- Domain Constraints - rules for the
valid values that can be stored in a - Data atomicity
specific column
- Primary key is used to identify a
table field that contains unique
values.
- Foreign keys link data in one table
to data in another table, creating
relationships.
- Unique Key 2. 2NF/
- Not Null - functional dependency - One
column's unique values determine
Entities - are objects with defining properties in a the values of another column.
database. - the relationship between two
attributes in a table.
1. Simple Attributes: Cannot be classified - partial dependency
further (e.g., grade). - Occurs when a table has a
2. Single-Valued Attributes: Store one value composite primary key
per entity (e.g., date of birth). (composed of two or more
3. Composite Attributes: Can be split into columns).
sub-components (e.g., name -> first and last - All non-key attributes must
name). depend on the entire primary
4. Multi-Valued Attributes: Store multiple key, not just part of it.
values (should be avoided).
5. Derived Attributes: Values are derived 3. 3NF
from other attributes (e.g., age from date of - To achieve 3NF, a database must
birth). first be in 1NF and 2NF.
6. Key Attributes: Hold unique values to - transitive dependency
identify entities (e.g., student ID).
- occurs when one non-key security of a database or for granting or
attribute depends on another revoking a data operation to the user
non-key attribute. 4. TCL - Transaction Control Language - for
managing transactions within relational
DBMS.
SQL Subcomponents:
1. DDL - Data Definition Language - we are
done with the structure of the database with
the use of
- CREATE DATABASE/ TABLE
- DROP DATABASE/ TABLE
- ALTER DATABASE/ TABLE
2. DML - Data Manipulation Language
- C REATE - INSERT INTO Statement
- R EAD - SELECT Statement
- U PDATE - UPDATE Statement
- D ELETE - DELETE FROM
Statement
3. DCL - Data Control Language - deals with
the permissions, access control, and