Module 2 Flashcards

1
Q

What is DDL?

A

Data definition language

  • part of SQL, used to create and modify the tables and objects in a database
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are DDL Commands?

A

CREATE, ALTER, DROP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is DML?

A

Data Manipulation Language
- retrieves and updates data in a database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are DML Commands?

A

SELECT, INSERT, UPDATE, DELETE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Used to specify who can access data in the database and what operations can they perform

A

Data Control Language (DCL)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are DCL Commands?

A

GRANT and REVOKE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are some properties of foreign keys?

A
  1. Creates a relationship between two tables
  2. Enforces integrity rules
  3. A foreign key in one table relates to a primary key in a different table
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which of the following access privileges are provided by an RDBMS?

A. User access to specific operations on specific attributes of specific tables in the database.

B. User access to the entire database.

C. User access to specific operations on specific tables in the database.

D. User access to specific cells in the database.

E. User access to specific tables in the database.

A

A, B, C, E

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In terms of an RDBMS, What is Metadata?

A

Data definitions and relationships

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Name 4 leading RDBMS used today

A
  1. Oracle
  2. MySQL
  3. UDB
  4. Sybase
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A database plan or framework, in which organizes tables in a relational database

A

RDBMS Schema

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What would you use to load a data warehouse?

A

SQL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A row of data that is related

A

Tuple

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which of the following are true statements about the DROP TABLE command?

A. Once a table is dropped, it no longer exists in the system catalog.

B. The DROP TABLE Command is a DDL Command.

C. The DELETE command must be used in conjunction with the DROP TABLE command to delete the data in a table before it is dropped.

D. The ALTER TABLE…DROP command can achieve the same result as the DROP TABLE command.

E. The DROP TABLE command allows you to specify a condition where only certain data is deleted.

A

A. Once a table is dropped, it no longer exists in the system catalog.

B. The DROP TABLE Command is a DDL Command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which of the following are true about the DELETE command?

A. The WHERE clause is a mandatory part of the DELETE command.

B. The DELETE command deletes an entire record of data at a time.

C. The SET clause of a DELETE command lets you specify which attribute you want to delete.

D. The DELETE command only deletes data from the table specified.

A

B. The DELETE command deletes an entire record of data at a time.

D. The DELETE command only deletes data from the table specified.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which of the following are true about creating a join?

A. Only two tables can be joined in one SQL command.

B. The JOIN phrase is used with the SELECT command

C. An inner join usually combines TWO columns of the same table.

D. The RDBMS may require the column names in a join to be prefixed by the table name.

A

B. The JOIN phrase is used with the SELECT command

D. The RDBMS may require the column names in a join to be prefixed by the table name.

17
Q

Which of the following is true about jobs in the database field?

A. Database administrators need to understand the details of the particular DBMS with which they work.

B. A Data Administrator needs strong technical skills in specific DBMS’s

C. There is only one kind of job that requires database skills.

D. A database modeler gathers requirements and creates a data model.

E. A Data Administrator plans for database and technology, sets standards

A

A. Database administrators need to understand the details of the particular DBMS with which they work.

D. A database modeler gathers requirements and creates a data model.

E. A Data Administrator plans for database and technology, sets standards

18
Q

Shared, integrated computer structure that stores a collection of end-user data and data types

A

Databases

19
Q

Which of these statements are true about relational databases?

A. Tables in RDBMS represent only business entities such as customers or products

B. A primary key uniquely identifies a row in a table

C. Attributes in an RDBMS table corresponds to rows in a spreadsheet such as Excel

D. A modern standard RDBMS stores metadata about the database, such as names and data types, in a special part of the database called the system catalog

A

B. A primary key uniquely identifies a row in a table

D. A modern standard RDBMS stores metadata about the database, such as names and data types, in a special part of the database called the system catalog

20
Q

Which statements are true about data types in SQL RDBMS?

A. The number 6.25 could be stored in a variable of type INTEGER

