Py4e: Chapter 15

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What SQLite keyword is added to primary keys in a CREATE TABLE statement to indicate that the database is to provide a value for the column when records are inserted?

AUTOINCREMENT

What is the primary added value of relational databases over flat files?

Ability to scan large amounts of data quickly

What happens if a DELETE command is run on a table without a WHERE clause?

All the rows in the table are deleted

Which of these is the right syntax to make a new table?

CREATE TABLE people;

In a typical online production environment, who has direct access to the production database?

Database Administrator

A primary key can be set to null.

False (pg205)

What is the label we give to a column that is an integer and used to point to a row in a different table?

Foreign Key(pg206)

Which SQL command is used to insert a new row into a table?

INSERT INTO

What does this SQL command do? SELECT COUNT(*) FROM Users

It counts the rows in the table Users

Which of the following is the label we give a column that the "outside world" uses to look up a particular row?

Logical Key (pg205)

If our user interface (i.e., like iTunes) has repeated strings on one column of the user interface, how should we model this properly in a database?

Make a table that maps the strings in the column to numbers and then use those numbers in the column

Which keyword will cause the results of the query to be displayed in sorted order?

ORDER BY

Which command is used to retrieve all records from a table?

SELECT * FROM Users

Which of the following is the database software used in this class?

SQLite

What happens when you JOIN two tables together without an ON clause?

The number of rows you get is the number of rows in the first table times the number of rows in the second table (https://stackoverflow.com/questions/16470942/can-i-use-mysql-join-without-on-condition)

Which of the following commands would update a column named "name" in a table named "Users"?

UPDATE Users SET name='new name' WHERE ...

Which of the following is NOT a good rule to follow when developing a database model?

Use a person's email address as their primary key

Structured Query Language (SQL) is used to (check all that apply)

create a table insert data delete data

In database terminology, another word for table is

relation

When you are doing a SELECT with a JOIN across multiple tables with identical column names, how do you distinguish the column names?

tablename.columnname

What is the SQL keyword that reconnects rows that have foreign keys with the corresponding data in the table that the foreign key points to?

JOIN (pg206)

What is the purpose of a primary key?

To look up a particular row in a table very quickly


Set pelajaran terkait

chapter 21: sudden complications

View Set

Chapter 22 & 23 Solutions/Acids & Bases

View Set

ATI Pharmacology Application Exercises 21-38

View Set

Starting Out with Python Chapter 1

View Set

chapter 28: Child, Older Adult, and Intimate Partner Violence

View Set