返回卡包市场

3.7 Relational Databases and SQL

暂无描述。系统推荐的高质量记忆内容,适合每天坚持背诵学习。

卡片总数: 24内容版本: v4公开卡包更新时间: 8/1/2026

卡片预览 (24 张)

#1
正面 (问题)

What is a database?

背面 (解答)

A database is a persistent collection of organised storage that can be retrieved through queries

#2
正面 (问题)

What is SQL?

背面 (解答)

Structured Query Language

#3
正面 (问题)

What is data redundancy?

背面 (解答)

Duplicate pieces of data

#4
正面 (问题)

What is data inconsistency?

背面 (解答)

Storing repeated data in the same table can lead to inconsistencies in the data

#5
正面 (问题)

Range check

背面 (解答)

A number or date is within a sensible/allowed range i.e. Month between 1 and 12

#6
正面 (问题)

Type check

背面 (解答)

Data is the right type

#7
正面 (问题)

Length check

背面 (解答)

Text entered is not too long or too short - for example a password is between 8 and 15 characters

#8
正面 (问题)

Presence check

背面 (解答)

Checks that the data has been entered, i.e. The field has been left blank

#9
正面 (问题)

Format check

背面 (解答)

Checks the format is correct, for example, a postcode or email is correct

#10
正面 (问题)

List check

背面 (解答)

Making sure the user enters the right thing from a list. They can only select an option from a drop-down menu.

#11
正面 (问题)

What wildcard is used to represent everything?

背面 (解答)

*

#12
正面 (问题)

SQL SELECT

背面 (解答)

Select * FROM table1

#13
正面 (问题)

SQL WHERE

背面 (解答)

Select * FROM table1 WHERE Forename = ‘Bob’ • If the value is a string (or varchar, text etc.) then it requires quotation marks.

#14
正面 (问题)

SQL SELECT SORTING

背面 (解答)

Select Forename, Surname FROM table1 ORDER BY Surname ASC • ASC = Ascending • DESC = Descending

#15
正面 (问题)

SQL INSERT

背面 (解答)

INSERT INTO table1 (userId, Forename, Surname, Age, Height, MobileNumber) VALUES (1, ‘Bob’, ‘Jones’, 47, 1.87, ‘07834 577780’) • If the value is a string (or varchar, text etc.) then it requires quotation marks.

#16
正面 (问题)

SQL UPDATE

背面 (解答)

UPDATE table1 Surname = ‘Rich’ WHERE userId = 1 It is the safest option to use the primary key as if you use another field, then you might change someone else’s details as well.

#17
正面 (问题)

SQL DELETE

背面 (解答)

DELETE FROM table1 WHERE userId = 1

#18
正面 (问题)

SQL Joining two tables

背面 (解答)

SELECT table1.Forename, table1.Surname, table2.Address FROM table1 INNER JOIN ON table1.userId = table2.userId WHERE userId = 1

#19
正面 (问题)

Primary key

背面 (解答)

A primary key is a field in a database table and acts as a unique identifier for each record.

#20
正面 (问题)

Foreign key

背面 (解答)

It is the reference to the primary key of another table. It is used to create a link/relationship between two tables.

#21
正面 (问题)

What is an integer?

背面 (解答)

A whole number

#22
正面 (问题)

What is a float?

背面 (解答)

A number with a fractional component (a decimal)

#23
正面 (问题)

What is datetime

背面 (解答)

Date and Time

#24
正面 (问题)

What is a char? In databases

背面 (解答)

A string of fixed length (up to 8,000 characters long)