The flashcards below were created by user
greinert
on FreezingBlue Flashcards.
-
Foreign Key
Identifies a row in a related table.
-
Intersection of a row and column is a ____.
Cell
-
Column is a _________.
Field
-
-
Primary Key
Uniquely identifies each row in a table
-
SQL
Structured Query Language
-
API
Application Programming Interface
-
DBMS
Database Management System
-
ACID
An acronym standing for atomicity, consistency, isolation, and durability. These properties are all desirable in a database system, and are all closely tied to the notion of a transaction.
-
Change to this database. You need to change to some database when you first connect to MySQL.
USE database_name
-
Lists all MySQL databases on the system.
SHOW DATABASES
-
Lists all tables from the current database or from the database given in the command.
SHOW TABLES [FROM database_name]
-
These commands all give a list of all columns (fields) from the given table, along with column type and other info.
- DESCRIBE table_name
- SHOW FIELDS FROM table_name
- SHOW COLUMNS FROM table_name
- Lists all indexes from this tables.
- SHOW INDEX FROM table_name
-
Allows the user to set his/her own password.
SET PASSWORD=PASSWORD('new_password')
-
Creates a table with columns as indicated in the create clauses.
CREATE TABLE table_name (create_clause1, create_clause2, ...)
-
Removes the table from the database. Permanently! So be careful with this command!
DROP TABLE table_name
- Adds the listed columns to the table.
- ALTER TABLE table_name ADD (create_clause1, create_clause2, ...)
- Drops the listed columns from the table.
- ALTER TABLE table_name DROP column_name
-
Insert a complete row of data, giving a value (or NULL) for every column in the proper order.
INSERT [INTO] table_name VALUES (value1, value2, ...)
-
Alters the data within a column based on the conditions in the where_clause.
UPDATE table_name SET column_name1=value1, column_name2=value2, ... [WHERE where_clause]
-
Loads data from the listed file into the table.
LOAD DATA LOCAL INFILE 'path to external file' INTO TABLE table_name
-
Creates a new user on MySQL, with no rights to do anything.
GRANT USAGE ON *.* TO user_name@localhost [IDENTIFIED BY 'password']
-
Grants permissions on all tables for a specific database (database_name.*) to a user. Permissions are for: ALTER, CREATE, DELETE, DROP, INDEX, INSERT, SELECT, UPDATE.
GRANT ALL ON database_name.* TO user_name@localhost
-
Allows the user to set his/her own password.
SET PASSWORD=PASSWORD('new_password')
-
Revokes all permissions for the user, but leaves the user in the MySQL database.
REVOKE ALL ON [database_name.]* FROM user_name@localhost
|
|