1. Introduction to Databases Flashcards

1
Q

What is data?

A

Data is numeric, textual, visual, or audio information that describes real-world systems.

Data is used for various tasks such as forecasting weather and analyzing financial investments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Name the important ways data can vary.

A
  • Scope
  • Format
  • Access

Scope pertains to the amount of data, format refers to the type of data (numbers, text, etc.), and access relates to whether data is private or public.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the historical difference between analog and digital data?

A

Historically, data was mostly analog, while today it is mostly digital, encoded as zeros and ones.

Analog data was stored on physical media like vinyl disks and celluloid tapes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a database?

A

A database is a collection of data in a structured format, typically stored on computers.

Databases ensure that similar data is stored in a standardized manner.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a database management system (DBMS)?

A

A DBMS is software that reads and writes data in a database, ensuring data security and availability.

DBMSs are complex due to the challenges of managing large databases with many users.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a query?

A

A query is a request to retrieve or change data in a database.

Query languages are specialized for efficient interaction with databases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does a database application do?

A

A database application helps business users interact with database systems.

It simplifies user experience and ensures efficient and secure data access.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Fill in the blank: A _______ is a request to retrieve or change data in a database.

A

query

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What roles interact with databases?

A
  • Database Administrator
  • Database Designer
  • Database Programmer
  • Database User

Each role has specific responsibilities related to database management and use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the responsibility of a database administrator?

A

A database administrator secures the database system against unauthorized users and manages user access.

They enforce procedures for database availability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does a database designer do?

A

A database designer determines the format of each data element and the overall database structure.

This role balances priorities like storage and response time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the difference between a database programmer and a database user?

A

A database programmer develops applications using database query languages, while a database user consumes data from the database.

Users typically interact through applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the limitations of file systems compared to database systems?

A
  • Performance
  • Authorization
  • Security
  • Rules
  • Recovery

File systems cannot adequately manage large, complex databases with many users.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a transaction in the context of databases?

A

A transaction is a group of queries that must be either completed or rejected as a whole.

This ensures data consistency and correctness.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

True or False: A transaction can be partially completed.

A

False

All queries in a transaction must succeed or fail together to maintain data integrity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the role of a database user?

A

A database user requests, updates, or generates reports from stored data.

Users can access databases via applications or directly submit queries.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Fill in the blank: A _______ is responsible for defining the detailed database design.

A

database designer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What does a database system ensure regarding data?

A

Database systems ensure data is consistent with structural and business rules.

This includes synchronizing multiple copies of data across locations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is a transaction in database systems?

A

A group of queries that must be either completed or rejected as a whole.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What happens if some queries in a transaction succeed while others fail?

A

It results in inconsistent or incorrect data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What must database systems ensure when processing transactions?

A
  • Transactions are processed completely or not at all
  • Prevent conflicts between concurrent transactions
  • Ensure transaction results are never lost
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

True or False: A transaction must process either both queries or neither query.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is the role of the transaction manager in a database system?

A

Ensures transactions are properly executed and restores the database to a consistent state in case of failure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is the purpose of the log in a database system?

A

Contains a complete record of all inserts, updates, and deletes processed by the database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What is the catalog in a database system?

A

A directory of tables, columns, indexes, and other database objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Fill in the blank: The SQL stands for ______.

A

Structured Query Language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What are the four common types of database queries?

A
  • Insert
  • Select
  • Update
  • Delete
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What does a select query do in a database?

A

Retrieves information from the database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

True or False: An update query can update data that isn’t in the database.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What is a key characteristic of relational databases?

A

Stores data in tables, columns, and rows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

What is a distinguishing feature of NoSQL databases?

A

Optimized for big data generated on the internet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

What does CRUD stand for?

A

Create, Read, Update, Delete

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

True or False: All relational database systems support SQL.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

What are the key components of a database system architecture?

A
  • Query Processor
  • Storage Manager
  • Transaction Manager
  • Log
  • Catalog
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

