CompTIA DS0-001 CompTIA DataSys+ Certification Exam Practice Test

Page: 1 / 14
Total 80 questions
Question 1

Which of the following commands is part of DDL?



Answer : C

The command that is part of DDL is CREATE. CREATE is a SQL command that belongs to the category of DDL, or Data Definition Language. DDL is a subset of SQL commands that are used to define or modify the structure or schema of a database, such as tables, columns, constraints, indexes, views, etc. CREATE is a DDL command that is used to create a new object in a database, such as a table, column, constraint, index, view, etc. For example, the following statement uses the CREATE command to create a new table called employee with four columns:

CREATE TABLE employee (

emp_id INT PRIMARY KEY,

emp_name VARCHAR(50) NOT NULL,

emp_dept VARCHAR(20),

emp_salary DECIMAL(10,2)

);

Copy

The other options are either part of different categories of SQL commands or not SQL commands at all. For example, UPDATE is a SQL command that belongs to the category of DML, or Data Manipulation Language. DML is a subset of SQL commands that are used to manipulate or modify the data or content of a database, such as inserting, updating, deleting, or selecting data. GRANT is a SQL command that belongs to the category of DCL, or Data Control Language. DCL is a subset of SQL commands that are used to control or manage the access or permissions of users or roles on a database, such as granting or revoking privileges or roles. INSERT is a SQL command that belongs to the category of DML, or Data Manipulation Language. INSERT is a DML command that is used to insert new data into a table.Reference:CompTIA DataSys+ Course Outline, Domain 1.0 Database Fundamentals, Objective 1.2 Given a scenario, execute database tasks using scripting and programming languages.


Question 2
Question 3

A database professional is considering denormalizing a database. Which of the following documents should be used to analyze the database's structure?



Question 4

Which of the following statements contains an error?



Answer : B

The statement that contains an error is option B. This statement is missing theFROMclause, which specifies the table or tables from which to retrieve data. TheFROMclause is a mandatory clause in aSELECTstatement, unless the statement uses a subquery or a set operator. The correct syntax for option B would be:

SELECT EmpId FROM employee WHERE EmpId=90030 AND DeptId=34

Copy

The other options are either correct or valid SQL statements. For example, option A selects the employee ID from the employee table where the employee ID is equal to 90030; option C selects all columns from the employee table where the employee ID is equal to 90030; option D selects the employee ID from the employee table without any filter condition.Reference:CompTIA DataSys+ Course Outline, Domain 1.0 Database Fundamentals, Objective 1.2 Given a scenario, execute database tasks using scripting and programming languages.


Question 5
Question 6
Question 7
Page:    1 / 14   
Total 80 questions