Computer Science - 9210 OxfordAQA

Structured Query Language (sql)

Übersicht

A database with a million records is useless unless you can ask it a question and get the four rows you actually wanted. The language for asking is SQL, and its central idea is unusual for a programming language: you describe what you want rather than how to find it. You do not write a loop over a million records. You say which fields, from which tables, matching which condition, and the database works out the rest.

This lesson covers the commands the specification names. You will learn to retrieve data with SELECT, FROM and WHERE, including queries that draw on two tables at once; to add a record with INSERT INTO; and to edit and delete data with UPDATE and DELETE FROM. You will also learn the single most consequential detail in the whole topic, which is what happens to an UPDATE or a DELETE that is missing its WHERE clause.

Ziele

  1. Be able to use SQL to retrieve data from a relational database, using the commands:
  2. SELECT
  3. FROM
  4. WHERE. Be able to use SQL to insert data into a relational database using INSERT INTO. Be able to use the SQL commands UPDATE and DELETE FROM to edit and delete data in a database.

Mindmap

Dieses Thema ist als Karte dargestellt, damit die Zusammenhange sichtbar werden.

Mindmap in der App offnen

Lektionshinweis

SQL, structured query language, is the language used to work with a relational database. A statement written in it is a description of a result rather than a set of instructions for producing one, which is why the same short query works whether the table holds six records or six million.

Vollstaendige Lernnotiz in der Green Bridge App

Holen Sie sich die Green Bridge CBT App auf Handy oder Computer fuer die komplette IGCSE-Bibliothek: fruehere Pruefungen, Bewertungsschemata, Mindmaps, Lernkarten und Audiolektionen.

Vollständige Lernnotizen mit Diagrammen
KI-gestützter Lernassistent
Pruefungssimulationen auf Zeit, sofort nach Abgabe bewertet
Verfügbar für Android, Windows, macOS und Linux iOS-App demnachst verfugbar

Unterrichtsbewertung

Herzlichen Glückwunsch zum Abschluss der Lektion über Structured Query Language (sql). Jetzt, da Sie die wichtigsten Konzepte und Ideen erkundet haben,

Sie werden auf eine Mischung verschiedener Fragetypen stoßen, darunter Multiple-Choice-Fragen, Kurzantwortfragen und Aufsatzfragen. Jede Frage ist sorgfältig ausgearbeitet, um verschiedene Aspekte Ihres Wissens und Ihrer kritischen Denkfähigkeiten zu bewerten.

Nutzen Sie diesen Bewertungsteil als Gelegenheit, Ihr Verständnis des Themas zu festigen und Bereiche zu identifizieren, in denen Sie möglicherweise zusätzlichen Lernbedarf haben.

  1. Which SQL clause states which records a query should return? A. SELECT B. FROM C. WHERE D. INSERT INTO Answer: C
  2. Which query correctly finds the names of all cats and all birds in a table called Pet? A. SELECT Name FROM Pet WHERE TypeOfAnimal = 'Cat' AND TypeOfAnimal = 'Bird' B. SELECT Name FROM Pet WHERE TypeOfAnimal = 'Cat' OR TypeOfAnimal = 'Bird' C. SELECT Name FROM Pet WHERE TypeOfAnimal = Cat OR Bird D. SELECT Name FROM Pet WHERE TypeOfAnimal = 'Cat' OR 'Bird' Answer: B
  3. What does the statement DELETE FROM Booking do if it has no WHERE clause? A. Nothing, because a WHERE clause is required B. It deletes the first record only C. It deletes every record in the Booking table D. It deletes the Booking table's field names Answer: C
  4. Which command is used to change the value already stored in a field? A. SELECT B. INSERT INTO C. UPDATE D. DELETE FROM Answer: C
  5. In a query drawing on two tables, what is the purpose of a condition such as Pet.PetID = Appointment.PetID? A. It sorts the results into order B. It matches each record in one table with the correct record in the other C. It deletes records that appear in both tables D. It renames a field Answer: B

Bearbeiten Sie diese Fragen in der App

Bearbeiten Sie diese Fragen in der App

Übungsklausuren üben

Möchten Sie Übungsklausuren zu Structured Query Language (sql) üben? Laden Sie die Green Bridge CBT App herunter, um Übungsklausuren und vollständige Prüfungssimulationen zu diesem Thema zu erhalten.

Lade die App im Google Playstore herunter.

Alles, was du brauchst, um in JAMB, WAEC & NECO zu glänzen.

Green Bridge CBT Mobile App
Personalisierter KI-Lern-Chat-Assistent
Über 200.000 Prüfungsfragen für IGCSE, JAMB, WAEC und NECO.
Über 1200 Unterrichtsnotizen
Offline-Unterstützung - Lernen jederzeit und überall
Fahrplan der Grünen Brücke
Literaturzusammenfassungen & Potenzielle Fragen
Verfolgen Sie Ihre Leistung und Ihren Fortschritt
Detaillierte Erklärungen für umfassendes Lernen