D426 Data Management Foundations - New Pre-Assessment

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/57

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

58 Terms

1
New cards

Which statement correctly adds the values 'Strawberry' and 'Red' for the type and color columns, respectively, in the 'fruits' table?

A. INSERT INTO fruits (type, color) VALUES ('Strawberry', 'Red');

B. INSERT INTO fruits (type, color) VALUES ('Strawberry', 'Red', 'Seedless');

C. INSERT INTO fruits (type, color) VALUES ('Red', 'Strawberry');

D. INSERT INTO fruits (type, 'Strawberry'), (color, 'Red');

A. INSERT INTO fruits (type, color) VALUES ('Strawberry', 'Red');

2
New cards

Which DROP statement deletes a column from an existing table?

A. DROP COLUMN column_name FROM table_name;

B. DROP table_name COLUMN column_name;

C. ALTER TABLE DROP COLUMN column_name FROM table_name;

D. ALTER TABLE table_name DROP COLUMN column_name;

D. ALTER TABLE table_name DROP COLUMN column_name;

3
New cards

What is an example of an expression in SQL?

A. City = 'Beijing'

B. 134

C. INSERT

D. 'Welcome'

A. City = 'Beijing'

4
New cards

What does the % operator return when using numeric values?

A. The quotient when dividing one value by another

B. The quotient when dividing one value by another

C. The additive inverse (i.e., opposite) of a value

D. The remainder when dividing one value by another

D. The remainder when dividing one value by another

5
New cards

You are inserting a new record into a table. The primary key column is using an auto-incrementing integer. What value should you specify for the primary key column in your INSERT statement?

A. Omit the primary key column from the INSERT statement

B. Include the primary key column and specify a value of 0

C. Include the primary key column and specify a negative value

D. Omit any column with an integer data type

A. Omit the primary key column from the INSERT statement

6
New cards

Which language element includes a term with a special meaning for the language processor?

A. Literal

B. Keyword

C. Identifier

D. Expression

B. Keyword

7
New cards

Which statement uses valid syntax for the DELETE statement in SQL?

A. DELETE FROM table_name WHERE condition;

B. DELETE table_name WHERE condition;

C. DELETE * FROM table_name WHERE condition;

D. DELETE FROM table_name;

A. DELETE FROM table_name WHERE condition;

8
New cards

Which SQL command uses the correct syntax to add a new employee John Doe to the Employee table?

A. INSERT INTO Employee (Name) Values ( 'John Doe' );INSERT Values INTO Employee ( 'John Doe' );

B. INSERT INTO Employee (Name) Values ( 'John Doe' );

C. INSERT Values INTO Employee ( John Doe );

D. INSERT INTO Employee (Name) Values ( John Doe );

B. INSERT INTO Employee (Name) Values ( 'John Doe' );

9
New cards

Which SQL data type should be used to store the price of a grocery item, ensuring accuracy to the cent?

A. INT

B. FLOAT

C. DECIMAL(6,2)

D. VARCHAR(2)

C. DECIMAL(6,2)

10
New cards

Which clause should be used when creating a table to ensure the 'NumEyes' column automatically receives the value 2 if no value is provided during row insertion?

A. NumEyes INT = 2

B. NumEyes INT DEFAULT 2

C. NumEyes INT (2)

D. NumEyes INT IS 2

B. NumEyes INT DEFAULT 2

11
New cards

Which data type should be used to store the coordinates of a point on a map?

A. Binary

B. Decimal

C. Document

D. Spatial

D. Spacial

12
New cards

Which property specifies an expression on one or more columns of a table?

A. CHECK

B. RESTRICT

C. CASCADE

D. UNIQUE

A. CHECK

13
New cards

What does data represent in data management?

A. Numeric, textual, visual, or audio information

B. Unprocessed, arbitrary information

C. Theoretical models and abstractions

D. Human interpretations and opinions

A. Numeric, textual, visual, or audio information

14
New cards

What is database system architecture?

A. It is the set of queries sent to the system that must be either fully completed or rejected.

B. It specifically refers to the storage layer of the system.

C. It specifically refers to the query processor of the system.

