0% found this document useful (0 votes)
25 views16 pages

Agileand DBMS

The document provides an overview of Agile methodology and key concepts like sprints, roles, artifacts, ceremonies, and tools used in Agile. It discusses Scrum and Crystal as types of Agile methodology and defines terms like velocity, product owner, scrum master, backlog, daily scrum. It also covers database concepts like DBMS, RDBMS, normalization, indexes, constraints, SQL injection.

Uploaded by

wardah.2944
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views16 pages

Agileand DBMS

The document provides an overview of Agile methodology and key concepts like sprints, roles, artifacts, ceremonies, and tools used in Agile. It discusses Scrum and Crystal as types of Agile methodology and defines terms like velocity, product owner, scrum master, backlog, daily scrum. It also covers database concepts like DBMS, RDBMS, normalization, indexes, constraints, SQL injection.

Uploaded by

wardah.2944
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Contents

Agile methodology: ................................................................................................................ 2


What do you mean by refactoring? ...................................................................................... 3
. What are different types of Agile Methodology? ............................................................. 3
Scrum ................................................................................................................................ 3
Crystal Methodology........................................................................................................... 3
What do you mean by the term “velocity” in Agile? ............................................................... 3
Sprint: ................................................................................................................................ 4
Sprint roles, artifacts and ceremonies ................................................................................. 4
• Product owner ........................................................................................................ 4
• Scrum master:........................................................................................................ 4
• Scrum team ........................................................................................................... 5
Sprint workflow and process ............................................................................................... 5
• Backlog .................................................................................................................. 5
• Sprint planning ....................................................................................................... 5
• Sprint backlog ........................................................................................................ 6
• Sprint ..................................................................................................................... 6
• Daily scrum ............................................................................................................ 6
• Sprint end .............................................................................................................. 6
Scrum vs. sprint ................................................................................................................. 7
Scrum productivity tools ..................................................................................................... 7
Jira ..................................................................................................................................... 7
Key JIRA concepts ........................................................................................................... 7
Database management: ......................................................................................................... 8
1. **What is a database management system (DBMS)?** .................................................... 8
2. **Differentiate between DBMS and RDBMS.** ................................................................. 9
Normalization .................................................................................................................... 9
4. **What are the different types of database normalization?** ............................................ 9
5. ACID properties in the context of database transactions.**.......................................... 9
6. **What are database indexes, and why are they used?** ............................................... 10
7. **Differentiate between clustered and non-clustered indexes.**.................................... 10
8. **Explain the purpose of database constraints.** .......................................................... 10
9. **What is the difference between a primary key and a foreign key?** .............................. 10
10. **Explain the concept of SQL injection and how to prevent it.** .................................... 11
DB queries ....................................................................................................................... 11
1. **Creating a Table with Primary Key Constraint**: ...................................................... 11
2. **Adding a Foreign Key Constraint**: ......................................................................... 11
3. **Adding a Unique Constraint**: ................................................................................ 12
4. **Adding a Not Null Constraint**: .............................................................................. 12
5. **Adding a Check Constraint**: ................................................................................. 12
6. **Dropping a Constraint**: ........................................................................................ 13
7. **Enabling/Disabling Constraints**: .......................................................................... 13
Joins in DB:....................................................................................................................... 13
Add, Create, Delete, Update, Truncate, Drop Queries: ....................................................... 14
Max/Min, Count, OrderBy, SortBy, GroupBy: ...................................................................... 14
DDL (Data Definition Language): ....................................................................................... 15
DML (Data Manipulation Language): .................................................................................. 15
DCL (Data Control Language):........................................................................................... 15
TCL (Transaction Control Language):................................................................................. 15

Agile methodology:

Agile Methodology, as the name suggests, is a set of methods and


practices where software development and project management take
place to deliver customer-centric products in a short development cycle
known as sprints(set period of time during which specific work has to be
completed and made ready for review.)

. It is an iterative approach and each iteration is specially designed to be


small and manageable so that it can be delivered in a specific given
period of time. Agile methodologies are open to changing requirements
over time and encourage constant feedback from end-users. It is the
most popular approach because, in this process, customers are also
involved so that they can get updates regarding their product and also
make sure whether or not they are meeting their requirements.
What do you mean by refactoring?
Re-factoring is basically an activity that involves alteration or modification
of the internal structure of software without any change in its external
behaviors or functionality.

. What are different types of Agile Methodology?

Scrum:

Scrum is the specific, framework used under the Agile umbrella to develop
complex products. The term scrum is also used to describe the daily,
standup meetings that occur during a sprint. Scrum prescribes for teams
to break work into goals to be completed within time-boxed iterations(
sprints ).

Crystal Methodology:
It mainly focuses on individuals and their interactions rather than
processes.

What do you mean by the term “velocity” in Agile?


