Coursera课程Python for everyone:Quiz: Multi-Table Relational SQL

Multi-Table Relational SQL

10 试题

Ability to store data in a format that can be sent across a network

Ability to quickly convert data to HTML

Ability to execute JavaScript in the file

Ability to scan large amounts of data quickly

Ability to execute Python code within the file

To point to a particular row in another table

To look up a row based on a string that comes from outside the program

To track the number of duplicate values in another column

To look up a particular row in a table very quickly

Use integers as primary keys

Use a person's email address as their primary key

Model each "object" in the application as one or more tables

Never repeat string data in more than one table in a data model

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

Put the string in the first row where it occurs and then put that row number in the column of all of the rest of the rows where the string occurs

Put the string in the first row where it occurs and then put NULL in all of the other rows

Encode the entire row as JSON and store it in a TEXT column in the database

Put the string in the last row where it occurs and put the number of that row in the column of all of the rest of the rows where the string occurs

Logical key

Primary key

Remote key

Foreign key

Local key

Logical key

Primary key

Local key

Foreign key

Remote key

AUTO_INCREMENT

INSERT_AUTO_PROVIDE

ASSERT_UNIQUE

AUTOINCREMENT

COUNT

APPEND

CONNECT

JOIN

CONSTRAINT

The number of rows you get is the number of rows in the first table times the number of rows in the second table

You get all of the rows of the left table in the JOIN and NULLs in all of the columns of the right table

You get no rows at all

Leaving out the ON clause when joining two tables is an SQL syntax error

The rows of the left table are connected to the rows in the right table when their primary key matches

tablename/columnname

tablename['columnname']

tablename->columnname

tablename.columnname

你可能感兴趣的:(Python)