MySQL

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

SOURCE

A SQL command that instructs the client to read a text file from disk and execute its contents as if they were typed interactively by the user.

LOAD DATA

A SQL command that instructs the client to read a text file from disk and insert the data it contains into a database table.

rows columns

A database table is composed of one or more _____, each of which is composed of one or more ______.

row

A single record within a table, which may contain several fields

table

A subcontainer within a database that stores the actual data

primary key

A table's ______ is used to uniquely identify each item in that table.

database

A tool used to maintain state over time that contains complex secure data

Text File

A tool used to maintain state over time that contains small, non-secure data

session

A tool used to maintain state over time that contains user specific arrays and is located in a super global array

Hidden field

A tool used to maintain state over time that is embedded in forms

cookie

A tool used to maintain state over time that places variables on a clients machine

Case Sensitive

Although the entire language is not, we need to treat SQL as if it is ________ ________

Stateless Protocol

Because HTTP is a _________ _________ many tools are needed to authenticate and track users

Active/Inactive

Because relational databases can become complicated, instead of deleting rows we typically add a(n) ___________ column

\c

Canceling a line of input on the command line

DROP TABLE IF EXISTS

Command to delete a table if it already exists

DESCRIBE

Command used to see a database's field formats

SELECT * FROM

Command used to show all data in a table

USE

Command used to switch to a database

Browser issues request with filename and server name

First step in implementing cookies

Query

Formalized question that produces a result set

mysqli_real_escape_string

Function used to escape special characters in a string for use in an SQL statement

mysqli_connect

Function used to open a connection to the MySQL server. It takes parameters for host, username, and password.

mysqli_query

Function used to perform a query on the database

mysqli_select_db

Function used to select the default database to be used when performing queries against the database connection

natural join

In a relational database when two or more tables are joined together on the basis of common data in shared columns it is called a _________ __________

purpose predictability regularity

In order to be considered a database, a collection of data must possess the properties of organization and _____. The property of organization is generally achieved through ensuring data demonstrates both ______ and _______.

API

In order to communicate with a MySQL server from within our PHP program we use mysqli, which is a collection of routines that are installed as a PHP extension and collectively (and generally) known as an _____.

4kb

Maximum size of a cookie

header()

PHP code to insert HTTP header into server response, can be used to redirect user and prevents explicit reloads/insertions

Retrieve results

PSEUDO: Fifth step of using SQL with PHP

Connect to SQL Server as authorized user

PSEUDO: First step of using SQL with PHP, involves 1 sqli command

Send SQL statement

PSEUDO: Fourth step of using SQL with PHP, involves 1 sqli command

Establish desired DB

PSEUDO: Second step of using SQL with PHP, involves 1 sqli command

Incorporate SQL results as PHP data

PSEUDO: Sixth step of using SQL with PHP, using a while statement on an array and 1 sqli command

Compose SQL statement

PSEUDO: Third step of using SQL with PHP, involves sanitization

purpose

Part of an organized database, __________ is what determines requirements

predictability

Part of an organized database, __________ is what is needed to allow location to be easily identified

regularity

Part of an organized database, __________ standardizes structure

;

Punctuation used by MySQL to separate or end commands

mysqli_fetch_row()

Retrieve next row of result set in a numerically indexed array of columns and returns false when no more rows

mysqli_fetch_array()

Retrieve next row of result set in an array of columns indexed by both keys and integers and returns false when no more rows

mysqli_fetch_assoc()

Retrieve next row of result set in an associated array (indexed by keys/corresponding column name) and returns false when no more rows

case-insensitive

SQL commands and keywords are _______. The recommended style is uppercase.

Web server sends header with content type, cookie and webpage

Second step in implementing cookies

more

Sessions are ________ secure than cookies

NOT NULL, UNIQUE, KEY

Setting a column as a PRIMARY KEY gives the column the same attributes as _______ _______ ________

