[Database Fundamentals] What is a database application?
A database application is software that helps business users interact with database systems.
[Database Fundamentals] What is the primary role of a database administrator?
A database administrator is responsible for securing the database system against unauthorized users.
They enforce procedures for user access and database system availability.
[Database Fundamentals] How do database systems handle authorization and rules?
Database systems authorize individual users to access specific data.
They ensure data is consistent with structural and business rules.
For example, when a course number appears in a student registration record, the course must exist in the course catalog.
[Database Architecture] What is the role of the query processor?
The query processor interprets queries, creates a plan to modify the database or retrieve data, and returns query results to the application.
Why: It performs query optimization to ensure the most efficient instructions are executed on the data.
[Database Architecture] Fill in the blank: The ________ translates the query processor instructions into low-level file-system commands.
storage manager.
Note: Because database sizes range from megabytes to many terabytes, the storage manager uses indexes to quickly locate data.
[Database Architecture] What component prevents conflicts between concurrent transactions and restores the database after a failure?
The transaction manager.
Real-world application: The transaction manager ensures transactions are properly executed and restores the database to a consistent state in the event of a transaction or system failure.
[Database Platforms] What are the key characteristics of MongoDB?
MongoDB is a NoSQL, open-source database.
[SQL Basics] Describe the purpose of the four primary data manipulation commands: INSERT, SELECT, UPDATE, and DELETE.
INSERT inserts rows into a table.
SELECT retrieves data from a table.
UPDATE modifies data in a table.
DELETE deletes rows from a table.
[SQL Basics] Practice: Which SQL statement would you use to create a new table and assign a format to its columns?
The SQL CREATE TABLE statement creates a new table by specifying the table and column names.
Each column is assigned a data type that indicates the format of column values.
[SQL Basics] Mastery: What are the differences between the INT, DECIMAL, VARCHAR, and DATE data types?
INT stores integer values.
DECIMAL stores fractional numeric values.
VARCHAR stores textual values.
DATE stores year, month, and day.
[Database Design] What occurs during the analysis phase of database design?
The analysis phase specifies database requirements without regard to a specific database system.
Requirements are represented as entities, relationships, and attributes.
Note: Analysis has alternative names, such as conceptual design, entity-relationship modeling, and requirements definition.
[Database Design] Describe the logical design phase of database creation.
The logical design phase implements database requirements in a specific database system.
For relational database systems, logical design converts entities, relationships, and attributes into tables, keys, and columns.
[Database Design] What is the physical design phase and how does it relate to data independence?
The physical design phase adds indexes and specifies how tables are organized on storage media.
Physical design affects query processing speed but never affects the query result.
The principle that physical design never affects query results is called data independence.
[Entity-Relationship Model] Define entities, relationships, and attributes.
An entity is a person, place, activity, or thing.
A relationship is a link between entities, and an attribute is a descriptive property of an entity.
[Database Interfaces] What is an Application Programming Interface (API) used for in database programming?
To simplify the use of SQL with a general-purpose language, database programs typically use an application programming interface.
[Database Interfaces] What happens when a SQL statement is syntactically incorrect in the MySQL Command-Line Client?
MySQL Server returns an error code and description when an SQL statement is syntactically incorrect or the database cannot execute the statement.
[Relational Structure] What is a tuple in the context of a relational database?
A tuple is an ordered collection of elements enclosed in parentheses.
For example, (a, b, c) and (c, b, a) are different, since tuples are ordered.
[Relational Structure] Describe the components of a table structure: table, column, and row.
A table has a name, a fixed sequence of columns, and a varying set of rows.
A column has a name and a data type.
A row is an unnamed sequence of values.
[Relational Structure] What are the common synonyms used for Table, Row, and Column?
Synonyms for Table: File, Relation.
Synonyms for Row: Record, Tuple.
Synonyms for Column: Field, Attribute.
[SQL Syntax] How are string and binary literals formatted in SQL?
Strings must be surrounded by single quotes or double quotes.
Binary values are represented with x’0’ where the 0 is any hex value.
[SQL Syntax] How do you write a single-line comment and a multi-line comment in SQL?
A single-line comment starts with –.
A multi-line comment is enclosed between /* and */.
[SQL Sublanguages] What is the difference between DDL and DML?
Data Definition Language (DDL) defines the structure of the database.
Data Manipulation Language (DML) manipulates data stored in a database.
[SQL Sublanguages] Fill in the blank: The ________ retrieves data from the database, while the ________ manages database transactions.
Data Query Language (DQL) retrieves data from the database.
Data Transaction Language (DTL) manages database transactions.
[SQL Sublanguages] What is the purpose of the Data Control Language (DCL)?
Data Control Language (DCL) controls database user access.