A velocity is basically a measurement unit that measures or calculates
how much work an agile development team can successfully complete in
a single sprint and how much time will be required to finish a project.
Sprint:

In Agile product development, a sprint is a set period of time during which


specific work has to be completed and made ready for review.

Each sprint begins with a planning meeting. During the meeting, the
product owner (the person requesting the work) and the development team
agree upon exactly what work will be accomplished during the sprint. The
development team has the final say when it comes to determining how
much work can realistically be accomplished during the sprint, and the
product owner has the final say on what criteria need to be met for the
work to be approved and accepted.

The duration of a sprint is determined by the scrum master, the team's


facilitator and manager of the Scrum framework. Once the team reaches a
consensus for how many days a sprint should last, all future sprints should
be the same. Traditionally, a sprint lasts 30 days.

Sprint roles, artifacts and ceremonies


A variety of roles are involved in a sprint, with each working on different
parts of the process. These roles include:

• Product owner: This person represents the business or user


community and is a liaison between the development team and
customers. The product owner is in charge of working with the
user group to define, prioritize and adjust what features will be in
the product release. They also accept or reject work results and
keep customers upraised of the project’s status.
• Scrum master: This person is the main facilitator for the project’s
development team. They manage the process for how information
is exchanged during the sprint, including leading stand-up
meetings and helping the team stay on track by mediating
problems and removing obstacles. Their main focuses are
transparency, observation and organization.
• Scrum team: This group of people is responsible for executing the
work. In addition to developers, the scrum team can contain
testers, architects, designers and IT operations While the scrum
master is charged with protecting the team and keeping focus,
the team itself is self-managed and ultimately responsible for
collectively determining how to reach their goals.

Artifacts provide the information that a scrum team needs to understand


the product under development, as well as completed and planned
activities for the project. Artifacts include:

• backlog
• Burn down charts
• User stories (A user story is an informal, general explanation of a
software feature written from the perspective of the end user. Its
purpose is to articulate how a software feature will provide value
to the customer.)

Sprint workflow and process


The sprint workflow is intended to help team members evaluate their work
and communicate with each other throughout the entire process. The
workflow is followed for each sprint. The process includes:

• Backlog - A list of set tasks that must be completed before the


product is released. The backlog is built by the product owner.
The product owner gives a backlog of prioritized items to the
scrum master and scrum team. The backlog is based on user
stories, which focus on features that consider the type of end
user, what they want and why.
• Sprint planning - The team discusses top priority user stories and
decides what can be delivered in the sprint.
• Sprint backlog - Agreed upon by the entire team, this list finalizes
and defines what the development team will complete during the
sprint.
• Sprint – The time frame in which the work must be completed –
often 30 days.

6. What's the difference between sprint backlog and product backlog?

Sprint Backlog: It is generally owned by the development team. It only


contains those features and requirements that are related to the specific
sprint only. It is considered a subset of the product backlog. It is compiled
of everything that must be done to complete a particular sprint. It only
includes items that can be completed during each agile sprint. It is
specific to the sprint goal only in a particular sprint.
Product Backlog: It is generally owned and maintained by the project
owner. It usually contains each and every feature of the product as well
as the requirements of the product. It is compiled to everything that must
be done to complete the whole process. It just breaks down every item
into a series of steps. It is more specific to the end goal of the product.

• Daily scrum – Lead by the scrum master, the team comes


together for short daily meetings, in which they discuss what they
have completed, what they are working on and any issues that are
blocking the work.
• Outcome - The outcome of a sprint is a hypothetically usable
product. The product owner can decide if the product is ready or if
additional features are needed.
• Sprint end - At the end of a sprint, two meetings are held:
o Sprint review – The team shows their work to the product
owner.
o Sprint retrospective – The team discusses what they can
do to improve processes. An important goal
is continuous improvement.
Scrum vs. sprint
Scrum is the specific, framework used under the Agile umbrella to develop
complex products. The term scrum is also used to describe the daily,
standup meetings that occur during a sprint.

Sprints are time-boxed periods of one week to one month, during which a
product owner, scrum master, and scrum team work to complete a
specific product addition. During a sprint, work is done to create new
features based on the user stories and backlog. A new sprint starts
immediately after the current sprint ends.

Scrum productivity tools


Today's marketplace offers a multitude of scrum productivity tools. Each is
designed to help product development teams follow the scrum/sprint
methodology efficiently and accurately.

Popular scrum tools include:

Jira

JIRA is a project management tool that allows software developers to plan,


track and work quicker.
Key JIRA concepts
Some of the key concepts in Jira are:

1. Projects: They are used to organize and manage work within Jira.
Each project contains a set of issues and can have its own custom
fields, workflows, and permission schemes.