D. It describes the components of the system and how those components interact.

D. It describes the components of the system and how those components interact.

15
New cards

Which type of theory is the basis for relational data structure?

A. Set theory

B. Graph theory

C. Complex design theory

D. Entity management theory

A. Set theory

16
New cards

What is a difference between relational databases and NoSQL databases?

A. Unlike relational databases, NoSQL databases are optimized for big data.

B. Relational databases are open-source software, whereas NoSQL databases are commercial products.

C. Unlike relational databases, NoSQL databases need a predefined schema to store data.

D. Relational databases are used to store sets, whereas NoSQL databases are used to store tuples.

A. Unlike relational databases, NoSQL databases are optimized for big data.

17
New cards

Which SQL function returns the current date in YYYY-MM-DD format?

A. DATE()

B. CURDATE()

C. CURRENT()

D. PRESENT()

B. CURDATE()

18
New cards

Which SQL keyword is used to combine rows based on the same column values?

A. GROUPED

B. GROUP BY

C. HAVING

D. ORDER BY

B. GROUP BY

19
New cards

What is the function of the − (unary) operator?

A. To invert the sign of a numeric value

B. To subtract one numeric value from another

C. To match exactly one character in pattern matching

D. To compare two values for inequality

A. To invert the sign of a numeric value

20
New cards

Which SQL operator is used to combine two conditions in a query, where both conditions must be true for a row to be included in the result?

A. SYNC

B. AND

C. MERGE

D. JOIN

B. AND

21
New cards

Which SQL keyword is used to find string values that match a specified pattern?

A. LIKE

B. EQUAL

C. SIMILAR

D. BETWEEN

A. LIKE

22
New cards

Which SQL function deletes leading and trailing white space from text values?

A. STRIP

B. TRIM

C. REMOVE

D. REPLACE

B. TRIM

23
New cards

Which SQL function is used to calculate the total of numeric values in a specified column of a table?

A. SUM

B. AGGREGATE

C. COUNT

D. AVG

A. SUM

24
New cards

Which expression can be used to create a temporary name for a table?

A. SET

B. UPDATE

C. AS

D. CREATE

C. AS

25
New cards

Which wildcard character is used to represent zero or more characters when searching for a specified pattern using a LIKE operator?

A. %

B. _

C. *

D. ^

A. %

26
New cards

What is combined by an aggregate function in an SQL query?

A. An aggregate function combines the results of multiple simple functions.

B. An aggregate function combines multiple tables in its result.

C. An aggregate function combines values from a set of rows in its calculations.

D. An aggregate function combines equal values into a group and provides outcomes from each group.

C. An aggregate function combines values from a set of rows in its calculations.

27
New cards

A table named CustomerOrders in a database contains columns OrderID, CustomerID, OrderDate, and TotalAmount.

Which aggregate function should be used to determine the total number of orders placed in the current month?

A. SUM(OrderID)

B. COMPUTE(OrderID)

C. COUNT(OrderID)

D. TALLY(OrderID)

C. COUNT(OrderID)

28
New cards

Which condition must be true for two columns to be compared in a join?

A. One column must be a foreign key and the other must be a primary key.

B. The two columns must have types that can be compared with each other.

C. The two columns must have the same name.

D. One column must be a foreign key or primary key and the other must be a primary key.

B. The two columns must have types that can be compared with each other.

29
New cards

Which type of join includes a result for every row in both the left and right tables?

A. INNER JOIN

B. CROSS JOIN

C. SELF JOIN

D. FULL JOIN

D. FULL JOIN

30
New cards

Which type of join will specifically include a result for every row in the second table of the join?

A. INNER JOIN

B. LEFT JOIN

C. RIGHT JOIN

D. FULL JOIN

C. RIGHT JOIN

31
New cards

Which type of join is demonstrated by the following query?

SELECT *

FROM Make, Model

WHERE Make.ModelID != Model.ID

A. non-equijoin

B. self join

C. natural join

D. cross join

A. non-equijoin

32
New cards

Which SQL query returns a list of all flights along with their corresponding airport names, including flights that do not have a matching airport?

A. SELECT FlightNo, Airport.AirportID, AirportName