B. Modern SQL DBMS support data types that store dates and times

C. The VARCHAR data type can store strings of characters of varying lengths, such as might occur for people’s names.

D. Each row has a specific data type

A

B & C

21
Q

Which of the following are true about DML commands?

A. DML commands update the structure of tables in the database
B. A SELECT command is a valid DML command
C. To create a report from existing tables, you would use DML commands
D. DML commands are used to update and retrieve data in the database

A

B. A SELECT command is a valid DML command

C. To create a report from existing tables, you would use DML commands

D. DML commands are used to update and retrieve data in the database

22
Q

Which of the following are true regarding primary and foreign keys in a RDBMS table?

A. Both primary and foreign keys play roles in referential integrity

B. A key is an object

C. If a record that you’re trying to add to a table has a value for the primary key, but no value for the foreign key, the RDBMS will prevent you from inserting it due to referential integrity

D. An RDBMS table can have multiple foreign keys

A

A. Both primary and foreign keys play roles in referential integrity

D. An RDBMS table can have multiple foreign keys

23
Q

How does a DBMS provide data recovery?

A. Data changes are recorded in logs as they are made

B. Users can make backups or copies of a database

C. The RDBMS has a backup mechanism that can be used for data recovery

D. Indexes are used by a DBMS to aid in the data recovery process

A

A. Data changes are recorded in logs as they are made

C. The RDBMS has a backup mechanism that can be used for data recovery

24
Q

What is true about a composite key?

A. It is a primary key and a foreign key

B. It is two or more attributes in one table that are combined to form a key

C. When a composite primary key is defined, multiple attributes together uniquely identify each record

D. It is a key of two different data types

A

B. It is two or more attributes in one table that are combined to form a key

C. When a composite primary key is defined, multiple attributes together uniquely identify each record

25
Q

Which of the following statements regarding an RDBMS and a spreadsheet application are true?

A. A spreadsheet organizes data into rows and columns, whereas an RDBMS does not

B. An RDBMS supports indexes to quickly find requested data items, while a spreadsheet does not

C. Both an RDBMS and spreadsheets support referential integrity

D. An RDBMS requires an additional statement to save the updates, while a spreadsheet saves changes instantly

A

B. An RDBMS supports indexes to quickly find requested data items, while a spreadsheet does not

26
Q

Which of the following are true about the SQL language?

A. SQL has a vocabulary set of less than a hundred words, which is why the initials SQL stand for “Simplified Query Language “

B. SQL is a procedural language, which means that it can create stored procedures

C. SQL is a language that allows you to access and manipulate data in databases

D. The SQL language can define access rights to the database

A

C. SQL is a language that allows you to access and manipulate data in databases

D. The SQL language can define access rights to the database

27
Q

Which of the following are true about spreadsheets?

A. Height and Age are spreadsheet data types

B. Each of the rows of a spreadsheet usually represent related data about a particular entity

C. A spreadsheet assumes a data type based on the first value you type into a cell

D. Multiple values can be entered into a cell of a spreadsheet

A

B. Each of the rows of a spreadsheet usually represent related data about a particular entity

C. A spreadsheet assumes a data type based on the first value you type into a cell

D. Multiple values can be entered into a cell of a spreadsheet

28
Q

Which of these statements are true about the SQL language?

A. The SQL language is only supported by a few RDBMS products

B. REVOKE is a valid SQL command

C. SQL has been around for many years and the acronym SQL stands for “Structured inQuery Language”

D. PL/SQL is slowly replacing SQL as it is much more powerful

E. The SQL language includes the Data Definition Language (DDL) which is used to create tables and other database objects

A

B. REVOKE is a valid SQL command

E. The SQL language includes the Data Definition Language (DDL) which is used to create tables and other database objects

29
Q

Which of the following are true about SELECT command?

A. The GROUP BY clause in a SELECT command groups tables with matching columns

B. The SELECT command has several optional clauses, including the WHERE clause