What is the function of the storage manager in a database system?

A

Translates query processor instructions into low-level file-system commands.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

Fill in the blank: The term NoSQL originally meant ‘______’.

A

does not support SQL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

What type of database system has become popular since 2000?

A

Open source database systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

What happens to transactions in the event of a system failure?

A

The transaction manager and log are necessary to restore the database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

True or False: SQL was first developed at Microsoft.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

What does the acronym ANSI stand for in relation to SQL?

A

American National Standards Institute

41
Q

What is the primary purpose of an INSERT statement in SQL?

A

Inserts rows into a table.

42
Q

What does a DELETE statement do in SQL?

A

Deletes rows from a table.

43
Q

What is the preferred pronunciation of SQL?

A

‘S-Q-L’

44
Q

What does the Account table in a bank database contain?

A

Three columns: ID, Name, and Balance

45
Q

What does the INSERT statement do in SQL?

A

Adds a new row to a table

46
Q

What is the purpose of the SELECT statement?

A

Retrieves data from a database

47
Q

What is the effect of the following UPDATE statement: UPDATE Account SET Balance = 4500 WHERE ID = 831?

A

Changes Raul’s balance from 3300 to 4500

48
Q

What does the DELETE statement do in SQL?

A

Removes rows from a table

49
Q

Fill in the blank: The SQL CREATE TABLE statement creates a new table by specifying the table and _______.

A

column names

50
Q

What data type does INT represent in SQL?

A

Stores integer values

51
Q

What does VARCHAR store in SQL?

A

Textual values

52
Q

Fill in the blank: The logical design phase converts entities, relationships, and attributes into ______, keys, and columns.

53
Q

What is depicted in an ER diagram?

A

Entities, relationships, and attributes

54
Q

True or False: The logical design phase is specific to a database system.

55
Q

What does data independence allow database designers to do?

A

Tune query performance without changing application programs

56
Q

What is an API in the context of database programming?

A

A library of procedures or classes linking a programming language to a database

57
Q

Fill in the blank: The physical design phase specifies how tables are organized on _______.

A

storage media

58
Q

What is MySQL?

A

A leading relational database system sponsored by Oracle

59
Q

What are the two editions of MySQL?

A
  • MySQL Community (free edition)
  • MySQL Enterprise (paid edition)
60
Q

True or False: SQL is a general-purpose programming language.

61
Q

What is the main function of a cursor in database programming?

A

Extract individual rows of query results

62
Q

What does the CREATE INDEX statement do?

A

Adds indexes to a database for optimization

63
Q

Fill in the blank: An entity is a ______, place, activity, or thing.

64
Q

What does the term ‘schema’ refer to in database design?

A

The logical design specified in SQL and depicted in a table diagram

65
Q

What is the significance of the solid bullet in a table diagram?

A

Indicates key columns

66
Q

What is the purpose of the analysis phase in database design?

A

Specifies database requirements without regard to a specific database system

67
Q

What does the DELETE statement do when the WHERE clause specifies an ID that does not exist?

A

Deletes no rows

68
Q

True or False: The physical design phase affects query results.

69
Q

What type of data does the DECIMAL data type store?

A

Fractional numeric values

70
Q

What is the first step in the database design process for large, complex databases?

A

Analysis phase

71
Q

What SQL command is used to create a new table?

A

CREATE TABLE

72
Q

What does the SELECT statement retrieve from the Account table?

A

Names of accounts with a balance larger than $3000

73
Q

What is the purpose of the WHERE clause in SQL statements?

A

Specifies conditions for data retrieval or manipulation

74
Q

What is the significance of the empty bullet in a table diagram?

A

Indicates columns that refer to keys

75
Q

True or False: The CREATE TABLE statement includes data types for each column.

76
Q

What is MySQL Server Community?

A

A free edition suitable for non-commercial applications such as education.

77
Q

What is MySQL Enterprise?

A

