1. Different SQL Server Editions in a tabular form.
Find out which features
each one has?
Enterprise is the premium edition with the most features and
capabilities, while Standard offers a more limited feature set at a lower
cost. Express is a free, entry-level edition with significant limitations on
resources and features.
2. Difference between Service and application
A service is a process that runs in the background, providing
functionality or support to other applications or the operating system,
often without direct user interaction. An application, on the other hand,
is a program designed for direct user interaction, offering a user
interface for specific task
3. Overview of SQL Server Authentication Modes
Windows Authentication Mode:
SQL Server Authentication:
4. Overview - SQL Server's [server side] different services
5. Overview Security --> Login / Roles / Credentials
6. Difference between "Named Instance" and Default Instance" of SQL Server
One instance can be the default instance. The default instance has the name
of the desktop or pc. If a connection request specifies only the name of the
computer, the connection is made to the default instance. A named instance
is one where you specify an instance name when installing the instance.
7. How many named instances can be installed on one single machine
There can be 49 named instances and 1 default instance installed on a pc
8. Overview of all 4 system databases and their usage
1. master:
This database is the heart of the SQL Server instance. It stores all system-
level information, including:
Login accounts and their permissions.
Configuration settings for the server.
Information about other databases within the instance.
Endpoints and linked servers.
2. model:
This database acts as a template for creating new user databases. Any time
a new database is created, it's essentially a copy of the model database.
Therefore, any changes made to model will be reflected in newly created
databases.
3. msdb:
The msdb database is used by SQL Server Agent, a component of SQL Server
for scheduling tasks and automating operations. It stores information related
to:
Backup and restore history.
Alerts and jobs.
Service Broker information.
Replication.
4. tempdb:
This is a globally shared, temporary workspace used by all users and
connections to the SQL Server instance. It stores:
Temporary tables and stored procedures.
Worktables for sorting and other operations.
Row versions for snapshot isolation.
Internal objects used by the database engine.
9. Keys concepts
1. Candidate Key
A Candidate Key is a set of one or more fields/columns that can identify a
record uniquely in a table. There can be multiple Candidate Keys in one
table. Each Candidate Key can work as a Primary Key.
2. Primary Key
A primary key is a set of one or more fields/columns of a table that
uniquely identifies a record in a database table. It cannot accept null, or
duplicate values.
3. Super Key
A super key is a set of one or more than one key that can be used to
identify a record uniquely in a table. Example: Primary key, Unique key,
and Alternate key are a subset of Super Keys.
4. Alternate key
An Alternate key is a key that can work as a primary key. It is a candidate
key that currently is not a primary key. It is also called a secondary key.
5. Composite/Compound Key
A composite Key is a combination of more than one field/column of a
table. It can be a Candidate key or a primary key.
6. Unique Key
Unique Key can be a column or set of columns that can be used to
uniquely identify the tuple from the database. One or more fields can be
declared as a unique Key. The unique Key column can also hold the NULL
value. The use of unique keys improves the performance of data retrieval.
It makes searching for records from the database much faster & efficient.
7. Foreign Key
A foreign key is an attribute that is a Primary key in its parent table but is
included as an attribute in another host table. The relation that is being
referenced is called the referenced relation and the corresponding
attribute is called the referenced attribute. The relation that refers to the
referenced relation is called a referencing relation and the corresponding
attribute is called a referencing attribute. The referenced attribute of the
referenced relation should be the primary key to it.
10. Table relationships [reference keys]
11. Overview of ETL Tools [Extraction Transformation and loading] MS ETL
tool is SSIS SSRS SSAS [BI - Business Intelligence]
12. Mode for an application with which to connect to a SQL Server database
[pros and cons]
1. 🔒 Windows Authentication Mode
Windows Authentication uses the Windows credentials of the user or
service running the application to connect to SQL Server.
✅ Pros
Integrated Security: No need to store or manage passwords in the
application.
Centralized Account Management: Uses Active Directory (AD),
making it easier to manage users and policies.
Stronger Security: Supports Kerberos, NTLM, and other secure
authentication protocols.
No Password Transmission: Credentials are not sent over the
network.
Supports Group Policies: Easily manage access by AD groups.
Single Sign-On (SSO): Users logged into Windows can access SQL
Server without re-authenticating.
❌ Cons
Platform Limitation: Works best in Windows environments; non-
Windows clients may face challenges.
Complex Configuration: Requires AD infrastructure and proper setup
(e.g., SPNs for Kerberos).
Limited for External Users: Difficult to use for users outside your
domain or organization.
Application Pool or Service Account Needed: For web apps or
services, must configure service account permissions properly.
2. 🔐 SQL Server Authentication Mode
SQL Server Authentication uses a SQL Server-specific username and
password stored in SQL Server.
✅ Pros
Cross-Platform: Works regardless of the client OS or environment.
Easy for External/Legacy Apps: Useful when AD integration is not
possible.
Simple to Configure: No dependency on Windows/AD setup.
Supports Mixed Environments: Can be used alongside Windows
Authentication in Mixed Mode.
❌ Cons
Password Management: You must securely store, rotate, and
manage passwords within your app.
Security Risk: Passwords can be intercepted if not encrypted (use
TLS/SSL).
No Single Sign-On: Users must supply credentials explicitly.
More Vulnerable to Brute Force Attacks: Requires strong
password policies and monitoring.
No Centralized User Management: User administration is separate
from Windows accounts.
13. overview of multi-threaded applications
What is a Multi-Threaded Application?
A multi-threaded application is a program that can perform multiple
operations concurrently by running multiple threads within a single
process.
Threads share the same memory but can execute independently,
improving performance especially on multi-core CPUs.
How Multi-Threaded Applications Work with SQL Server
SQL Server is designed to support multiple concurrent
connections and queries from many clients or threads.
Each client thread typically creates its own database connection or
shares a connection pool.
SQL Server internally manages query execution with its own thread
pool and scheduler.
14. Table components
1. 📋 Tables
Definition: Permanent database objects that store data in rows and
columns.
Scope: Database-wide and persistent until explicitly dropped.
Use case: Store core data like employees, orders, products, etc.
Characteristics:
o Supports indexes, constraints, triggers.
o Data persists after session ends.
o Can be large, support heavy transactions.
2. 🕒 Temporary Tables
a. Local Temporary Tables (#TableName)
Definition: Temporary tables visible only to the current
session/connection.
Scope: Session-level; automatically dropped when the session ends.
Use case: Store intermediate results in complex queries or stored
procedures.
Example: CREATE TABLE #TempOrders (...)
b. Global Temporary Tables (##TableName)
Definition: Temporary tables visible to all sessions.
Scope: Global; dropped when the last session referencing it closes.
Use case: Share temporary data between multiple sessions.
Example: CREATE TABLE ##GlobalTemp (...)
3. 🔖 Table Variables (@TableVariable)
Definition: Variables that store table-like data within a batch,
procedure, or function.
Scope: Batch or procedure only.
Use case: Small sets of data, lightweight temporary storage.
Characteristics:
o Declared with DECLARE @TableVar TABLE (...).
o Not affected by transaction rollbacks.
o Limited indexing options compared to temp tables.
o Statistics are not maintained, which may affect query
optimization.
4. Views
Definition: Virtual tables representing the result of a stored query.
Scope: Database-wide, persistent.
Use case: Simplify complex queries, provide security by restricting
columns/rows, encapsulate business logic.
Characteristics:
o No physical data storage (except indexed views).
o Always return fresh data from underlying tables.
o Can be used like tables in SELECT queries.