5.3 Summarize Methods used to interface with database's Flashcards

1
Q

What is NOT true regarding SQL permissions?

A

The owner of a table can assign only the permission to view (not update) data in the table to other users.

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

What is the purpose of the SQL INSERT command?

A

It adds a new row to a table in a database.

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

In a situation where a PC-based database and an application are both hosted on the same computer, what is the application architecture called?

A

One-tier
When the application, which includes reports, forms, queries, etc., is hosted on the same computer as the actual database, it’s called a standalone or one-tier database application architecture.

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

What is NOT true regarding the SQL INSERT statement?

A

It is a data definition language statement. Data definition statements are SQL statements, such as CREATE DATABASE and CREATE TABLE, that define the structure of a database. The INSERT command adds rows of data into a table, not new objects into a database.

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

Using a programmatic database access method to interact with a relational database would require what type of commands?

A

SQL
When accessing a database via a programming language, database interaction is handled with SQL commands. SQL is the relational database access language. As such, many programming languages even include libraries that provide default code for database connection and queries.

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

In a database application, what is the difference between a form and a report?

A

Both display data, but a form can be used to update the contents of the database as well.

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

Why might a database dump be a good option for backup/restore?

A

A database dump includes both the database data and the structure, so it could be restored whether the offending error was in the data or in the structure.

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

Who would typically use a query/report builder to access database data?

A

Power users and programmers

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

You have been placed on a project to update the addresses of customers in a “Customer” table. Who can issue the SQL commands to give you permission to update the data in that table?

A

The owner of the “Customer” table

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

Adding a new relational database, table, or index is a function of which Data Definition Language (DDL) command?

A

CREATE

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

Which type of constraint is added to a table for the purpose of establishing a relationship with another table?

A

Foreign key
A relationship between two tables requires a common column between the two tables. A foreign key is added to a table for the purpose of being that common column that matches back to a primary key in another table.

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

What is the difference between the DELETE and DROP commands in SQL?

A

DELETE deletes rows from a table, whereas DROP eliminates the entire table.

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

Why is a client-server application considered a two-tier architecture?

A

The database runs on a database server, while the application is run on the client computer.

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

What is the SQL UPDATE command used for?

A

To change the value in one or more fields in a table

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

Which of the following is the best example of a direct/manual database access method?

A

Log into phpMyAdmin and run SQL statements at the command prompt.
Using an administrative tool to connect and sign directly into the RDBMS provides the greatest level of control over the database. It allows the SQL commands to interact directly with the database, without the use of any other form or application.

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

What is NOT true regarding the SQL INSERT statement?

A

It is a data definition language statement.

17
Q

What is a true statement about Data Definition Language (DDL)?

A

It comprises SQL commands that can add to or modify the structure of a database.
Data Definition Language (DDL) includes commands that can manipulate the structure of a database, rather than the data inside the database. Examples include ALTER, CREATE, and DROP. Adding and deleting tables, changing column names and sizes, as well as adding indexing and permissions, are all functions of DDL.

18
Q

Queries often retrieve data from multiple tables. If the same column name is used in two tables, how does SQL know which column to use?

A

In the SELECT statement, the column name is prefixed by the table name.
Adding the table name as a prefix (Customer.lastName) tells SQL to extract the lastName from a “Customer” table, even if the same field name appears in another table.

19
Q

Why is the process of generating backups such an important feature of an RDBMS?

A

A database can contain mission-critical data, which an organization may not be able to afford to lose.

20
Q

Which is the best way to issue SQL commands to manipulate data in a relational database?

A

It depends on the user’s level of SQL experience, overall purpose, and access permissions.