Test Prep--SQL Flashcards
(105 cards)
What does RDBMS stand for?
Relational Database Management System
What is Microsoft’s Cloud based SQL Database called?
Micosoft Windows Azure SQL Database
What are the two standards for SQL?
ISO
ANSI
What does ISO stand for?
International Organization for Standards
What does ANSI stand for?
American National Standards Institute
If you have a choice between doing something in a standard way or a non standard way, which way should you do it?
The Standard way
What is the standard way to say “does not equal”?
<>
Is CAST or CONVERT the standard function?
CAST
What is the standard way to end all SQL statements?
with a ;
What does the word “Relation” in relational database refer to?
A Table
What are the two parts of a relation?
Heading
Body
What is the heading comprised of?
Attributes (or columns)
How is an attribute defined?
By name and type name. (Ex. User_id=Name and int=type name)
How is a body defined?
As a set of tuples (basically a row with each tuple being the value of a column). Each tuple’s heading is the heading of the relation (or table).
What are the mathmatical theories that underpin the relational model of SQL?
Set Theory
Predicate Logic
Why is the set {a,a,b,c,c,c,}= set {a,b,c}
Because a set has no duplicates and the duplicates get ignored.
What is the definition of a sequence?
An ordered set. Sets do not themselves have an inherent order.
Why is the set {a,a,b,c,c,c,}= set {a,c,a}
Because a set has no duplicates and no order.
What is a predicate?
An expression that when attributed to some object, makes a proposition either true or false (Ex. Create_date>’2012-03-04’)
When you add a predicate to a specific piece of data, then what do you have?
A proposition. (Ex. Asking whether Create_DATE>’2012-03-04’ for a specific user account.
What is a different name for a predicate?
A parameterized proposition.
What is the difference between SQL and T-SQL?
SQL is standard. T-SQL is the dialect of an extension to SQL that Microsoft implements in its RDBMS
Why should you try to avoid looping through tables with T-SQL?
Because the relational concept states that you should deal with sets as a whole not as individual parts. Iterative solutions should be avoided if at all possible.
What are other names for multi-set theory?
Bag or superset