SQL Fundamentals · Getting started
14 cards
SQL and Relational Databases
-
Quick check
Send the same statement again, but asking for artist number three. What comes back?
AOne row, with Aerosmith
Right. The row with artist_id three holds Aerosmith, and the select list asks only for the name.
BThree rows, for artists one, two and three
The condition keeps a single row, so the other artists stay out of the answer.
COne row, with the number three
The select list asks for the name column, so the answer holds the name and not the number.
2 / 14
-
Quick check
Nothing else changes, but the third album is moved to artist four. Which titles does the same statement return now?
ABalls to the Wall, Restless and Wild
Only rows whose artist_id is two are kept, and the third album no longer carries that number.
BBalls to the Wall only
Right. Only the second album row still carries artist_id two.
CRestless and Wild only
Restless and Wild now carries artist_id four, so the condition leaves it out.
4 / 14
-
Quick check
A team installs a product to hold its sales tables, and writes short statements to ask for last month's rows. Which reading is correct?
AThe statements are the product, and the installed software is the language
A statement is text that is sent to the product; it does not store the tables.
BThe installed product and the statements are two names for one thing
One is a language and the other is software that runs it, so they are not the same thing.
CThe installed product is the database system, and the statements are SQL
Right. The software keeps the data, and SQL is what the team writes to ask for it.
6 / 14
-
Keep your progress in the app
That’s 3 of 7 quick checks. In the app they stay answered, and every lesson remembers where you left off.
Keep reading hereOpens in your browser. Nothing to install.
Start studying -
Quick check
A small program has to carry its data inside one ordinary file, and nobody wants to install and run a server for it. Which description on the slide fits that need?
AThe object-relational system that uses and extends the SQL language
This description says nothing about a single file, nor about working without a server.
BThe system that applications and tools connect to
Applications and tools connect to it, so there is a server to install and reach.
CThe engine that reads and writes ordinary disk files
Right. That is the one with no separate server process and a database in a single file.
8 / 14
-
Quick check
The last line is removed, so the statement no longer sorts the rows. What can you still rely on?
AThe two track names are returned in the same order as before
Without a sorting line the order is not promised, so the earlier order is not guaranteed.
BThe same two rows are returned, in an order the database is free to choose
Right. The condition still keeps the same two tracks; only their order stops being fixed.
CThe rows are returned in the order in which they were priced
Nothing in the statement mentions prices as an order, so this is not promised either.
10 / 14
-
Quick check
A statement you were sent uses a data type that you cannot find in the documentation of the product your team runs. What is the reasonable next move?
ALook in that documentation for a data type that does the same job
Right. The documentation of the product you are using settles what it offers and what to write instead.
BSend the statement as it is, because the four products read SQL
A type that is documented as an addition of another product is exactly what yours may not have.
CDrop the statement, since nothing written elsewhere can be reused
Plain SQL does move between products; it is the extra parts that need a second look.
12 / 14
-
Quick check
You have written a plain SELECT statement at home and your new team uses a different product. What is the reasonable first assumption?
AIt has to be rewritten, because every product has its own language
The four products read SQL; only the parts documented as product-specific need rewriting.
BIt should run, because a plain statement uses the language all four share
Right. The shared core is what the standard covers, and that is what you wrote.
CIt will only run once the two products are installed side by side
One product is enough to run the statement; nothing has to be installed beside it.
14 / 14
-
7 quick checks · then the test
In the app, finishing the quick checks opens this lesson’s 10-question test, and the ones you miss come back exactly when you’re about to forget them.
Take this lesson’s test → Next lesson: Database Structure and Core VocabularyOpens in your browser. Nothing to install.
Start studying
The whole course, on your computer and your phone
Lessons you can read, audio you can listen to on the way to work, and practice that remembers what you got wrong.
Opens in your browser. Nothing to install.
Start studying“This app is the ‘One Lake’ for preparing the certification exams. Really worth it.”
