Wednesday, April 22, 2015

Software Development Life Cycle (SDLC):

Software Development Life Cycles play an important role in any type of application development. Software Development Life Cycles (or SDLCs) are a systematic approach to each component of application development — from the initial idea to a functioning production application. A step (or phase) is a unit of related work in an SDLC


Requirement Analysis
Extracting the requirements from end user/client and doing requirement analysis

Design
Once the requirements are frozen, technical design phase starts, this phase transforms the requirement into technical specification (high level to low-level)

Implementation
Development phase will start once the design is finalized; this includes coding and uni testing

Verification/Testing
Once the development is done, system testing will start followed by user acceptance testing

Maintenance/Support

Once the user approves the build, the application will go live followed by warranty period and maintenance phase this phase will foresee the application availability enhancements, fixing defects etc.



Database Management System

What Is Database:


A database is a collection of information that is organized so that it can easily be accessed, managed, and updated.

DBMS:


DBMS is defined as the software program that is used to manage all the databases that are stored on the network or system hard disk. There are different types of database management systems and some of them are configured for specific purposes.

DBMS is available in different forms as a tool that is used to manage databases. Some popular DBMS solutions include DB2, Oracle, FileMaker and Microsoft Access. Using these products, privileges or rights can be created that can be specific to particular users. It means that the administrators of the database can grant specific rights to some users or assign different levels of administration.

Every DBMS has some fundamental elements. First is the implementation of the modeling language which defines the language used for each database. Second, DBMS also administers the data structures. Data query language is the third element of a DBMS. Data structures work with data query language in order to make sure that irrelevant data cannot be entered into the database used in the system.

RDBMS:


The database system in which the relationships among different tables are maintained is called Relational Database Management System. Both RDBMS and DBMS are used to store information in physical database.

RDBMS solution is required when large amounts of data are to be stored as well as maintained. A relational data model consists of indexes, keys, foreign keys, tables and their relationships with other tables. Relational DBMS enforces the rules even though foreign keys are support by both RDBMS and DBMS.

In 1970s, Edgar Frank Codd introduced the theory of relational database. Thirteen rules were defined by Codd for this relational theory or model. Relationships among different types of data Is the main requirement of the relational model.

RDMS can be termed as the next generation of database management system. DBMS is used as a base model in order to store data in a relational database system. However, complex business applications use RDBMS rather than DBMS.


1. Relationship among tables is maintained in a RDBMS whereas this not the case DBMS as it is used to manage the database.
2. DBMS accepts the ‘flat file’ data that means there is no relation among different data whereas RDBMS does not accepts this type of design.
3. DBMS is used for simpler business applications whereas RDBMS is used for more complex applications.
4. Although the foreign key concept is supported by both DBMS and RDBMS but its only RDBMS that enforces the rules.
5. RDBMS solution is required by large sets of data whereas small sets of data can be managed by DBMS.

Knowledge Base Management Systems:


A knowledge base management system overlooks a company’s knowledge base. It is used primarily by customer support departments; however, since virtually every employee in the company can contribute to the knowledge base, the scope of this management system often involves other departments as well. For instance, the customer support department will often rely on knowledge from field experts and sales agents. A knowledge management system can help efficiently direct information like that between departments making it a powerful asset to customer support departments. A knowledge base management system is designed for managing large and complex databases of support content. The system is comprised of a software application and a set of guidelines and procedures for managing knowledge.

Friday, September 26, 2014

Which Table is Consuming more space

--How to find out the size of all tables

select st.name,sp.rows, su.total_pages*8 AS TotalSpaceinKB ,su.used_pages*8 AS UsedSpaceinKB ,
(total_pages-used_pages)*8 as UNusedspaceinkb
from sys.tables st
inner join sys.partitions sp on st.object_id=sp.object_id
inner join sys.allocation_units su on su.container_id=sp.partition_id

--How to find out which table is consuming more space

select st.name ,sp.rows, su.total_pages*8 AS TotalSpaceinKB ,(su.used_pages)*8 AS UsedSpaceinKB ,
(total_pages-used_pages)*8 as UNusedspaceinkb
from sys.tables st
inner join  sys.partitions sp on st.object_id=sp.object_id
inner join  sys.allocation_units su on su.container_id=sp.partition_id where (su.used_pages)in
(select max(su.used_pages) AS UsedSpaceinKB
from sys.tables st
inner join  sys.partitions sp on st.object_id=sp.object_id
inner join  sys.allocation_units su on su.container_id=sp.partition_id
)

Thursday, May 22, 2014

SP_WHO in SQL Server

Provides information about current users, sessions, and processes in an instance of the Microsoft SQL Server Database Engine. The information can be filtered to return only those processes that are not idle, that belong to a specific user, or that belong to a specific session.

SP_WHO

OR

SP_WHO2

OR

SP_WHO3

OR

SP_WHOISACTIVE


Monday, May 5, 2014

SQL Script to Delete Millions of Record

DECLARE @continue int
DECLARE @rowcount int
Declare @total BIGINT

Select @total = count(*) from Tablename WITH (NOLOCK) where condition
While @total>0
BEGIN
SET @continue = 1
WHILE @continue = 1
BEGIN
SET ROWCOUNT 10000

BEGIN TRANSACTION
Delete from Tablename where CONDITION
SET @rowcount = @@rowcount 
COMMIT
 
IF @rowcount = 0
BEGIN
SET @continue = 0
END
END
Set @total =@total-10000
END