2. Issues: They are the primary unit of work in Jira. They represent
tasks, bugs, and other work items that need tracking and
managing. Issues can be assigned to individuals or teams with
various attributes like priority, status, and due date.
3. Workflows: They define the lifecycle of an issue, including its
status and transitions. Jira has a default workflow, but it can also
be customized to match the needs of a specific project.

4. Boards: They are used to visualize and manage the progress of


issues in a project. Jira has three types of boards: Scrum boards,
Kanban boards, and Agile boards.

5. Sprints: Sprints are time-boxed periods of work in Scrum


methodology. Sprints help teams to focus on a specific set of
tasks and deliverables within a fixed timeframe.

6. Epics: Epics are large work items that are broken down into
smaller issues. They provide a high-level view of the work that
needs to be done and help teams to prioritize their work.

7. Versions: Versions are used to track and manage releases of a


project. They represent a specific set of features or fixes that are
ready to be shipped to users.

8. Dashboards: Dashboards provide a customizable view of project


information, such as status, progress, and key metrics.
Dashboards can be shared with team members or stakeholders to
provide visibility into the project.

Database management:
Certainly! Here are some common technical interview questions related to database
management along with their answers:

1. **What is a database management system (DBMS)?**


- **Answer:** A database management system (DBMS) is a software application that
facilitates the creation, management, and manipulation of databases. It provides
functionalities for storing, retrieving, updating, and deleting data in a structured
manner.
2. **Differentiate between DBMS and RDBMS.**
- **Answer:** DBMS manages databases without enforcing relationships between
tables, while RDBMS (Relational Database Management System) stores data in tables
with relationships between them. RDBMS follows the relational model and enforces
integrity constraints to maintain data accuracy and consistency.

Normalization
- **Answer:** Normalization is the process of organizing data in a database to reduce
redundancy and dependency, thereby improving data integrity. It involves dividing large
tables into smaller, related tables and defining relationships between them.
Normalization helps eliminate data anomalies and ensures efficient storage and
retrieval of data.

4. **What are the different types of database normalization?**


- **Answer:** The different types of database normalization are:
- First Normal Form (1NF)
- Second Normal Form (2NF)
- Third Normal Form (3NF)

5. ACID properties in the context of database transactions.**


A transaction is a sequence of one or more database operations (such as insert,
update, delete) that are treated as a single unit of work.
- **Answer:** ACID stands for Atomicity, Consistency, Isolation, and Durability. These
properties ensure the reliability and integrity of database transactions:
- Atomicity: Transactions are atomic, meaning they are either executed in full or not
at all.
- Consistency: Transactions preserve the consistency of the database by
transforming it from one consistent state to another.
- Isolation: Transactions are isolated from each other, ensuring that the execution of
one transaction does not affect the concurrent execution of others.
- Durability: Once a transaction is committed, its changes are permanent and will
persist even in the event of system failures.
6. **What are database indexes, and why are they used?**
- **Answer:** Database indexes are data structures that improve the speed of data
retrieval operations by providing quick access to rows in a table. They are used to
optimize query performance by reducing the number of disk accesses required to
locate specific data. Indexes are typically created on columns frequently used in
search conditions or join operations.

7. **Differentiate between clustered and non-clustered


indexes.**
- **Answer:**
- Clustered Index: In a clustered index, the physical order of rows in the table
matches the order of the index. Each table can have only one clustered index, and it
determines the physical arrangement of the data on disk.
- Non-clustered Index: In a non-clustered index, the order of rows in the index does
not match the physical order of data in the table. Multiple non-clustered indexes can be
created on a table, and they store a separate list of pointers to the actual data rows.

8. **Explain the purpose of database constraints.**


- **Answer:** Database constraints are rules enforced on data to maintain data
integrity and consistency. They define the allowable values and relationships within the
database. Common types of constraints include primary key, foreign key, unique key,
not null, check, and default constraints.

9. **What is the difference between a primary key and a


foreign key?**
- **Answer:**
- Primary Key: A primary key is a column or combination of columns that uniquely
identifies each row in a table. It ensures that each row has a unique identifier and
cannot contain null values.
- Foreign Key: A foreign key is a column or set of columns that establishes a
relationship between two tables. It refers to the primary key of another table and
enforces referential integrity, ensuring that values in the foreign key column match
values in the primary key column of the referenced table.
10. **Explain the concept of SQL injection and how to prevent
it.**
- **Answer:** SQL injection is a security vulnerability that occurs when malicious SQL
queries are inserted into input fields of an application, allowing attackers to manipulate
the database. To prevent SQL injection, developers should:
- Use parameterized queries or prepared statements to sanitize user inputs.
- Implement input validation to ensure that only valid data is accepted.
- Apply least privilege principles by restricting database user permissions.
- Regularly update and patch the database management system to address known
vulnerabilities.

