Module 2 Flashcards
What is DDL?
Data definition language
- part of SQL, used to create and modify the tables and objects in a database
What are DDL Commands?
CREATE, ALTER, DROP
What is DML?
Data Manipulation Language
- retrieves and updates data in a database
What are DML Commands?
SELECT, INSERT, UPDATE, DELETE
Used to specify who can access data in the database and what operations can they perform
Data Control Language (DCL)
What are DCL Commands?
GRANT and REVOKE
What are some properties of foreign keys?
- Creates a relationship between two tables
- Enforces integrity rules
- A foreign key in one table relates to a primary key in a different table
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, B, C, E
In terms of an RDBMS, What is Metadata?
Data definitions and relationships
Name 4 leading RDBMS used today
- Oracle
- MySQL
- UDB
- Sybase
A database plan or framework, in which organizes tables in a relational database
RDBMS Schema
What would you use to load a data warehouse?
SQL
A row of data that is related
Tuple
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. Once a table is dropped, it no longer exists in the system catalog.
B. The DROP TABLE Command is a DDL Command.
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.
B. The DELETE command deletes an entire record of data at a time.
D. The DELETE command only deletes data from the table specified.
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.
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.
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. 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
Shared, integrated computer structure that stores a collection of end-user data and data types
Databases
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
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
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
B & C
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
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
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. Both primary and foreign keys play roles in referential integrity
D. An RDBMS table can have multiple foreign keys
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. Data changes are recorded in logs as they are made
C. The RDBMS has a backup mechanism that can be used for data recovery
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
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