Foundations Flashcards
(100 cards)
A ______ in a database occurs when an attribute is dependent on itself or a subset of the given attributes.
Example:
If A → A or AB → A, these are ______ because the dependent attribute is already part of the determinant.
- Trivial Dependency
- Transitive Dependency
- Partial Dependency
- Non-Trivial Dependency
Trivial Dependency
The process of ______ involves combining tables or adding redundancy to improve read performance at the cost of increased storage and potential anomalies.
Example:
Storing customer and order details in the same table instead of separate ______ tables.
- Partitioning
- Denormalization
- Indexing
- Normalization
Denormalization
______ ______ is optimal for frequent inserts, updates, and deletes because it eliminates redundancy and dependency issues while maintaining data integrity.
Example:
Ensuring that every determinant is a candidate key helps maintain - ______ ______ and prevents anomalies.
- Boyce-Codd Normal Form
- First Normal Form
- Third Normal Form
- Fourth Normal Form
Boyce-Codd Normal Form (BCNF)
A(n) ______ in an ER diagram is used to represent an entity.
Example:
In a database for a school, “Student” and “Course” would be ______ symbols.
- Rectangle
- Diamond
- Oval
- Triangle
Rectangle
An Attribute Symbol in an ER diagram is represented by a(n) ______
Example:
In a database for employees, “Name” and “Salary” would be ______ symbols.
- Rectangle
- Diamond
- Circle
- Triangle
Circle
Before defining supertype and subtype entities, you must ______ ______.
Example:
In a university database, identifying “Person” before creating “Student” and “Professor” as subtypes ensures proper hierarchy.
- Define relationships
- Normalize tables
- Identify entities
- Assign attributes
Identify entities
The ______ strategy is used to determine primary keys when analyzing data relationships.
Example:
Examining Social Security Numbers or Employee IDs helps with ______ to ensure uniqueness.
- Foreign key mapping
- Attribute clustering
- Unique identifier analysis
- Entity normalization
Unique identifier analysis
An ER phrase should be read ______ to understand how one entity relates to another.
Example:
In an ER diagram, “Employee manages Department” should be read ______ to interpret the relationship correctly.
- From top to bottom
- In the direction the relationship verb is facing
- From left to right
- In the direction the entity box is facing
In the direction the relationship verb is facing
______ are logical constraints that ensure the data is valid.
Example:
Primary keys enforcing uniqueness and foreign keys maintaining referential integrity are examples of ______.
- They are logical constraints that ensure the data is valid.
- They are based on business policy and specific databases.
- They represent data volumes and rapidly changing data structures.
- They embody the theoretical foundation of the SQL language.
They are logical constraints that ensure the data is valid.
______ includes the World database during its installation.
Example:
After installing ______, users can access the World database to explore country, city, and language data.
- MySQL
- MongoDB
- Oracle
- PostgreSQL
MySQL
______ is the SQL sublanguage used to roll back database changes.
Example:
Using the ROLLBACK command in ______ allows reversing uncommitted transactions.
- Data Transaction Language (DTL)
- Data Manipulation Language (DML)
- Data Query Language (DQL)
- Data Control Language (DCL)
Data Transaction Language (DTL)
______ is the format used by the TIME data type in MySQL.
Example:
A column with the TIME data type storing “14:30:15” follows the ______ format.
- YYYY-MM-DD
- YYYY-MM-DD hh:mm:ss
- hh:mm:ss
- hh:mm:ss YYYY-MM-DD
hh:mm:ss
______ is the last operator in MySQL’s order of precedence.
Example:
In the expression TRUE OR FALSE AND FALSE, the AND operator is evaluated before ______.
- -
- OR
- NOT
- =
OR
______ is the operator used to compare columns from the left and right tables in MySQL.
Example:
In a JOIN operation, table1.column ______ table2.column ensures matching rows.
- <=
- +
- =
- *
=
______ is the type of join that combines two tables without comparing columns.
Example:
Using SELECT * FROM table1, table2; performs a ______, creating a Cartesian product.
- SELF
- EQUIJOIN
- OUTER
- CROSS
CROSS
______ is the type of join that compares columns using only the = operator.
Example:
SELECT * FROM table1 INNER JOIN table2 ON table1.id ______ table2.id;
- Equijoin
- Non-equijoin
- Outer join
- Inner join
Equijoin
______ is the operator used to compare against a list of values in a WHERE clause.
Example:
SELECT * FROM users WHERE role ______ (‘Admin’, ‘Editor’, ‘Viewer’);
- IN
- BETWEEN
- LIKE
- OR
IN
______ is considered an aggregating function in SQL.
Example:
SELECT ______(salary) FROM employees; returns the lowest salary in the table.
- TRIM
- REPLACE
- MIN
- SUBSTRING
MIN
______ is used with aggregate functions to produce summary rows.
Example:
SELECT department, COUNT(*) FROM employees ______ department; groups employees by department.
- TRIM
- REPLACE
- ORDER BY
- GROUP BY
GROUP BY
______ returns only the matching values when selecting rows from two or more tables.
Example:
SELECT * FROM table1 ______ table2 ON table1.id = table2.id;
- Full Join
- Outer Join
- Equijoin
- Inner Join
Inner Join
______ refers to the view in which data is persisted and is automatically changed as the underlying data is changed.
Example:
A ______ stores query results and updates them periodically rather than dynamically.
- Virtual View
- Snapshot View
- Denormalized View
- Materialized View
Materialized View
______ describes elements such as column name and data type.
Example:
Database ______ includes information like table structure and constraints.
- Alter
- Table
- Metadata
- CRUD
Metadata
______ identifies an ordered collection of elements enclosed in parentheses in a tablespace.
Example:
A row in a relational database table is also called a ______.
- Cell
- Field
- Column
- Tuple
Tuple
______ demonstrates valid syntax in SQL for an INSERT statement.
Example:
______ table_name (column1, column2) ______ (value1, value2); correctly inserts data.
- INSERT INTO table_name (column1, column2) SET value1, value2;
- INSERT INTO table_name VALUES (value1, value2);
- INSERT INTO table_name (column1, column2) VALUES (value1, value2);
- INSERT INTO table_name SET column1 = value1, column2 = value2;
INSERT INTO table_name (column1, column2) VALUES (value1, value2);