FROM Flight

LEFT JOIN Airport

ON Flight.AirportID = Airport.AirportID;

B. SELECT FlightNo, Airport.AirportID, AirportName

FROM Flight

JOIN Airport

ON Flight.AirportID = Airport.AirportID;

C. SELECT FlightNo, Airport.AirportID, AirportName

FROM Flight

RIGHT JOIN Airport

ON Flight.AirportID = Airport.AirportID;

D. SELECT FlightNo, Airport.AirportID, AirportName

FROM Flight

FULL JOIN Airport

ON Flight.AirportID = Airport.AirportID;

A. SELECT FlightNo, Airport.AirportID, AirportName

FROM Flight

LEFT JOIN Airport

ON Flight.AirportID = Airport.AirportID;

33
New cards

What happens when a column in the SELECT clause is neither included in GROUP BY nor used in an aggregate function, such as in the following query?

SELECT Author, Title, COUNT(*)

FROM Book

GROUP BY Author;

A. Only the first book title for each author will appear in query results.

B. The query will return a list of every author with a random title from their books.

C. The query will result in an error in standard SQL databases.

D. Every book will be listed with its author and a count of one in query results.

C. The query will result in an error in standard SQL databases.

34
New cards

How do the WHERE and HAVING clauses differ in terms of their use for filtering in an SQL query involving a join?

A. WHERE and HAVING are interchangeable when using a join.

B. The WHERE clause filters records before aggregation, and the HAVING clause filters records after aggregation.

C. HAVING is used with OUTER JOIN, and WHERE is used with INNER JOIN.

D. The HAVING clause filters records before aggregation, and the WHERE clause filters records after aggregation.

B. The WHERE clause filters records before aggregation, and the HAVING clause filters records after aggregation.

35
New cards

Which relationship exists between a supertype and its subtype entities?

A. Binary relationship

B. Has-A relationship

C. Unary relationship

D. Is-A relationship

D. Is-A relationship

36
New cards

What does cardinality define in an entity-relationship model?

A. The maximum number of instances one entity can relate to another

B. The minimum number of relationships an entity must have

C. The uniqueness of each individual record within a database table

D. The total number of records stored in a database system

A. The maximum number of instances one entity can relate to another

37
New cards

What does modality define in a relationship?

A. The minimum number of times an entity participates in a relationship

B. The maximum number of times an entity can participate in a relationship

C. The type of relationship between entities

D. The number of roles an entity can have in a relationship

A. The minimum number of times an entity participates in a relationship

38
New cards

What does a short bar across the relationship line in an entity-relationship (ER) diagram indicate?

A. That the entity's participation in the relationship is optional

B. That the relationship between the entities is recursive

C. That the entity represents a weak entity in the relationship

D. That the entity must participate in the relationship

D. That the entity must participate in the relationship

39
New cards

Which scenario demonstrates referential integrity in a database?

A. A customer cannot place an order unless they exist in the customer table.

B. A product has a unique identifier assigned to it.

C. A company has a list of employees stored in a single table.

D. A user is allowed to enter duplicate values in a column.

A. A customer cannot place an order unless they exist in the customer table.

40
New cards

Which strategy can be used to find primary keys when investigating data relationships?

A. Trend analysis

B. Unique identifier analysis

C. Normalization

D. Visualization

B. Unique identifier analysis

41
New cards

A telecom company tracks customer information, including name and contact details. Individual customers provide a home address, while corporate clients provide a business address. Additionally, both individual customers and corporate clients can subscribe to a premium plan that offers extra services for an additional cost.

Which entities have the HomeAddress attribute in this case?

A. IndividualCustomer and PremiumIndividualCustomer

B. PremiumIndividualCustomer and PremiumCorporateCustomer

C. IndividualCustomer and CorporateCustomer

D. CorporateCustomer and PremiumCorporateCustomer

A. IndividualCustomer and PremiumIndividualCustomer

42
New cards

What should be used to store the intersection data resulting from many-to-many relationships between two entities?

A. Junction table

B. Partition

C. Data dictionary

D. Cardinality

A. Junction table

43
New cards

