CompTIA ITF+, Chapter-7
You have created a relational database. Which of the following elements uniquely identifies a record in the database? A. Primary key B. Foreign key C. Schema D. Field
A - A primary key is one or more fields whose data is used to uniquely identify a record.
You have an address book for a small business with contact information for about 100 clients. The address book is used by two people. Which solution should you use to store the data? A. Spreadsheet B. Relational database C. Word processing software D. Nonrelational database
A - For a small number of rows, with only two people accessing the data, a spreadsheet is fine in this situation.
Rachel, a database administrator, has created a database for her website. It contains pictures of vacations that people have uploaded. In the database, pictures have associated information about who uploaded them and the date. What is this an example of? A. Semistructured data B. Nonstructured data C. Structured data D. Schema definition
A - Pictures by themselves would be nonstructured data, but since metadata is included, these pictures are classified as semistructured data.
George needs to remove a customer's information completely from a table. Which command should he use? A. DELETE B. DROP C. ALTER D. UPDATE
A - The DELETE command is used to remove records (rows) from a table.
Peter is accessing a database using a JDBC connection. Which of the following terms best describes the type of access he is using? A. Direct/manual access B. Programmatic access C. User interface/utility access D. Query/report builder
A - Using a JDBC connection to a database is an example of direct access.
Joe creates a database. What does he need to do next to make it usable? A. Enable permissions B. Import data C. Run queries D. Create forms
B - After a database is created, data needs to be imported or inputted.
Oscar's user account has been granted permissions to view a database. Nathan then uses the deny command in an attempt to deny Oscar the ability to view the database and applies it to a group to which Oscar belongs. Which of the following statements is true? A. Oscar will still be able to view the database because a grant overrides a deny. B. Oscar will no longer be able to view the database because a deny overrides a grant. C. Oscar will no longer be able to view the database, because the deny cancels the grant, giving Oscar no specific permissions. D. Oscar will still be able to view the database because granted permissions must be removed with the revoke command.
B - Oscar will not be able to view the database because if there is a permission conflict, a specific deny overrides a specific grant.
Kate, a database administrator, needs to add records into a database. Which command should she use? A. CREATE B. INSERT C. ALTER D. UPDATE
B - The INSERT command is used to insert records into an existing table.
A database developer is working on generating queries. If the developer needs to ensure that the output of the query has data persistence, to where should the data be written? A. RAM B. Cache C. SSD D. CPU
C - Data persistence means that the data is permanently available. Hard drives store data in a persistent way, so the answer is SSD.
Laura, your manager, instructs you to remove a table from a database permanently. Which command should you use? A. DELETE B. REMOVE C. DROP D. ALTER
C - Sometimes you need to delete tables or databases, and in database terms this is known as dropping. The DROP command is used for dropping a database or a table in a database.
A school has a database with four tables, but it needs a fifth table. Which command is used to accomplish this task? A. INSERT B. UPDATE C. CREATE D. ALTER
C - The CREATE TABLE command is used to create new tables in a database.
A medical office needs to create a solution to manage patient records. They have about 10,000 patients and eight staff, they want to include notes from medical professionals, emails to and from patients, and images such as X-rays. What should they create? A. Spreadsheet B. Relational database C. Nonrelational database D. Primary key
C - With different types of data, including images, the best choice for a database is a nonrelational database such as a document database or a key/value database.
Which of the following consists of columns and rows of numerical or text data? A. Document database B. Key/value database C. Database dump D. Relational database
D - A relational database has structured data, which is predictable and organized, with tables containing columns and rows of text or numerical data.
Mary, an administrator, creates a field and designates it to hold integer data. Joe, a user, tries to enter his name into the field, but it doesn't let him save the data. What is this an example of? A. Schema rules B. Primary key C. Foreign key D. Constraints
D - Constraints can be placed on fields such that they will accept only certain types of data. For example, if a field is set to accept only integers, users will not be allowed to enter in text data.
Which of the following descriptions best describes the type of structure that stores values as blobs? A. Relational database B. Nonrelational database C. Document database D. Key/value database
D - In a key/value database, data is represented as a collection of key/value pairs. Keys are an arbitrary string of characters, such as filename or a URL, and must be unique. Values are stored as blobs, meaning that they don't conform to a schema.
A user, Ann, is granted permissions to access a database. What is this an example of? A. Data collection B. Data manipulation C. Direct/manual access D. Data definition
D - Permissions are considered part of data definition.
Henry wants to understand which of his customers has purchased part number BB8. Which command should he use? A. QUERY B. FIND C. SEARCH D. SELECT
D - The SELECT command is used to create queries to search for data.
An employee at your office just got married and changed their last name. Which command do you use to change their last name in the employee database? A. EDIT B. MODIFY C. ALTER D. UPDATE
D - The UPDATE command is used to update existing data in the database.
Michael, an administrator, needs to add a column to an existing table. Which command should he use? A. INSERT B. UPDATE C. CREATE D. ALTER
D - You can use ALTER to add, delete, and modify columns.
Which of the following statements most accurately describes what a primary key refers to? A. A schema in a database B. A table in a schema C. A field in a table D. A record in a table
D, (C) - A primary key is one or more fields whose data is used to identify a record uniquely. They are required, and there can be only one primary key per table.