it 214

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

Enter the complete SQL command to create a SQL database named GMU: ______

CREATE DATABASE GMU;

Complete the command name which is used to create a SQL database: CREATE _________

DATABASE

In a database, a foreign key is defined as:

One or more attributes (columns/data element) that references a primary key in another entity instance (row) in an entity (table).

What is the notation for relational database management system?

RDBMS is the standard notation for a relational database management system.

The following command is used to generate a table with all defined SQL databases:

SHOW DATABASES;

The command named "SHOW DATABASES" is used to generate a table with all defined SQL databases.

The command named "SHOW DATABASES" is used to generate a table with all defined SQL databases.

T/f : A functional dependency is a relation between entities.

True

t/f: 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.

The __________ constraint specifies whether each supertype entity occurrence must also be a member of at least one subtype.

completeness

A(n) ___ attribute is an attribute that can be divided in simpler parts that have a different semantic meaning in the real world.

composite An attribute that can be divided in simpler parts that have a different semantic meaning in the real world is known as a composite attribute. See topic DB-D1-41 Simple and composite attributes.

An attribute that may have two different values for two entity instances is named:

duplicated value attribute

t/f: A relationship in ER model represents a general real or abstract concept or entity.

false Relationship in ER model can be defined as an association among entities.

t/f: The following command is used to generate a table with all defined SQL databases: VIEW DATABASES;

false : the correct command is 'SHOW DATABASES'

t/f: "DELETE DATABASE gmu;" command is used to delete the database named gmu. It will give an error if gmu does not exist.

false : DROP DATABASE gmu;" command is used to delete the database gmu. It will give an error if gmu does not exist

t/f: A table with a valid primary key in unnormalized form (UNF) has no repeating groups, composite data cells nor multi-value data cells.

false: A table in unnormalized form (UNF) has either repeating groups, composite data cells, multi-value data cells or lacks a valid primary key.

t/f: Entities are named as verb phrases.

false: Entities are named as singular nouns.

t/f: "A PROFESSOR teaches a CLASS" is not a good relationship name.

false: A PROFESSOR teaches a CLASS is a good relationship name.

A(n) ___ attribute is an attribute that have no value for at least one entity instances already defined.

optional

A___ discriminator is the attribute in the supertype entity that determines to which subtype the supertype occurrence is related.

subtype A subtype discriminator is the attribute in the supertype entity that determines to which subtype the supertype occurrence is related.

t/f: A subtype discriminator is the attribute in the supertype entity that determines to which subtype the supertype occurrence is related.

true

t/f: In relattional databases, a transitive dependency (X determines Z) exists if and only if there is an attribute or set of attributes Y (Y does not determine X) such that X determines Y and Y determines Z.

true

t/f: Information resolves uncertainty and represents processed data.

true

t/f: Structured query language (SQL) enables users to create database objects and manipulate and view data.

true

t/f: The completeness constraint classify hierarchies in partial and total.

true

t/f: The completeness constraint specifies whether each supertype entity occurrence must also be a member of at least one subtype.

true

t/f: The following command is used to generate a table with all defined SQL databases: SHOW DATABASES;

true

t/f: The title of a course is an example of single-value attribute.

true

t/f: Given a multi-value attribute, with a variable number of values, for which we need to process independently the values, it is recommended to consider a new dependent entity to represent the values.

true: Given a multi-value attribute, with a variable number of values, for which we need to process independently the values, it is recommended to consider a new dependent entity to represent the values. This will allow easy access and management of each value.

Entity _____________ in a relationship expresses the minimum and maximum number of entity instances occurrences associated with one entity instance occurrence of the related entity.

cardinality

t/f: A relationship in ER model represents a property or attribute of an entity.

false: Relationships in ER model can be defined as an association among entities.

t/f: "ADD DATABASE IF NOT EXISTS" command is used to create a new SQL database if there is no database already created.

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

t/f: Partial completeness means that every supertype occurrence is a member of a subtype.

false: Partial completeness means that not every supertype occurrence is a member of a subtype.

t/f: The command below is used to mark the database named GMU as the current database for the following operations. SET DATABASE GMU;

false: The command below is used to mark the database named GMU as the current database for the following operations. USE GMU;

t/f: The name of the command to mark a database as the current database for the following operations is: "USE DATABASE".

false: The name of the command to mark a database as the current database for the following operations is: "USE".

t/f: A unary relationship exists when an association is made between the same enttity instance.

false: A unary relationship exists when an association is maintained within a single entity.

t/f: SQL is the abbreviation for Sequential Query Language.

false: SQL is the abbreviation for Structured Query Language.

t/f: 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 MY_LONG_TABLE_NAME AS L

Enter the complete SQL command to create a SQL database named GMU if there is no such database: ______

"CREATE DATABASE IF NOT EXISTS GMU;" command is used to create a new SQL database named GMU, if there is no such database defined.

Enter the complete SQL command to delete a SQL database named GMU, not giving an error if there is no such database: ______ Use uppercase for SQL reserved words.

