The document provides an overview of key concepts related to databases and SQL. It explains ACID properties (Atomicity, Consistency, Isolation, Durability), which ensure transaction reliability. It describes the SQL STUFF() function, which modifies strings by deleting and inserting parts. The docum...
SQL Interview Questions
1. What is SQL?
Structured Query Language is a database tool which is used to create and access database to
support software application.
2. What are different types of statements supported by SQL?
3. What is DBMS?
A Database Management System (DBMS) is a program that controls creation,
maintenance and use of a database.
,DBMS can be termed as File Manager that manages data in a database rather
than saving it in file systems.
4. What is RDBMS?
RDBMS stands for Relational Database Management System. RDBMS store
the data into the collection of tables, which is related by common fields
between the columns of the table. It also provides relational operators to
manipulate the data stored into the tables.
Example: SQL Server.
5. Why do we use SQL constraints? Which constraints we can use while creating
database in SQL?
Constraints are used to set the rules for all records in the table. If any
constraints get violated then it can abort the action that caused it.
Constraints are defined while creating the database itself with CREATE
TABLE statement or even after the table is created once with ALTER
TABLE statement.
There are 5 major constraints are used in SQL, such as:
NOT NULL: That indicates that the column must have some value and
cannot be left null
UNIQUE: This constraint is used to ensure that each row and column
has unique value and no value is being repeated in any other row or
column
PRIMARY KEY: This constraint is used in association with NOT
NULL and UNIQUE constraints such as on one or the combination of
more than one column to identify the particular record with a unique
identity.
FOREIGN KEY: It is used to ensure the referential integrity of data in
the table and also matches the value in one table with another using
Primary Key
CHECK: It is used to ensure whether the value in columns fulfills the
specified condition
6. What are different JOINS used in SQL?
,
,
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller gracemmuiruri. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $10.49. You're not tied to anything after your purchase.