The flashcards below were created by user greinert on FreezingBlue Flashcards.

  1. Foreign Key
    Identifies a row in a related table.
  2. Intersection of a row and column is a ____.
  3. Column is a _________.
  4. Row is a _______
  5. Primary Key
    Uniquely identifies each row in a table
  6. SQL
    Structured Query Language
  7. API
    Application Programming Interface
  8. DBMS
    Database Management System
  9. 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.
  10. Change to this database. You need to change to some database when you first connect to MySQL.
    USE database_name
  11. Lists all MySQL databases on the system.
  12. Lists all tables from the current database or from the database given in the command.
    SHOW TABLES [FROM database_name]
  13. 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
  14. Allows the user to set his/her own password.
    SET PASSWORD=PASSWORD('new_password')
  15. Creates a table with columns as indicated in the create clauses.
    CREATE TABLE table_name (create_clause1, create_clause2, ...)
  16. 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
  17. 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, ...)
  18. 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]
  19. Loads data from the listed file into the table.
    LOAD DATA LOCAL INFILE 'path to external file' INTO TABLE table_name
  20. Creates a new user on MySQL, with no rights to do anything.
    GRANT USAGE ON *.* TO user_name@localhost [IDENTIFIED BY 'password']
  21. 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
  22. Allows the user to set his/her own password.
    SET PASSWORD=PASSWORD('new_password')
  23. Revokes all permissions for the user, but leaves the user in the MySQL database.
    REVOKE ALL ON [database_name.]* FROM user_name@localhost
Card Set:
2013-02-26 21:44:25

SQL concepts, terminology, and commands
Show Answers: