FINAL EXAM Flashcards
Purpose of a Database
- Keep track of things
- Store information that is more complicated than a simple list
Problems with Lists
- Redundancy
- Multiple Themes
List Modification Issues
- Deletion
- Update
- Insertion
What causes modification issues?
- Redundancy
- Multiple Themes
Relational Database
- Stores each topic in its own table
- Breaks up a list
- More complicated than a list
What does a relational database do?
- Minimizes redundancy, preserves relationships, and allows partial data.
- Gives foundation for user forms and reports
Four Components of a Database System?
- Users
- Database Application
- Database Management System (DBMS)
- Database
DBMS
- Database Management System
- Serves as an intermediary between database applications and the database
- Manages and controls database activities
- Creates, processes, and administers the databases it controls
Functions of a DBMS
- Create databases, tables, supporting structures
- Read data
- Modify data
- Maintain structures
- Enforce rules
- Control concurrency
- Provide security
- Perform backup and recovery
Referential Integrity Constraints
- Ensure that the values of a column in one table are valid based on the values in another table
Table
- Same as file and relation
File
- Same as table and relation
Relation
- A two-dimensional table that has specific characteristics
- The table dimensions consist of rows and columns
- Same as table and file
Row
- Same as record and tuple
Record
- Same as row and tuple
Tuple
- Same as record and row
Column
- Same as field and attribute
Field
-Same as column and attribute
Attribute
- Same as column and field
Unique Key
- Data value is unique for each row
- Consequently, the key will uniquely identify a row
Nonunique Key
- Data value may be shared among several rows
Composite Key
- A key that contains two or more attributes
- For a key to be unique, it must often become a composite key
Candidate Key
- A “candidate” to become the primary key, value is used to find the value of every attribute in the table
- Contains only one attribute
- A unique key
Primary Key
- Main key for the relation
- If you know the value of the primary key, you will be able to uniquely identify a single row
Foreign Key
- A primary key from one table placed into another table
- The key is called a foreign key in the table that received the key
Surrogate Key
- A unique, numeric value that is added to a relation to serve as the primary key
- Values have no meaning to users and are usually hidden on forms, queries, and reports
- Often used in place of a composite key
Functional Dependency
- A relationship between attributes in which one attribute (or group of attributes) determines the value of another attribute in the same table
Normalization Concept
- A process of analyzing a relation to ensure that it is well formed
- If a relation is normalized (well formed), rows can be inserted, deleted, or modified without creating update anomalies
Normalization Principles
- Every determinant must be a candidate key
- Any relation that is not well formed should be broken into two or more well-formed relations
Normal Forms
- First Normal Form
- Second Normal Form
- Third Normal Form
- Boyce-Codd Normal Form
SQL
- Structured Query Language
- Data sublanguage
- Compromised of DDL, DML, DLC
DDL
- Create Table
- Alter Table
- Drop Table
DML
- Select
- Update
- Insert
- Delete
SQL Data Retrieval : Match Criteria
( = < > <= )