"DROP DATABASE IF EXISTS GMU;" command is used to delete the database named GMU, not giving an error if there is no database named GMU.

A functional dependency is a relation between:

Attributes

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

CREATE

T/f: The term "cardinality" for a relationsship expresses the number of entities associated by the relationship.

False: Entity Cardinality" in a relationship expresses the minimum and maximum number of entity instances occurrences associated with one entity instance occurrence of the related entity.

T/f: 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.

Complete the command name which is used to delete a SQL database only if there is one defined with the provided name: DROP DATABASE _________ name ;

IF EXISTS "DROP DATABASE IF EXISTS" command is used to delete a SQL database only if exists one with the provided name.

Complete the command name which is used to generate a table with all the SQL databases on the server: ______ DATABASES

SHOW

Complete the command name which is used to generate a table with all the SQL databases on the server: SHOW ______

SHOW DATABASES

Write the full command which is used to generate a table with all the SQL databases on the server:

The following command is used to generate a table with all the SQL databases on the server: SHOW DATABASES;

Which is the name of the command to mark the specified database as the current database for the following operations?

USE

Enter the complete command that is used to mark the database named GMU as the current database for the following operations. Use uppercase for SQL reserved words.

USE GMU;

Database is an organized collection of:

data A database is an organized collection of data. It is generally stored and accessed electronically from a computer system.

t/f: The following is an example of partial completeness for a hierarchy: Given the supertype EMPLOYEE with two subtypes FACULTY and STAFF. An employee must be either a faculty or a staff member.

false b/c This is not an example of partial completeness because the employees must be either faculty or staff.

t/f: A joining condition specify that the primary key of the child table is equal with the primary key of the parent table.

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

t/f: 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 all the combinations of the rows in the DEPARTMENT table with all the rows in the EMPLOYEE table.

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

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

false: Your answer is wrong. To implement a relationship in SQL we use the reference constraint in CREATE TABLE command.

t/f: An alias for a table is defined in the SELECT clause using the reserved word AS.

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

t/f: 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.

t/f: A database is defined as any data stored and accessed on a computer system.

false: A database is an organized collection of data. It is generally stored and accessed electronically from a computer system.

t/f: A database organized in terms of objects, their properties and the relations between them is a relational database.

false: A relational database is a database organized based on the relational model. The relational model represents data in tuples grouped in relations. A tuple contains the values for related attributes (i.e. columns) from a predefined data type (i.e. domain). When the relation is shown as a table, the tuples are the rows and attributes the columns. In design the relation correspond to an entity and the tuples to entity instances. It was introduced by Edgar F. Codd in 1969.

t/f: Given a multi-value attribute, with two values, for which we need to process independently the values, but without performing global processing on all the values, it is recommended to consider a new dependent entity to represent the values.

false: Given a multi-value attribute, with two values, for which we need to process independently the values, but without performing global processing on all the values, it is not recommended to consider a new dependent entity to represent the values. The two values may be stored in two different attributes because no global processsing is needed for all the values.

t/f: 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.

t/f: 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.

t/f: 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.

t/f: An optional attribute is an attribute that have no value for at least one entity instance already defined.

false: An optional attribute is an attribute that may not have a value for some entity instances (already defined or to be defined in the future).

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) PRIMARY KEY DEPARTMENT(CODE) ); is the foreign key clause t /f:

false: The foreign key clause is: FOREIGN KEY (DEPARTMENT_ID) REFERENCES DEPARTMENT(CODE)

t/f: 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.

t/f: Structured Query Language (SQL) is a fifth generation language.

false: Structured Query Language (SQL) is a fourth generation language.

t/f: "An AIRCRAFT is flown by a CREW" is not a good name for a relationship.

false; "An AIRCRAFT is flown by a CREW" is a good name for a relationship.

The _____________ model represents data in tuples grouped in relations.

relational

A(n) ___ in ER model captures how entities are related to one another.

relationship

t/f: The name of the command to mark a database as the current database for the following operations is: "USE".

true

t/f: 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.

t/f: 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.

t/f: 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.

t/f: 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.

t/f: A relational database management system is a database management system for relational databases.

true A relational database management system is a database management system for relational databases.

t/f: 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.

t/f: Specification: A department has one chair and a faculty may be chair of at most one department. The above specification indicates a relationship between department and faculty having the type: one-to-one

true: It is a ONE to ONE relationship between department and faculty because a department has ONE chair and a faculty is the chair of at most ONE department.

t/f: 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.

An album contains one or more tracks. Does this specification represents a relationship?

yes The specification "An album contains one or more tracks." represents a relationship.


Kaugnay na mga set ng pag-aaral

Chapter 20 WWII The Start of the second war

View Set

Comptia core 2 A + Test, Comptia Core 2 practice questions

View Set

Most likely to be on the quiz aNATOMY

View Set

Property & Casualty- Arizona State Laws

View Set