C. The WHERE clause can be used to see if a field is empty

D. The WHERE clause of a SELECT command can be used to compare different values so you can limit the result set

A

B. The SELECT command has several optional clauses, including the WHERE clause

C. The WHERE clause can be used to see if a field is empty

D. The WHERE clause of a SELECT command can be used to compare different values so you can limit the result set

30
Q

Which of the following statements correctly describe databases in an organization?

A. Databases are becoming obsolete in organizations as new technology takes their place

B. A database is inherently secure so extra security measures are not necessary for databases

C. Today many organizations use IT activities such as data mining to streamline their operations and achieve competitive advantages

D. Over the past 2 decades, object oriented databases have prevailed as the leading model for databases

A

C. Today many organizations use IT activities such as data mining to streamline their operations and achieve competitive advantages

31
Q

Which of the following are true about the DELETE command?

A. The DELETE command can delete part of a record and leave the rest of the record intact

B. It can be difficult to recover data deleted by the DELETE command

C. The DELETE command deletes both the table and the data in that table

D. The DELETE command will not make any changes to the table if the WHERE clause is missing

E. The DELETE command allows you to specify a condition so that only certain data is deleted from the table when the command is issued

A

B. It can be difficult to recover data deleted by the DELETE command

E. The DELETE command allows you to specify a condition so that only certain data is deleted from the table when the command is issued

32
Q

Which of the following are true about programming for databases?

A. A database program can be useful for loading a data warehouse

B. Database programming can be useful for extending security in a database application

C. Most RDBMS include a programming language that allows the programmer to execute SQL commands integrated with conventional programming constructs

D. A database programmer can write code that will execute different commands based on different conditions

A

All answers are correct

33
Q

Which of the following are true about data control language (DCL)?

A. To set up referential integrity, you would use DCL commands

B. DCL commands include GRANT and REVOKE

C. DCL commands are part of the way an RDBMS handles security

D. DCL commands include INSERT, UPDATE, AND DELETE

A

B. DCL commands include GRANT and REVOKE

C. DCL commands are part of the way an RDBMS handles security

34
Q

Which of the following are true about the ALTER TABLE command?

A. The ALTER TABLE command allows you to delete a column from a table based on a condition in the WHERE clause of the command

B. ALTER TABLE command allows you to add a constraint to an existing table

C. ALTER Table command allows you to modify the data type of a column in an existing table

D. Allows you to change data in a record after it has been inserted

E. Allows you to add a new column to an existing table

A

B. ALTER TABLE command allows you to add a constraint to an existing table

C. ALTER Table command allows you to modify the data type of a column in an existing table

E. Allows you to add a new column to an existing table

35
Q

Which of the following are true about data types?

A. Data types have the same names in all programming languages

B. A number can be declared with one of several different data types

C. Both spreadsheet applications and RDBMS tables include data types

D. BOOLEAN can be a data type

A

B. A number can be declared with one of several different data types (REAL, FLOAT, or INTEGER)

C. Both spreadsheet applications and RDBMS tables include data types

D. BOOLEAN can be a data type

36
Q

In terms of an RDBMS, ____data refers to data definitions and relationships

A

Metadata

37
Q

Which of the following are true about the UPDATE command?

A. The UPDATE command can include a SET or WHERE clause, but both are optional

B. After using the UPDATE command, you’ll need to use a SELECT command to see the changes

C. If a SET clause is used, a WHERE condition must also be used

D. The UPDATE command is a way to change the data type of a column in the table

E. The WHERE clause is optional in a UPDATE command, but SET is required

A

B. After using the UPDATE command, you’ll need to use a SELECT command to see the changes

E. The WHERE clause is optional in a UPDATE command, but SET is required

38
Q

Which of the following are fields of a machine language instruction?

A. Function code

B. Program counter

C. Op code

D. Instruction register

E. Operand specifier

A

C. Op Code

E. Operand Specifier