SQL

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

What are Tables and Fields?

A table is an organized collection of data stored in the form of rows and columns. The columns in a table are called fields while the rows can be referred to as records.

What is DBMS?

Database Management System. DBMS is a system software responsible for the creation, retrieval, updation and management of the database

What is the difference between SQL and MySQL?

SQL is a standard language used for retrieving and manipulate database. MySQL is a relational database management system like MS SQL and Oracle.

What is SQL?

SQL stands for Structured Query Language. SQL is useful in handling organized data comprised of entities (variables) and relations between different entities of the data.

write a SQL Statement to add primary key constraint 'pk_a' for table 'table_a' and fields 'col_b, col_c'

ALTER TABLE table_a ADD CONSTRAINT pk_a PRIMARY KEY(col_b, col_c);

write a SQL statement to add PRIMARY KEY 't_id' to the table 'teachers.'

ALTER TABLE teachers ADD PRIMARY KEY(t_id);

List its different types.

LEFT OUTER JOIN, INNER JOIN, RIGHT OUTER JOIN, FULL OUTER JOIN

What are Constraints in SQL?

NOT NULL - Restricts NULL value from being inserted into a column. CHECK - Verifies that all values in a field satisfy a condition. DEFAULT - Automatically assigns a default value if no value has been specified for the field. UNIQUE - Ensures unique values to be inserted into the field. INDEX - Indexes a field providing faster retrieval of records. PRIMARY KEY - Uniquely identifies each record in a table. FOREIGN KEY - Ensures referential integrity for a record in another table.

What is RDBMS?

Relational Database Management System

What is a Join?

SQL Join clause is used to combine records (rows) from two or more tables in a SQL database based on a related column between the two.

What is a Self-Join?

case of regular join where a table is joined to itself based on some relation between its own column(s).

What is a Foreign Key?

comprises of single or collection of fields in a table that essentially refer to the PRIMARY KEY in another table.

What is a UNIQUE constraint?

constraint ensures that all values in a column are different. This provides uniqueness for the column(s) and helps identify each row uniquely. Unlike primary key, there can be multiple unique constraints defined per table.

How is RDBMS it different from DBMS?

is that RDBMS stores data in the form of a collection of tables and relations can be defined between the common fields of these tables.

What is Database?

organized collection of data, stored and retrieved digitally from a remote or local computer system

What is a Query?

request for data or information from a database table or combination of tables. A database query can be either a select query or an action query.


Set pelajaran terkait

Fundamental Principles of Taxation

View Set

Exam #2 Material- Principles of Marketing (chp. 4)

View Set

NMNC 1110 EAQ 10: Safety and Infection Control (Mastery)

View Set