SQL

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Data Manipulation Language (DML)

DBMS language that changes database content, including data element creations, updates, insertions, and deletions. Create, read, update, or delete records (CRUD)

What year was SQL created?

1974

What are the basic commands in SQL?

Create, Select, Insert, Update, Drop, Delete

What does SQL stand for? What is it used for?

Structured Query Language. It's a computer language for storing, manipulating and retrieving data stored in a relational database.

What is RDBMS and what are some examples?

RDBMS stands for Relational Database Management System. RDBMS is the basis for SQL, and for all modern database systems such as MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access. The data in RDBMS is stored in database objects called tables. A table is a collection of related data entries and it consists of columns and rows.

Who is the father of relational databases and why?

In 1970, Dr. Edgar F. "Ted" Codd of IBM described a relational model for databases.

What does an SQL engine query handle?

SQL engine is defined as software that recognizes and interprets SQL commands to access a relational database and interrogate data. SQL engine is also commonly referred to as a SQL database engine or a SQL query engine.

Predicate

conditions

How do you get a count of the number of rows

SELECT COUNT (*) FROM

Command used to get a unique values from a column (won't get duplicate values)

SELECT DISTINCT

How to alias so columns will have different names

SELECT MAX(budget) AS max_budget, MAX(duration) AS max_duration FROM films;

Describe the BETWEEN command

SELECT ___(___) FROM ___ WHERE ___ BETWEEN ___ AND ___;

Choose words that start with B or the second letter is r and doesn't start with A

SELECT name FROM PEOPLE WHERE name LIKE 'B%' OR name LIKE '_r%' AND name NOT LIKE 'A%'

How to get the average, sum, maximum, or minimum?

SELECT AVG() SELECT SUM() SELECT MAX() SELECT MIN()

Comparison operators

= equal <> not equal < less than > greater than <= less than or equal to >= greater than or equal to

What does a classic query engine handle?

A classic query engine handles all the non-SQL queries

DDL (Data Definition Language)

A part of SQL that is used to create and modify objects of a database such as tables, views, functions and stored procedures

Describe the AND and OR and IN commands

AND and OR are logical operators and IN allows you to specify multiple values in a WHERE clause and is good can be used instead of multiple OR operators.

Expression

Represents value

What is a query dispatcher?

The function of the dispatcher is to route the query request to either CQE or SQE, depending on the attributes of the query. All queries are processed by the dispatcher. It cannot be bypassed.

What clause allows you to filter based on both text and numeric values in a table.

WHERE. WHERE always comes after FROM ex. SELECT title FROM films WHERE title = 'Metropolis';


Set pelajaran terkait

Taylor PrepU Ch 32 - Skin Integrity and Wound Care

View Set

Financial Accounting Exam 1 (Allen)

View Set

Unit 4 - cule, ose, ulent, let, ling

View Set

Chapter 5 - Real Estate Exam Review

View Set