Which scenario exemplifies a ternary relationship?

A. Suppliers providing products to customers

B. Students enrolled in multiple college courses

C. Authors writing books

D. Employees supervising other employees

A. Suppliers providing products to customers

44
New cards

Which relationship is an example of a unary relationship?

A. A doctor treating patients

B. Employees managing other employees

C. A product belonging to multiple categories

D. A customer placing multiple orders

B. Employees managing other employees

45
New cards

When would a database designer need to create an artificial key?

A. When there is no single column key available in the table

B. When the primary key is identical to the supertype primary key

C. When no simple or composite primary key exists in the table

D. When there is an "Is-A" relationship in the table

C. When no simple or composite primary key exists in the table

46
New cards

What is the role of a composite primary key in establishing relationships between tables?

A. To create relationships between tables by referencing primary keys

B. To identify the rows in a table using a combination of multiple columns

C. To enforce referential integrity across tables

D. To prevent data redundancy in normalized tables

B. To identify the rows in a table using a combination of multiple columns

47
New cards

Which constraint propagates any modifications made to primary keys to foreign keys?

A. CASCADE

B. SET DEFAULT

C. SET NULL

D. RESTRICT

A. CASCADE

48
New cards

Which clause, when used as part of a foreign key definition, prevents rows referenced by a foreign key from being deleted?

A. ON DELETE RESTRICT

B. ON DELETE SET NULL

C. ON DELETE CASCADE

D. ON DELETE SET DEFAULT

A. ON DELETE RESTRICT

49
New cards

Which type of key can be simple or composite while also being correctly classified as both unique and minimal?

A. Encryption key

B. Candidate key

C. Foreign key

D. Master key

B. Candidate key

50
New cards

How is an attribute defined in an Entity-Relationship (ER) model?

A. A descriptive characteristic of an entity

B. An entire table within a database schema

C. A single record of data stored in a database

D. A specific value assigned to a field in a table

A. A descriptive characteristic of an entity

51
New cards

What is the role of a data dictionary in entity-relationship models?

A. To document normalization rules and key constraints

B. To document entities, attributes, and their relationships

C. To store SQL queries for database transactions

D. To define indexing strategies for optimized query performance

B. To document entities, attributes, and their relationships

52
New cards

Which scenario represents a unary relationship in an Entity-Relationship (ER) model?

A. An employee supervises other employees within an organization.

B. A student enrolls in multiple courses.

C. A supplier provides products to a retailer.

D. A patient is prescribed multiple medications by different doctors.

A. An employee supervises other employees within an organization.

53
New cards

How is a one-to-one relationship represented between two entities in an entity-relationship diagram?

A. A crow's foot on both ends of the relationship line connecting the two entities

B. A less-than sign and a greater-than sign on each end of the relationship line connecting the two entities

C. A bar on both ends of the relationship line connecting the two entities

D. A bar on one end and a crow's foot on the other end of the relationship line connecting the two entities

C. A bar on both ends of the relationship line connecting the two entities

54
New cards

Which term is used interchangeably with secondary index in database indexing?

A. Sparse index

B. Nonclustering index

C. Sorted index

D. Binary index

B. Nonclustering index

55
New cards

Which type of index contains an entry for each record in a database table?

A. Row index

B. Column index

C. Dense index

D. Sparse index

C. Dense index

56
New cards

What is a single-level index in a database?

A. A file that stores the entire table, including the values of all columns, in an unsorted order

B. A file that is insusceptible to updates, inserts, and deletes to the table

C. A file that includes column values, as well as pointers to rows that contain the column value

D. A file that dynamically restructures itself by splitting and merging as data changes

C. A file that includes column values, as well as pointers to rows that contain the column value

57
New cards

How will the database optimize query execution if the filter factor is high?

A. It will scan the index sequentially.

B. It will look for an indexed column in the WHERE clause.

C. It will create a new table index.

D. It will perform a table scan.

D. It will perform a table scan.

58
New cards

What is the purpose of indexes in a database?

A. To reduce the required storage space

B. To quickly locate the data

C. To reduce the need for data backups

D. To speed up insert, delete, and update operations

B. To quickly locate the data