Databases Flashcards
Objective 5
Given the info: Which of the following is descriptive of both tables?
Table A
ID Name
01 John
02 Ann
Table B
ID Address Phone Number
01 5555 John Lane 555-555-1234
02 7777 Ann Boulevard 777-777-4321
A. The database uses a flat file structure.
B. The database uses SQL.
C. The data most likely exists within a relational database.
D. The data is corrupted and is being shown as two sets.
C. The data most likely exists within a relational database.
Both tables A and B exhibit a relational structure. They contain related data organized into rows and columns, with a common identifier (ID) linking the records in the tables. This structure is characteristic of relational databases, where data is organized into tables, and relationships between tables are established using keys.
Which of the following is an advantage of a flat file?
A. Variety of data
B. Scalability
C. Portability
D. Multiple concurrent users
C. Portability
A, B, D are found more in databases and are reasons to use them vs file
A flat file is a type of database that stores data in a plain text file format. One advantage of using flat files is portability. Since flat files are stored in a simple text format, they can be easily transferred or moved between different systems and platforms without compatibility issues. This portability makes flat files convenient for sharing data between different applications, operating systems, and environments
Within a database, which of the following would be the best access method to use to display a subset of a table?
A. UPDATE
B. DROP
C. SELECT
D. INSERT
C. SELECT
In a database, the SELECT statement is used to retrieve data from one or more tables. It allows users to specify which columns and rows they want to retrieve by using various filtering and sorting criteria. When you want to display a subset of a table, the SELECT statement is the best access method to use.
Which of the following actions is most likely associated with database use?
A. Creating diagrams
B. Querying
C. File sharing
D. Printing
B. Querying
Querying is the process of retrieving specific data from a database by using queries, which are commands or statements written in a database query language such as SQL (Structured Query Language). Queries allow users to search, filter, and retrieve data based on specified criteria, enabling them to extract meaningful insights or information from the database.
Which of the following database structures is the most granular?
A. Column
B. Field
C. Record
D. Table
B. Field
In a database, the most granular structure refers to the smallest unit of data that can be accessed and manipulated. A field is the smallest unit of data in a database, representing a single attribute or characteristic of an entity. For example, in a database table storing information about employees, fields may include “EmployeeID,” “FirstName,” “LastName,” “Email,” etc. Each field represents a specific piece of information about the entity being stored. Therefore, the field is the most granular database structure among the options provided.
Which of the following describes the concept of a database record?
A. A collection of rows, columns, and constraints
B. A collection of fields about the same object
C. A collection of schemas within the same database
D. A collection of tables within different schemas
B. A collection of fields about the same object
A database record, also known as a row or tuple, is a collection of related data fields (also known as attributes or columns) that are organized together to represent a single entity or object within a database table. Each record typically contains information about a specific instance or entity, such as a person, product, transaction, etc. Therefore, option B, “A collection of fields about the same object,” best describes the concept of a database record.
The output of a query in a relational database is most likely used to generate:
A. a report.
B. a schema.
C. storage.
D. scalability.
A. A report
In a relational database, a query is used to retrieve specific data from one or more tables based on certain criteria. The output of a query typically consists of a set of records or rows that meet the specified conditions. This data is often used to generate reports, which are organized presentations of information that provide insights or summaries for decision-making purposes. Reports can take various forms, such as tables, charts, graphs, or narratives, depending on the requirements of the stakeholders.
Which of the following language types is MOST likely used to retrieve data from a database?
A. Query language
B. Scripted language
C. Assembly language
D. Compiled language
A. Query Language
A query language, such as SQL (Structured Query Language), is specifically designed for retrieving data from databases. SQL allows users to interact with databases by querying and manipulating data, retrieving specific information based on criteria specified in the query.
Which of the following is an element of a NoSQL database?
A. Primary keys
B. Constraints
C. Schema
D. Tables
E. Delimiters
A. Primary Keys
NoSQL databases use primary keys to uniquely identify documents or records within a database. This concept is similar to relational databases, although the way primary keys are used can vary between different types of NoSQL databases (e.g., key-value stores, document stores).”
B. Constraints: Constraints are more commonly associated with relational databases to enforce rules on the data. NoSQL databases generally have more flexible schemas and fewer constraints.
C. Schema: NoSQL databases are often schema-less or have a flexible schema. They do not enforce a fixed schema like relational databases do.
D. Tables: NoSQL databases typically do not use tables. Instead, they use other structures such as collections (document stores), key-value pairs, or graphs, depending on the type of NoSQL database.
E. Delimiters: Delimiters are not a fundamental concept in NoSQL databases. They are more relevant to data formats or parsing rather than database structure.
A user needs all of the data from a database, including the structure of the objects, the users, and the statistics. Which of the following is the BEST method to obtain this information?
A. A query
B. A report
C. A dump
D. A script
C. A Dump
A database dump is a snapshot of the entire database, including its structure (schema), data, users, and other related information. It typically generates a file containing SQL statements or data in a specific format that can be used to recreate the database or transfer it to another system. A dump provides a comprehensive backup of the database, making it suitable for obtaining all the required information.
Which of the following is MOST often used to retrieve data from a relational database?
A. DELETE
B. ALTER
C. QUERY
D. IMPORT
C. Query
Retrieve Data
In a relational database, data retrieval is most commonly performed using queries. A query is a request for information from a database, typically expressed in a structured query language (SQL) such as SELECT statements. Queries allow users to retrieve specific data based on specified criteria.
DELETE statement in SQL is used to remove rows from a table based on specified conditions. However, DELETE is not primarily used for retrieving data; its primary function is to remove data from the database.
ALTER statement in SQL is used to modify the structure of a database table, such as adding, modifying, or dropping columns. It is not primarily used for retrieving data.
A database administrator needs to add a record to an existing table. Which of the following statements would the administrator MOST likely use?
A. INSERT
B. SELECT
C. UDATE
D. DELETE
A. Insert
add a record to a table
The database administrator would most likely use the INSERT statement to add a record to an existing table in the database. The INSERT statement is specifically designed to insert new rows of data into a table.
The SELECT statement is used to retrieve data from one or more tables in a database, not to add new records.
The UPDATE statement is used to modify existing records in a table, not to add new records.
The DELETE statement is used to remove existing records from a table, not to add new records.
A company expects to gather increasingly large amounts of information, which need to be accessed quickly by employees. Which of the following is the MOST appropriate method to store the information?
A. Spreadsheet
B. Flat file
C. Network shared folder
D. Database
D. Database
large amounts of data, access quickly by employees
A database is the most appropriate method for storing large amounts of information that need to be accessed quickly by employees. Databases are designed to efficiently manage and organize data, allowing for fast retrieval and manipulation of information. They provide features such as indexing, querying, and data integrity mechanisms, which are essential for handling large datasets effectively.
Flat files are simple text files that store data without any structure or organization. While they may be suitable for small amounts of data, they are not well-suited for managing large volumes of information efficiently.
A user wants to create a link between two tables in a database. Which of the following is the user MOST likely to use?
A. Primary key
B. Index
C. Foreign key
D. Constraint
C. Foriegn Key
foriegn keys refer back to the primary key
A foreign key is the database attribute that establishes a relationship between two tables in a relational database. It links a field in one table to a field in another table, typically referencing the primary key of the related table. This relationship ensures referential integrity and enables the enforcement of constraints such as data consistency and integrity between related tables.
A music studio needs to store artist data as text, demos as MP3 files, and sheet music as PDF files in an organized and easily searchable format. Which of the following is BEST suited to meet this need?
A. Web page
B. List
C. Flat file
D. Database
D. Database
variety of data types
A database is the best-suited option to meet the music studio’s need to store artist data as text, demos as MP3 files, and sheet music as PDF files in an organized and easily searchable format. Databases are structured collections of data organized in tables, allowing for efficient storage, retrieval, and management of various types of data. They provide features such as indexing, querying, and relationships between data entities, making them ideal for organizing and searching through different types of data.