S2

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Complete the command name which is used to create a SQL database: ______ DATABASE

CREATE. "CREATE DATABASE" command is used to create a new SQL database.

When we specify two (or more) tables in the FROM clause the result of the query will be computed by automatically linking the foreign key of one table with the primary key of the other table.

FALSE: . When we specify two (or more) tables in the FROM clause the result of the query will be computed based the Cartesian product between the two (or more) tables.

DBMS is a computer language for storing, manipulating and retrieving data stored in a relational database.

FALSE: Structured Query Language (SQL) is a computer language for storing, manipulating and retrieving data stored in a relational database.

The following clause is specifying a 1:M relationship between the DEPARTMENT(CODE, NAME) and EMPLOYEE tables: CREATE TABLE EMPLOYEE( ID INT PRIMARY KEY, NAME VARCHAR(50) NOT NULL, DEPARTMENT_ID NOT NULL, FOREIGN KEY (DEPARTMENT_CODE) );

FALSE: The foreign key clause is: FOREIGN KEY (DEPARTMENT_CODE) REFERENCES DEPARTMENT(CODE)

The command CREATE RELATIONSHIP is used to define a relationship in SQL.

FALSE: There is no command named CREATE RELATIONSHIP. To create a relationship you define the foreign keys in the corresponding tables.

The command INSERT INTO RELATIONSHIP is used to add data to a relationship in SQL.

FALSE: There is no command named INSERT INTO RELATIONSHIP. To add the relationship data you use the INSERT INTO specifying the correct values for the foreign keys into the corresponding tables.

To implement a relationship in SQL we use the primary key constraint in CREATE TABLE command.

FALSE: To implement a relationship in SQL we use the reference constraint in CREATE TABLE command.

Given the tables DEPARTMENT(CODE, NAME) and EMPLOYEE(ID, NAME, DEPARTMENT_CODE) in a 1:M relationship, and the command: SELECT * FROM DEPARTMENT, EMPLOYEE The query will generate rows for each employee starting with all the columns in the DEPARTMENT entity that corresponds to the employee and followed by all the columns in the EMPLOYEE entity.

FALSE: When we specify two (or more) tables in the FROM clause the result of the query will be computed based the Cartesian product between the two (or more) tables.

___ is a computer language for storing, manipulating and retrieving data stored in a relational database.

SQL. Structured Query Language(SQL) is a computer language for storing, manipulating and retrieving data stored in a relational database.

"CREATE DATABASE IF NOT EXISTS gmu;" command is used to create a new SQL database named gmu, if there is no database already created. It will not give an error if gmu exits.

TRUE: "CREATE DATABASE IF NOT EXISTS" command is used to create a new SQL database if there is no database already created.

"DROP DATABASE IF EXISTS" command is used to delete an SQL database only if there is a database already created.

TRUE: "DROP DATABASE IF EXISTS" command is used to delete a SQL database only if there is a database already created.

A joining condition specify that the foreign key of the child table is equal with the primary key of the parent table.

TRUE: A joining condition specify that the foreign key of the child table is equal with the primary key of the parent table.

An alias for a table is defined in the FROM clause using the reserved word AS.

TRUE: An alias for a table is defined in the FROM clause using the reserved word AS. Example: SELECT * FROM LONG_TABLE_NAME AS L

The following clause is specifying a 1:M relationship between the DEPARTMENT(CODE, NAME) and EMPLOYEE tables: CREATE TABLE EMPLOYEE ( ID INT PRIMARY KEY, NAME VARCHAR(50) NOT NULL, DEPARTMENT_ID NOT NULL, FOREIGN KEY (DEPARTMENT_CODE) REFERENCES DEPARTMENT(CODE) );

TRUE: The foreign key clause is: FOREIGN KEY (DEPARTMENT_CODE) REFERENCES DEPARTMENT(CODE)

The command INSERT INTO is used to add relationship data by specifying the correct values for the foreign keys into the corresponding tables.

TRUE: To add the relationship data you use the INSERT INTO specifying the correct values for the foreign keys into the corresponding tables.

To create a relationship in SQL you define the foreign keys in the corresponding tables.

TRUE: To create a relationship you define the foreign keys in the corresponding tables.

To implement a relationship in SQL we use the reference constraint in CREATE TABLE command.

TRUE: To implement a relationship in SQL we use the reference constraint in CREATE TABLE command.

Given the tables DEPARTMENT(CODE, NAME) and EMPLOYEE(ID, NAME, DEPARTMENT_CODE) in a 1:M relationship, and the command: SELECT * FROM DEPARTMENT, EMPLOYEE WHERE DEPARTMENT.CODE = EMPLOYEE.DEPARTMENT_CODE; The query will generate rows for all the employees that have a department code specified. Each row starts with the DEPARTMENT columns followed by the EMPLOYEE columns.

TRUE: When a joining condition is specified, only the rows matching the joining condition will be included in the result.

Given the tables DEPARTMENT(CODE, NAME) and EMPLOYEE(ID, NAME, DEPARTMENT_CODE) in a 1:M relationship, and the command: SELECT * FROM DEPARTMENT, EMPLOYEE The query will generate all the combinations of the rows in the DEPARTMENT table with all the rows in the EMPLOYEE table.

TRUE: When we specify two (or more) tables in the FROM clause the result of the query will be computed based the Cartesian product between the two (or more) tables.

When we specify two (or more) tables in the FROM clause the result of the query will be computed based the Cartesian product between the two (or more) tables.

TRUE: When we specify two (or more) tables in the FROM clause the result of the query will be computed based the Cartesian product between the two (or more) tables.


Kaugnay na mga set ng pag-aaral

111 HESI Maternity/Pediatric Remediation

View Set

Chapter 5: Sexually Transmitted Infections

View Set

I'm from Bulgaria - 4th grade, Longman

View Set

MGMT320 CH 9 and 11-14 ASSIGNMENTS

View Set

Statistics (PSY230) Midterm Study Guide!!!! (Definitions from Textbook!.)

View Set

Sem 3 - Unit 6 - Cognition (Itellectual Disabilities; Chromos Abn; Fetal Alcohol Syndrome)

View Set

D271 Brazil Final (info after midterm)

View Set

Crash Course: Race & Prejudice - Ch 12

View Set

Exam 2 David Myers, Psychology in Modules 11th

View Set