









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A comprehensive set of questions and answers related to database design, covering topics such as database systems, sql statements, er diagrams, and database administration. It includes questions on specifying requirements, data formats, mysql usage, query languages, schema design, transaction processing, data independence, and database architecture. The material is suitable for students studying database management systems and preparing for exams or quizzes. It also covers relational database models, primary and foreign keys, entity-relationship modeling, and sql statements for data manipulation and definition, offering a solid foundation for understanding database concepts and practices.
Typology: Exams
1 / 17
This page cannot be seen from the preview
Don't miss anything!










The analysis phase of database design includes which process? - ANS-Specifying requirements that are not dependent on a specific database system. When data is produced and stored as numeric, textual, or visual information, it varies in _____.
When using the MySQL Command-Line Client, which character ends a command? - ANS-; In the following ER diagram, what does 'AlbumTitle' represent? - ANS-Attribute Which role focuses on creating software that interacts with a database? - ANS-Programmer In terms of database architecture, which component translates the query processor instructions into low-level file-system commands and is responsible for indexing the data? - ANS-Storage manager A user creates a table by using a SQL statement. The data type VARCHAR(11) is part of the statement. What does the value of (11) represent? - ANS-The number of characters allowed for the data type. When using a SQL statement to create a table, which data type is used to store a fractional value? - ANS-DECIMAL A database administrator uses which two SQL statements to view and then modify existing customer balances with a late fee? - ANS-SELECT, UPDATE When using the MySQL Workbench GUI, which icon will execute an SQL statement? - ANS- Lightning bolt Which database role focuses on database storage, response times, and optimization? - ANS- Designer Which type of database system is optimized for big data? - ANS-NoSQL Which principle defines data independence? - ANS-Physical design never affects query results. Which concept relates to software that reads and writes data in a database? - ANS- Management system How does a database system protect data when concurrent transactions occur? - ANS- Preventing multiple transactions with the same data at the same time. When a user interacts with a database, they can use a _____ to modify data with commands. - ANS-query language Refer to the Teacher and Class tables. To maintain referential integrity, which foreign key action rejects the deletion of the row containing Rosa Lopez? - ANS-RESTRICT In a relational database model, which concept refers to a finite sequence of values that are derived from defined domains? - ANS-Tuple
In MySQL, what is the result of TRUE AND NULL? - ANS-NULL What is the result of a relational operation? - ANS-Table A foreign key in which all columns are NULL is known as a _____ foreign key? - ANS-fully NULL Evaluate the given data and determine the correct result from the statement. - ANS- 485 In a relational database model, an attribute refers to which concept? - ANS-A uniquely named tuple position A NULL value represents _____ data. - ANS-missing A _____ is a collection of values with no inherent order. - ANS-set A _____ is a collection of values that are of the same type. - ANS-column What is converted into 0, 1, and M specifications during database design? - ANS-business rules When an entity-relationship model diagram is implemented within SQL, entities typically become _____, and relationships typically become _____. - ANS-tables, foreign keys A database team plans the creation of a new database. During which phase does the team capture data requirements? - ANS-Analysis A database designer interviews a sales team that will be using a new database. During the interview, the designer documents entities as _____, and relationships as _____. - ANS-nouns, verbs Paperback and hardcover books are mutually exclusive subsets of books. PaperBackBook and HardCoverBook _____ the supertype entity Book. - ANS-partition During database design, an entity with many optional attributes often becomes a(n) ______ entity. - ANS-Supertype A relationship minimum is the least number of instances of one entity that relates to a single instance of another entity. On an ER diagram, minima are usually specified as a _____ or _____.
How are attributes documented in an entity-relationship diagram? - ANS-Within an entity rectangle. What is the greatest number of instances of one entity that can relate to a single instance of another entity? - ANS-Maximum What is the purpose of an entity synonym? - ANS-To reflect common name usage of the entity. When an entity-relationship model is implemented in SQL, an entity typically becomes a _____.
UPDATE, SELECT, and ORDER BY are _____ in an SQL statement. - ANS-keywords What does SQL stand for? - ANS-Structured Query Language Choose the best data types to replace XXX and YYY. - ANS-VARCHAR(50), DECIMAL(8, 2) A _____ is a type of UNIQUE constraint applied to two or more columns. - ANS-table-level constraint Which language defines statements used for creating and dropping tables? - ANS-Data Definition Language Which SQL statement adds a new column Fax to the Supplier table? Correct! - ANS-ALTER TABLE SupplierADD Fax VARCHAR(30); A _____ constraint is used to define a column value that is not NULL when no value is provided.
Which table type interleaves rows of two or more tables in the same storage area? - ANS-Table clusters Which table type might use the modulo function to scramble row locations? - ANS-Hash A column contains grades from 0 to 10, but a WHERE clause specifies values from 0 to 100. A _____ index can be used to modify the column values and process the queries. - ANS-function In a logical index, pointers to table blocks are replaced with _____ values. - ANS-primary key What are two characteristics of an efficient bitmap index? - ANS-The database can quickly determine the block containing a table row from the index row number. Any indexed column contains relatively few distinct values. Which of the following is a characteristic of a B-tree index, but not a B+tree index? - ANS- Column values do not repeat at lower levels. The bottom level of a multi-level index is a _____index. - ANS-sorted single-level How are blocks read with a single-level index scan? - ANS-A scan reads all index blocks to find table blocks that contain selected rows. The table blocks are then read. A single-level index is a file that contains column values and pointers to _____ containing the column _____. - ANS-rows, value A relational database uses row-oriented storage to store an entire row within one _____. - ANS- block The sort column in a sorted table determines the _____ row order. - ANS-physical What are the performance characteristics of a heap table? - ANS-Insert, delete, and update operations are optimized, but not read operations. When working with multi-tables, a column that is available in all interleaved tables is known as a _____? - ANS-cluster key What is the fan-out for a multi-level index where index entries are 32 bytes and index blocks are 10 kilobytes? - ANS-Approximately 300 When performing a search, which scan type is fastest? - ANS-Index The time required to read or write the first byte of data is known as _____. - ANS-access time
In an online bank application that transfers funds from a checking account to a savings account, the _____ property ensures that the changes made to each account will not be lost due to a computer failure. - ANS-durability In which isolation level can dirty reads occur? - ANS-Read uncommitted Refer to the sequence below. What is the isolation level of transaction E? - ANS-Repeatable read Refer to the table and schedule below. The UPDATE statement in transaction T1 holds an exclusive lock on the Class table. With strict two-phase locking, when does the SELECT statement in transaction T2 execute? - ANS-After the ROLLBACK statement in T1 executes Refer to the schedule below. The initial value of B is 7 and C is 3. What is the value of A after the schedule executes? - ANS- 8 In an online bank application that transfers funds from a checking account to a savings account, the _____ property ensures that another transaction sees the transferred funds in one account or the other, but not in both, nor in neither. - ANS-isolation In a _____, all transactions come to a halt and remain at a standstill until one of the transactions is aborted. - ANS-deadlock In an online bank application that transfers funds from a checking account to a savings account, if a debit is made successfully from the checking account, the _____ property ensures that the corresponding credit is made to the savings account. - ANS-atomicity _____ allows all executed database instructions to be rolled back and to be restored in a prior transaction state. - ANS-SAVEPOINT A database administrator is updating one of the tables in the database. Which of the following techniques can prevent other database administrators from doing concurrent transactions to the same table? - ANS-Locking In the recovery log below, line 6 is a/an _____. - ANS-compensation record The username and password for the database in the configuration file of a web application is incorrect, so the web application cannot connect to the database. Which failure scenario best describes this example? - ANS-Transaction failure Refer to the initial Class table, SQL transaction, and final Class table, below. Which SAVEPOINT identifier is used to produce the final Class table? - ANS-S
A document that sequentially writes all the database operations is known as a/an _____. - ANS- recovery log A transaction _____ indicates the starting and ending statement of a database transaction. - ANS-boundary An operational database contains tables in third normal form. This design reduces _____. - ANS- redundancy When concurrently processing instructions, a shared memory computer works well with a common data set in a _____ memory space. - ANS-single Due to infrequent updates, many distributed databases use a _____ catalog. - ANS-replicated An organization deploys computer processing power and storage through a cloud provider's _____ services. - ANS-IaaS Which MySQL layer interacts directly with database users and administrators? - ANS-Tools A retailer is using a cloud-based transaction database and is experiencing sales fluctuations through the year. The ability for cloud resources to adapt to such change in utilization is called _____. - ANS-elasticity For integrity purposes, a distributed transaction requires all or _____ nodes to be updated in order to complete the transaction. - ANS-no In the query processor layer, the query optimizer generates a/an _____. - ANS-execution plan For reporting purposes, an organization establishes a(n) _____, which is separate from the operational database. - ANS-data warehouse During a data _____ phase, a database administrator refreshes a data warehouse and replaces incompatible keys with consistent values. - ANS-integration Operational data changes _____, while analytic data is updated _____. - ANS-in real time, at fixed intervals Which of the following is NOT a replica type? - ANS-Query A buffer manager retains _____ from the _____ to reduce data access time. - ANS-data blocks, file system Which MySQL component retains data blocks from storage in main memory for possible reuse?
In MySQL, spatial values _____ numeric values. - ANS-must be converted to numeric values using spatial functions prior to comparing with A complex type _____. - ANS-has a richer internal structure than a simple type How many types are possible for elements of a JSON document? - ANS- 6 The PosgreSQL ARRAY type is an example of a _____ type. - ANS-collection In Oracle Database, the object type _____. - ANS-can define either an individual column or an entire table In MySQL, a column has a SET type with 16 possible elements. How many bytes does each column value require? - ANS- 2 Which of the following does NOT appear in the Oracle Database's CREATE TYPE statement below? - ANS-Function body Elements can be nested in _____. - ANS-both XML and JSON Geographic data is _____. - ANS-defined with reference to the surface of the earth MySQL stores JSON values as _____. - ANS-an internal binary format MONEY is an example of a _____ type. - ANS-semantic What is wrong with the syntax of this XML? - ANS-The XML syntax is correct. A user-defined type is defined in terms of a _____ type. - ANS-base Elements of the _____ type can be repeated and are not ordered. - ANS-MULTISET How many bytes does POINT(18.5 - 20) require in internal MySQL format? - ANS- 24 One goal of object-relational database technology is to _____. - ANS-simplify database programming Which type is complex? - ANS-JSON What is the difference between the ENUM type and the SET type? - ANS-Each ENUM value has exactly one element, each SET value can have many elements. An R-tree has a ____ index with index entries containing ____. - ANS-multi-level, MBRs
In two dimensions, a minimum bounding rectangle is the _____? - ANS-the smallest rectangle aligned with the X- and Y-axes that contains a spatial value Which of the following database programming techniques is commonly used with object- oriented programming languages? - ANS-API Which of the following Connector/Python cursor properties returns the number of items affected by a query? - ANS-cursor.rowcount An application may use a _____ API, which in turn uses a _____ API to access unsupported data sources. - ANS-primary, secondary Database queries are commonly implemented using a declarative programming language because of which two main reasons? - ANS-Easier programming and faster execution A/An _____ will retrieve rows from a query that has multiple rows in the result set. - ANS- cursor API defines ____ for applications written in a procedural programming language and _____ for applications in object-oriented languages. - ANS-procedure calls, classes Which of the following is an example of database programming? - ANS-Creating a web application using Java and SQL In database APIs, ____ a query is a term used when compiling happens before executing the query. - ANS-preparing Which of the following database programming techniques is an extension of the SQL language that is typically used for database applications? - ANS-Procedural SQL Programming languages fall into either _____ or _____ paradigms. - ANS-imperative, declarative _____ allows a programmer to create an SQL query with a PREPARE statement at run-time. - ANS-Dynamic SQL In a Connector/Python program, the _____ method prevents _____, which is a type of attack that causes a program to execute malicious SQL statements. - ANS-cursor.execute(), SQL injection Which statements should replace XXX and YYY in the Connector/Python program? - ANS- row[1], row[0]
A NoSQL database that represents data using XML or JSON is called a _____ database. - ANS- document In a MongoDB shell, what happens when the following command executes? db.movies.insert({ name: "What About Bob?", year: 1991 }) - ANS-The document is added to the collection with a generated _id A _____ database stores related data as column families. - ANS-wide column A document database stores data as _____, while a relational database stores data as _____. - ANS-collections, tables Which approach splits data sets across multiple systems? - ANS-Sharding What is a characteristic of hash structure in a key-value database? - ANS-Buckets are stored on different machines, enabling horizontal scaling. Within each row of a wide column database, all columns of a family are stored ____ to optimize performance of read queries. - ANS-contiguously Which document type is commonly used by document databases? - ANS-XML A primary replica has failed in a document database. What happens as a result? - ANS-A secondary replica becomes active Which information would be acceptable in a key-value database? - ANS-Key = car make, value = Ford In a document database, a ________ assigns documents to shards. - ANS-It is NOT key-value A wide column database is similar to a relational database except that it does not support _____. - ANS-foreign keys and joins Which wide-column database has no single point of failure and is always available? - ANS- Cassandra Vertices in a graph database are similar to _____ in a relational table. Which language is created specifically for graph databases? - ANS-Gremlin Vertices in a graph database are similar to _____ in a relational table. - ANS-rows A database designer depicts a database as a graph with _____ representing entities. - ANS- vertices
Which graph database physical structure might combine a graph and a relational database? - ANS-Layered Strict consistency is enforced in some document databases by directing read queries to _____. - ANS-the primary replica In the MongoDB query, how is every student EXCEPT Larry selected? { name: { _____: _____ } } - ANS-$ne, "Larry" A NoSQL database that represents data as a key with multiple values is called a _____ database.