A paid edition for managing commercial databases that includes MySQL Server and additional administrative applications.

78
Q

Which version of MySQL Server is this book based on?

A

MySQL Server release 8.0.

79
Q

What is the title of the MySQL documentation page?

A

MySQL Documentation.

80
Q

List the six documentation categories in MySQL documentation.

A
  • General
  • Administrator Guide
  • Developers and Functionality
  • HA/Scalability
  • Connectors and APIs
  • MySQL Enterprise
81
Q

What are the subcategories of the General category?

A
  • Getting started with MySQL
  • Tutorial
  • Server administration
  • SQL syntax
  • InnoDB storage engine
  • Alternative storage engines
  • Server option/variable reference
  • MySQL release notes
  • MySQL version reference
  • FAQs
82
Q

What does the Administrator Guides category include?

A
  • Installation and upgrades
  • MySQL server-tool compatibility
  • MySQL yum repository
  • Quick guides for MySQL yum, APT, and SLES repository
  • Installation using unbreakable Linux network (ULN)
  • MySQL installer
  • Security
  • Secure deployment guide
  • Startup/shutdown
  • Backup and recovery overview
  • Platform guides
  • Building from source
  • MySQL port reference
83
Q

What subcategories are included in the Developers and Functionality category?

A
  • MySQL workbench
  • MySQL as a document store
  • Globalization
  • Optimization
  • Functions and operators
  • Views and stored programs
  • Partitioning
  • Precision math
  • Information scheme
  • Performance scheme
  • Spatial extensions
  • Restrictions and limitations
84
Q

What are the subcategories in the HA/Scalability category?

A
  • MySQL InnoDB cluster
  • MySQL NDB Cluster 8.0 (GA)
  • MySQL NDB Cluster 7.5/7/6 (GA)
  • MySQL NDB Cluster 7.3/7/4 (GA)
  • Memcached
  • Memcached with NDB cluster
  • Memcached with InnoDB
  • Replication
  • Semisynchronous replication
85
Q

What is included in the Connectors and APIs category?

A
  • Connectors and APIs
  • Connector/J
  • Connector/ODBC
  • Connector/NET
  • Connector/Python
  • PHP
  • C API
  • Connector/C++
  • MySQL for Excel
  • MySQL Notifier
  • MySQL for Visual Studio
  • NDB Cluster API developer guide
86
Q

What subcategories does MySQL Enterprise include?

A
  • MySQL Enterprise Edition
  • MySQL Enterprise Monitor
  • Oracle Enterprise Manager for MySQL Database
  • MySQL Enterprise Backup
  • MySQL Enterprise Security
  • Secure Deployment Guide
  • MySQL Enterprise Encryption
  • MySQL Enterprise Audit
  • MySQL Enterprise Firewall
  • MySQL Thread Pool
87
Q

What must a user enter when installing MySQL Server?

A

A password for the root account.

88
Q

How does MySQL Server run after installation?

A

As a service in the background.

89
Q

What command starts the MySQL Command-Line Client?

A

mysql -u root -p

90
Q

What does the MySQL Command-Line Client allow developers to do?

A

Connect to the database server, perform administrative functions, and execute SQL statements.

91
Q

What happens when an SQL statement is syntactically incorrect?

A

MySQL Server returns an error code and description.

92
Q

True or False: The root account password is set when installing MySQL.

93
Q

True or False: The database server must be manually started each time the user runs the MySQL Command-Line Client.

94
Q

What allows some developers to interact with MySQL Server via a graphical interface?

A

MySQL Workbench.

95
Q

What does the SQL query panel in MySQL Workbench do?

A

Where the user enters SQL statements.

96
Q

True or False: MySQL Workbench and MySQL Command-Line Client both allow the user to type SQL statements.

97
Q

True or False: The SQL statements in the SQL query panel are executed until the lightning bolt is clicked.

98
Q

What databases are shown in the MySQL Workbench Navigator sidebar?

A

The company, sys, and world databases.