Multi-Table Relational SQL

10 试题

1.

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

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

2.

What is the purpose of a primary key?

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

3.

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

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

4.

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

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

5.

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

Logical key

Primary key

Remote key

Foreign key

Local key

6.

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

Logical key

Primary key

Local key

Foreign key

Remote key

7.

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?

AUTO_INCREMENT

INSERT_AUTO_PROVIDE

ASSERT_UNIQUE

AUTOINCREMENT

8.

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?

COUNT

APPEND

CONNECT

JOIN

CONSTRAINT

9.

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

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

10.

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

tablename['columnname']

tablename->columnname

tablename.columnname

Coursera课程Python for everyone:Quiz: Multi-Table Relational SQL相关推荐

  1. Coursera课程Python for everyone:Quiz: Many-to-Many Relationships and Python

    Many-to-Many Relationships and Python 9 试题

  2. Coursera课程Python for everyone:Quiz: Single-Table SQL

    Single-Table SQL 11 试题 1. Structured Query Language (SQL) is used to (check all that apply) Delete d ...

  3. Coursera课程Python for everyone:Quiz: Regular Expressions

    Quiz: Regular Expressions 10 试题 1. Which of the following best describes "Regular Expressions&q ...

  4. Coursera课程Python for everyone:Quiz: Object Oriented Programming

    Object Oriented Programming 11 试题 1. Which came first, the instance or the class? instance class fun ...

  5. Coursera课程Python for everyone:Quiz: REST, JSON, and APIs

    REST, JSON, and APIs 10 试题 1. Who is credited with getting the JSON movement started? Pooja Sankar M ...

  6. Coursera课程Python for everyone:Quiz: eXtensible Markup Language

    eXtensible Markup Language 10 试题 1. What is "serialization" when we are talking about web ...

  7. Coursera课程Python for everyone:Quiz: Reading Web Data From Python

    Reading Web Data From Python 8 试题 1. Which of the following Python data structures is most similar t ...

  8. Coursera课程Python for everyone:Quiz: Networks and Sockets

    Networks and Sockets 10 试题 1. What do we call it when a browser uses the HTTP protocol to load a fil ...

  9. Coursera课程Python for everyone:chapter10

    Chapter 10 Quiz 10 试题 1. What is the difference between a Python tuple and Python list? Lists are mu ...

最新文章

  1. 语义分割--Dilated Residual Networks 之转载
  2. 清华张学工团队入选“人类细胞图谱计划”首批项目
  3. Python学习入门基础教程(learning Python)--6.3 Python的list切片高级
  4. VMware Fusion DHCP方式下如何指定虚拟机IP地址
  5. python中数字是常量吗,【python】常量与变量
  6. Android之px 与 dp, sp换算公式
  7. 石油勘探是属于计算机应用中的,计算机在石油勘探开发中的应用论文
  8. 【POJ - 2349】【UVA - 10369】 Arctic Network(最小生成树求权值第k大的边)(内附两种算法)
  9. live555的安装 RTSP点播消息流程实例(客户端:VLC, RTSP服务器:LIVE555 Media Server)
  10. HashMap 实现原理及源码解析(jdk8 底层⽤的是数组+链表/红⿊树)
  11. 从零基础到精通的前端学习路线
  12. 小米MIX4要来了?真机图曝光:四边等宽曲面屏 120Hz刷新率
  13. mysql列的数值型,字符型,日期型
  14. lol新加坡服务器怎么修复,英雄联盟差点被新加坡服翻译“毁了”,7张图片看到想要吐血...
  15. 网络安全基础——用户与组管理
  16. python清空屏幕代码_python代码怎样清屏
  17. 智伴机器人wifi键在哪里_智伴机器人介绍和按键功能
  18. ansys和matlab优化,基于ANSYS和MATLAB的优化设计
  19. js 微信聊天框的时间显示规则,以及输出的时间格式(已优化)
  20. MIT6.824 2022 Fault-tolerant Key/Value Service

热门文章

  1. 陈一舟:每个人风口来的时间不一样
  2. mysql zf,mysql workbench建表时PK,NN,UQ,BIN,UN,ZF,AI的含义
  3. 算法与数据结构(排序算法概述)
  4. MySQL - 共享锁和排它锁初探
  5. Elasticsearch-03 CentOS7 / Windows上部署Elasticsearch5.6.16集群模式
  6. Nginx-从零开始使用nginx实现反向代理及负载均衡
  7. Quartz-中断正在执行的任务
  8. Linux - How to use LVM in Linux
  9. Snackbar-Android M新控件
  10. 学习笔记Kafka(三)—— Kafka安装配置(2)—— Kafka单代理及常用操作