Week 7: SQL

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/41

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

42 Terms

1
New cards

flat-file database

form of data where the file is flat in that all of our data is stored in a single table represented by a text file.

2
New cards

Relational databases

store data in rows and columns in structures called tables.

3
New cards

CRUD

the four types of commands that SQL allows (Create, Read, Update, Delete)

4
New cards

Create

SQL command that creates a database with SQL syntax CREATE TABLE table (column type, ...);

5
New cards

sqlite3

a type of SQL database

6
New cards

.schema

used to see the structure of a database

7
New cards

BLOB

SQL datatype; binary large objects that are groups of ones and zeroes

8
New cards

INTEGER

SQL datatype; an integer

9
New cards

WHERE

SQL Command; adding a Boolean expression to filter our data

10
New cards

LIKE

SQL Command; filtering responses more loosely

11
New cards

ORDER BY

SQL Command; ordering responses

12
New cards

LIMIT

SQL Command; limiting the number of responses

13
New cards

GROUP BY

SQL Command; grouping responses together

14
New cards

--

used to write a comment in SQL

15
New cards

NUMERIC

SQL datatype; for numbers that are formatted specially like dates

16
New cards

REAL

SQL datatype; like a float

17
New cards

TEXT

SQL datatype; for strings and the like

18
New cards

Indexes

a data structure used to speed up the retrieval of data from a database table;used to speed up queries; creates a B tree

<p><span>a data structure used to </span><strong>speed up the retrieval of data from a database table;</strong>used to speed up queries; creates a B tree</p>
19
New cards

B tree

a data structure that looks similar to a binary tree. However, unlike a binary tree, there can be more than two child nodes

<p><span>a data structure that looks similar to a binary tree. However, unlike a binary tree, there can be more than two child nodes</span></p>
20
New cards

SQL (Structured Query Language)

a database-specific language used for interacting with relational databases.

21
New cards

READ/SELECT

refers to the ability to retrieve or query data from a database in SQL

<p>refers to the ability to retrieve or query data from a database in SQL</p>
22
New cards

UPDATE

used to modify existing data in a table. This is part of the Data Manipulation Language (DML) in SQL. 

<p><span>used to modify existing data in a table. This is part of the Data Manipulation Language (DML) in SQL.&nbsp;</span></p>
23
New cards

DELETE

SQL statement is used to remove one or more rows (records) from a database table. 

<p><strong>SQL statement</strong> is used to remove one or more rows (records) from a database table.&nbsp;</p>
24
New cards

INSERT

a core command used to add new rows of data (also called records) to a table within a database

<p><span>a core command used to add new rows of data (also called records) to a table within a database</span></p>
25
New cards

DROP

command is used to permanently remove objects from a database. This is a powerful and irreversible action, so it should be used with caution

26
New cards

AVG

an aggregate function used to calculate the average (mean) value of a numeric column in a database table in SQL

27
New cards

COUNT

an aggregate function used to count the number of rows within a database table or a specific result set in SQL

28
New cards

DISTINCT

keyword is used in SELECT statements to retrieve only unique values from the specified column(s). It effectively removes duplicate records from the result set in SQL

29
New cards

LOWER

a built-in string manipulation function used to convert all characters within a specified string or string expression to lowercase. 

30
New cards

MAX

an aggregate function used to find the largest value in a specified column of a database table. 

31
New cards

MIN

an aggregate function that returns the minimum (lowest) value within a specified column

32
New cards

UPPER

a built-in string function that converts all characters within a given string to their uppercase equivalent

33
New cards

one-to-one relationship

between two tables means that each record in one table is associated with exactly one record in the other table, and vice versa in SQL

34
New cards

NOT NULL

a powerful tool to enforce data integrity within your database. It's a type of column constraint

35
New cards

UNIQUE

constraint in SQL dictates that every value in a specified column must be unique. This means no two rows can have the same value in that particular column or set of columns where the constraint is applied. 

36
New cards

Primary Key

a column (or a combination of columns) within a relational database table that serves as a unique identifier for each record (row) in that table

37
New cards

Foreign Key

  • a column or set of columns in one table that references the primary key of another table.

  • It establishes a link or relationship between these two tables.

38
New cards

JOIN

a clause used in SQL queries to combine rows from two or more tables based on a related column between them

39
New cards

one to many

a way to connect two tables where One row in Table A can be linked to many rows in Table B.

But, a single row in Table B can only be linked to one row in Table A. Helps avoid redundancy and maintain data integrity in SQl

40
New cards

many to many

describes a scenario where multiple records in one table can be associated with multiple records in another table in SQL

41
New cards

race condition

a scenario where multiple actions or operations try to access and modify the same data concurrently, leading to potential inconsistencies in the database.

42
New cards

SQL Injection Attacks

trick a database into executing unintended commands by cleverly inserting malicious code within user input, impacting the integrity and security of the application and its data