units 1-5 Flashcards
What does a Query Language allow a user to do?
retrieve or change data in a database
What are concurrent transactions? How do DBMS systems protect data during concurrent transactions?
Particularly challenging requirements for database systems. Prevents conflicts between concurrent transactions. Ensure transaction results are never lost.
What is a NoSQL database optimized for?
Big Data
Does a SELECT statement modify data in a database?
No, it only retrieves data from table.
In a VARCHAR(20), what does the 20 do?
it indicates 20 characters in the data
What is the root account used for in MySQL? What permissions does it have?
it is an administrative account that has full control over MySQL. Gives access to databases, tables and users
What character in MySQL is used to indicate the end of a command?
semi colon
What two things comprise a column in the relational model?
a name and data
What are keywords in SQL? What do they do? Be able to recognize examples
SELECT: selects data from the database Ex: Name
FROM: specifies the table(s) in which these data columns are located Ex: City
WHERE: specifies criteria that field values must meet for the records that contain the values to be included in the query results
EX: Population >
What is data independence? How does it relate to physical design?
The principle is that physical design never affects query results. It changes the tune of query performance, but not the application programs.
Be able to recognize the correct syntax for creating and deleting a database in MySQL.
Create Database and Drop Database
Given a CREATE TABLE statement, be able to tell how many columns are contained in the resulting table
SELECT COUNT(*) FROM INFORMATION_SCHEMA. COLUMNS WHERE table_name = ‘table_name’;
Be able to recognize the correct syntax for a SELECT statement that retrieves specified columns from
a specified table.
Select cloumn1,…cloumn2…
Given column names, be able to tell the best data type to use to store the information
Integer, Decimal, Character, Date and Time, Binary, Spatial, Document
Be able to recognize the syntax for preventing NULL values from appearing in a given column
NOT NULL
What does a NULL value represent?
unknown data
Be able to recognize the correct syntax to update a given field in a specified table
UPDATE TableName SET Column1 = Value1, Column2 = Value2, … WHERE condition;
What is a primary key? What is it used for?
is a column, or group of columns, used to identify a row. To ensure that each value identifies exactly one row
What is a foreign key? What is it used for? Be able to recognize one given tables in a relational
database
Is a column, or group of columns, that refers to a primary key. To link data in one table to data in another table.
CREATE TABLE TableName ( . . . FOREIGN KEY (ColumnName) REFERENCES TableName (ColumnName), . .