case-sensitive

Table names are ____ on Linux and OSX, but the opposite on Windows. The recommended style is lowercase for tables.

delete refuse

The biggest issues with cookies are that users can ________ or ________ them

CRUD

The conceptual model upon which SQL is constructed is commonly referred to as the ______ model.

daemon

The general name server administrators use to describe server programs that run all day every day without human intervention is _____.

database

The overall container for a collection of MySQL data used to represent entities

sanitize

The process of eliminating potentially problematic characters from a value prior to using that value within a program is commonly called ________.

virtual

The results of a join action can be considered an example of a _____ table

Browser receives cookie and sends it with every request

Third step in implementing cookies

SELECT

This SQL command can include calculated functions as well as column names

LIMIT

This SQL command returns only a set number of results and can include a starting point and length or just a length

JOIN ON

This SQL command will combine two tables based on the specified column

GROUP BY

This SQL command will return output showing information about a specific group of data

CHAR(n)

This SQL datatype allows a input of a specified length where the length is the parameter

VARCHAR(n)

This SQL datatype allows a input up to a certain length where the max length is the parameter

PHPSESSID

This cookie can be used even if the user has disabled or refused cookies

BLOB

This data type is binary and allows for up to 64kb of data and is typically used for passing images or GIFS

session_start()

This php code is required before any other output to begin a session

Signed

This word goes after a DOUBLE variable and specifies the value can be below 0. This word will cause the range to be -2.15e+9 to 2.15e+9

Unsigned

This word goes after a DOUBLE variable and specifies the value can't be below 0. This word will cause the range to be 0 to 4.29e+9

session_regenerate_id()

To avoid session fixation you can use this php command

IP address

To avoid session hijacking you can add the users _______ ______ to the session

WHERE

To control which rows of a table an UPDATE statement will effect, you should add a ______ clause.

session_destroy()

To end a session you use this PHP code

UNIQUE

To ensure a column value does not have the same value as another column in the same table you must add ________

NOT NULL

To ensure a column value has a value, when creating the column you must add _____________

TIMESTAMP

To have a database column default to the current date and time at which a row was created, set the datatype of that column to ________.

AUTO_INCREMENT

To have a database column default to the next integer in an ongoing sequence, add ______ quantifier to the columns definition.

salt, hash function

To prevent users passwords from being stored you should add ________ to the password and apply a _______ ________

redundancy

When designing a database, it is generally desirable to avoid _____, which is the needless repetition of values stored in the tables.

result set

When executed successfully, the SELECT statement generates a _______, which is conceptually similar to a virtual table in that it can be treated as if its a table when it doesn't actually exist in the database.

sorting indexing

When it comes to database predictability ___________ rows only allows for one row to be searched at a time and is time consuming. The preferred method to ensure predictability is _________ rows.

mysqli_error

When using mysqli, the ______ function can be used to access a textual description of the most recent error that occurred on the server.

ENGINE MyISAM

_____ tells MySQL the type of database engine to use for the creation of a table.

setcookie()

code used to start a cookie

SHOW

command used to display all databases

EXIT or QUIT

command used to end SQL session

HELP CONTENTS

command used to get assistance with SQL Statements

HELP

command used to get assistance with SQL commands

name, value

required parameters for cookies

column

the name of a field within a row

expiration to a past date

to delete a cookie you must use setcookie() and set the ____________


Ensembles d'études connexes

Art Appreciation Quiz #7 - Themes

View Set

Cognition, Perception, and Emotion-PSYCH

View Set

Chapter 2-2 (Economic Conditions Change)

View Set

Chapter 12 - Managing Workforce Flow

View Set

Gero midterm CH4 (21,1,2)// CH8//

View Set

Taxes, Retirement, and Other Insurance Concepts Quizzes

View Set

Corporate Finance MGMT 332 Chapter 16

View Set

Bus of Retail: Questions for Study

View Set