DB queries
Sure, here are some example queries using various database constraints:

1. **Creating a Table with Primary Key Constraint**:


```sql
CREATE TABLE Students (
StudentID INT PRIMARY KEY,
FirstName VARCHAR(50),
LastName VARCHAR(50),
Age INT
);
```

2. **Adding a Foreign Key Constraint**:


```sql
CREATE TABLE Orders (
OrderID INT PRIMARY KEY,
ProductID INT,
OrderDate DATE,
CONSTRAINT FK_ProductID FOREIGN KEY (ProductID) REFERENCES
Products(ProductID)
);
```

3. **Adding a Unique Constraint**:


```sql
CREATE TABLE Employees (
EmployeeID INT PRIMARY KEY,
FirstName VARCHAR(50),
LastName VARCHAR(50),
Email VARCHAR(100) UNIQUE,
DepartmentID INT
);
```

4. **Adding a Not Null Constraint**:


```sql
CREATE TABLE Customers (
CustomerID INT PRIMARY KEY,
FirstName VARCHAR(50) NOT NULL,
LastName VARCHAR(50) NOT NULL,
Email VARCHAR(100),
Age INT
);
```

5. **Adding a Check Constraint**:


```sql
CREATE TABLE Products (
ProductID INT PRIMARY KEY,
ProductName VARCHAR(100),
Price DECIMAL(10, 2),
Quantity INT,
CONSTRAINT CHK_Price CHECK (Price >= 0),
CONSTRAINT CHK_Quantity CHECK (Quantity >= 0)
);
```

6. **Dropping a Constraint**:
```sql
ALTER TABLE Employees
DROP CONSTRAINT FK_DepartmentID;
```

7. **Enabling/Disabling Constraints**:
```sql
ALTER TABLE Orders
DISABLE CONSTRAINT FK_ProductID;

ALTER TABLE Orders


ENABLE CONSTRAINT FK_ProductID;
```

Joins in DB:
Joins are used to combine rows from two or more tables based on a related column
between them. Common types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN,
and FULL JOIN. Here's an example of an INNER JOIN:

SELECT Orders.OrderID, Customers.CustomerName


FROM Orders
INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID;

Add, Create, Delete, Update, Truncate, Drop Queries:


These are Data Manipulation Language (DML) commands used to interact with data in
tables.
• INSERT: Adds new rows to a table.
• CREATE TABLE: Creates a new table in the database.
• DELETE: Removes rows from a table based on a condition.
• UPDATE: Modifies existing rows in a table.
• TRUNCATE TABLE: Deletes all rows from a table (without logging individual row
deletions).
• DROP TABLE: Deletes an entire table from the database.

Max/Min, Count, OrderBy, SortBy, GroupBy:


These are commonly used in combination with SELECT statements to retrieve and
manipulate data.
• MAX/MIN: Returns the maximum or minimum value from a column.
• COUNT: Returns the number of rows that match a specified condition.
• ORDER BY: Sorts the result set based on one or more columns, either in
ascending or descending order.
• SORT BY: There's no specific "SORT BY" clause in SQL; "ORDER BY" is used for
sorting.
• GROUP BY: Groups rows that have the same values into summary rows,
typically used with aggregate functions like SUM, AVG, COUNT, etc.
Example usage:

SELECT MAX(Salary) AS MaxSalary FROM Employees;

SELECT Department, COUNT(*) AS EmployeeCount FROM Employees GROUP BY


Department;

SELECT ProductName, UnitPrice FROM Products ORDER BY UnitPrice DESC;


SELECT Department, AVG(Salary) AS AvgSalary FROM Employees GROUP BY
Department;

These SQL concepts and operations are fundamental to database querying and
manipulation.

DDL (Data Definition Language):


• CREATE: Used to create new database objects like tables, indexes,
views, etc.
• ALTER: Used to modify the structure of existing database objects.
• DROP: Used to delete database objects like tables, indexes, views, etc.
• TRUNCATE: Used to remove all records from a table, but keeps the table
structure intact.
• COMMENT: Used to add comments to the data dictionary.

DML (Data Manipulation Language):


• SELECT: Used to retrieve data from a database.
• INSERT: Used to insert new records into a table.
• UPDATE: Used to modify existing records in a table.
• DELETE: Used to remove records from a table.
• MERGE: Used to perform an INSERT, UPDATE, or DELETE operation on a
target table based on the results of a join with a source table.

DCL (Data Control Language):


• GRANT: Used to grant specific privileges to database users.
• REVOKE: Used to revoke previously granted privileges from database
users.

TCL (Transaction Control Language):


• COMMIT: Used to save all changes made during the current transaction.
• ROLLBACK: Used to undo changes made during the current transaction.
• SAVEPOINT: Used to set a point within a transaction to which you can
later roll back.

You might also like