Sunday, 15 May 2016

SQL Server Data Type and Operators

                     Data types in SQL Server
        ---------------------------------------------------------
1. Number Type :
-------------
          Data type                                    Size
        --------------                                 ---------
     ->  tinyint                                        1 byte
     ->  smallint                                      2 byte
     ->  int                                               4 byte
     ->  bigint                                          8 byte
     ->  float(n)                                       4 byte
     ->  decimal(p,s)                               12 byte
     ->  smallmoney                                4 byte
     ->  money                                         8 byte
     ->  numeric(p,s)

2. String type :
----------------
     ->  char(n)                Defined width , Maximum 8,000 characters
     ->  varchar(n)           Variable width character string,  Maximum                                       8,000 characters
     ->  varchar(max)      Maximum 1,073,741,824 characters 
     ->  nchar                         
     ->  nvarchar
     ->  nvarchar(max)
     ->  text
     ->  ntext

  char data type is called fixed length i.e according to the given size than all the bytes will be used in a memory with this memory will be wastage.

varchar is called variable length based on the given characters only those bytes will be used in memory. It can be called as dynamic memory allocation.

char and varchar will works with an ASCII code. ASCII value will be up to 255. it will used 1 byte for 1 character. 

nchar and nvarchar will works with unicode. Unicode values will be upto 65535.
Unicode supports English and other popular languages like Freanch, Lattin, Greak etc. It will uses two bytes for one character.

nchar is called fixed length and nvarchar is called variable length. 

3. Binary type :
-------------------
    ->  bit              1 byte               true/false
    -> image          up to 2 gb

4. Date and time type :
----------------------------
   smalldatetime                  2 bytes            year upto 2079
   datetime                           4 bytes            year upto 9999
   date                                  3 bytes
   time                                  3 bytes


                              Operators In SQL Server
              ------------------------------------------------------------
  1.  Arithmetic Operators
--------------------------------
           +      Plus
            -      Minus
            *     Multiplication
            /      Divide
 2. Relational Operators
------------------------------
         >       greater than
         <       less than
         >=     greater than equal to
         <=     less than equal to
         =        equal to
         !=      not equal to
         <>     not equal to

3.  Logical Operators
----------------------------
         AND,  OR,   NOT

4. Special Operators 
--------------------------
    In
    Not In
    between
    Not between
    like
    not like
    isnull
    not isnull
Read More »

Monday, 2 May 2016

What is SQL Server ?

=>  What is SQL Server ?
------------------------------------------------------------------------------
                            SQL Server is a Client/Server relational database used to store large amount of data or information . SQL Server will works in stand alone computer and will works in any network.
Networks are classified into three types.
1) Intranet  (Local Area Network (LAN))
2) Extranet (Metropolitan Area Network (MAN))
3) Internet (Wide Area Network (WAN))


SQL Server can be used as back end tool or software for any .net project or application. It is used to store and manage the data related to application or projects.


=> Server type in SQL Server
------------------------------------------------------------------
           There are several type of Server in SQL.
1. Database Engine:
-----------------------
     It is default server type. It is used to store ,Manage  and to access the data from database. It will work with online transaction processing database. This server contains normalized data and it is used for current data store.

2. Analysis Services :
--------------------------
 It is used to work with data warehouse. It is used to maintain the data related to old business. It will work with online analytical process. this database contains de-normalized data and used to maintain historical data which is for 10-15 years.

3. Reporting Services :
---------------------------
It is reporting tool used to generate reports in various formats. It can contain report tittle, date & time , page number, Sub total,Grand total etc. And report can be exported to other formats like MS-excel, MS-Word, PDF etc.

 Type of reports:
--------------------
 a) Standard 
        It is used to display report in a form of list.

 b) Ad-hoc Report
       It is a report model on report template and the client can used the report only after necessary changes are made according to their requirement.

 c) Embedded reports
          These are integrated in projects. it can be windows application or website. 


4. Integration Services:

----------------------------
              It is used to transform or used to convert the data from one format to another format. It is used to convert SQL server tables to oracle, My SQL & Ms-Access tables.
In IS(Integrated Services) 27 transformation or conversion can be done and it is called ETL(Extract Transformation Load) tool.



                       System database in SQL Server

---------------------------------------------------------------------------------
1. master :
 ------------
   It is used to perform user and administrative task in sql server. And used to manage sql server i.e the programmer which are used to works with sql server will be in master database.


2. Model :

------------
   It is the template for new database on the properties of model database, New database will be created.


3. Msdb : (Microsoft database)

-----------
   It is used to store job history. job history will contain the SQL commands executed by the user will be store in job history. it is used for data recovery.
4. tempdb : (temporary database)
---------------------------------------
   when ever SQL server is started then tempdb will be created and when SQL server or management studio is closed then it will be deleted. It will exist as long as work with SQL server . It is used to store temporary tables and temporary stored procedure.



             Database Architecture

---------------------------------------------------------
 SQL server can contain 32767 databases. In database architecture every database will contains two files.


Read More »

Saturday, 30 April 2016

ASP.NET Page Structure

=> Asp.net page Structure
--------------------------------------------------------------------------------

Asp.net provide two ways for structuring the code of our ASP.net pages.
 1. Inline Code Model
 2. Code behind Model

  Inline Code Model

---------------------------
                    The In-line code model is embedded directly with in the asp.net page i.e (.aspx page).
In order to build asp.net page in the inline code model instead of using the code behind model ,
Simply select the "Web form" template from the "add new item " templates window 
and make sure that the "Place Code in Separate file " check box option is  not selected.

 And finally click on Add button to create an asp.net page that uses inline code model.
Once we click add button, an asp.net page will be created with a single file like Default.aspx. And by default this page opened in the source view if the following markup tags structure :-

Note : For the inline code model of an asp.net page ,all business code must be embedded in .aspx page only  in the given section i.e            <Script  runat ="Server">
because in line code model not supported a separate file for business code of the page.


Code Behind Model
-----------------------------------------------------
                    The code behind model is more preferable model rather than In line code model. And this model provides a separation of user interface and code that allows user to develop and maintains more easily as well as simultaneously users can work on the page as well as on the code.



Once we click add button, an asp.net page will be created with a two file like Default.aspx and Default.aspx.cs. And by default this page opened in the source view if the following markup tags structure :-
+

These are the following options for few Items in an asp.net web development environment that uses code behind model.

1. Web Form
----------------
        .aspx file and .aspx.cs or .aspx.vb file
2. Master page
------------------
        .master file and .master.cs or .master.vb file
3. Web User Control
-------------------------
        .ascx file and .ascx.cs or .ascx.vb file
4. Web service:-
--------------------
        .asmx file and .asmx.cs or .asmx.vb file



Read More »

Wednesday, 27 April 2016

IIS (Internet Information Service)

=>  What is IIS (Internet Information Services) ?

IIS stands for Internet Information Service. IIS is a Microsoft enterprise level web server software product. It has initially support for Classic ASP and as well as ASP.net.


=>  How to install IIS (Internet Information Services)

Step 1 : First go to the control panel .


Step 2 : Then Click on Program and Feature


Step 3: Left hand side click on Windows features On or Off.


step 4 : Then open a dialog box Click on Internet Information Services and check all the sub check box of internet information services.



step 5 : After that finally type the browser url
                              http://localhost   and press enter key. to check the iis install or not.

finally you get on the browser screen



=>  How to Open IIS Manager.

There are 3 ways to open IIS manager

1st Ways
----------

Go to  Start ->  Run  -> type "inetmgr"   and press enter button.


Open IIS Manager on  the screen


 


2nd ways
-----------

Right Click on

My computer

                          

click on ' Manage'

Open Computer Management


Expand Services and application and then click on Internet Information Services



3rd ways
-----------

Control panel ->
                            

 Administrative tools  and select internet Information Servicers




by default port no : 8080

Read More »

Tuesday, 26 April 2016

What is ASP.Net ?

=>  What is Asp.net ?
-----------------------------------------------------------

  According to MS "ASP.net" is web technology for building powerful,Dynamic web application and it is part of .net framework.
     In other words we can say ASP.net is a programming framework used to developed web application and web services with the help of any compatible .net technologies.


=>  Web Application Flow.
-----------------------------------------------------------

step 1: Initial request is triggered by user through the browser over the network to the web server.

step 2: The web server manage the request forwarding to the application web application server.

step 3: The web application server perform the request task.

step 4: Access the database ,if needed. And response back to the web server.

step 5: The web server response back to the user with the successful transaction.

step 6: And finally output appears on the user browser.

=>  Benefits of web based application.
-------------------------------------------------------------
   Their are several benefits of web based application. These are as follows.
 1. Cost effective development.
 2. Accessible any where.
 3. Security
 4. Flexible core technology.
 5. More Useful for user.


=> Type of Web Application.
--------------------------------------------------------------------
1. Presentation oriented web application.
2. Service oriented web application.


=>Features of  ASP.Net
-----------------------------------------------------------------------

There are several features of ASP.net. These are as follows:-

1. Easy/Simple programming model.
2. Flexible language option.
3. Complete Object oriented model.
4. Separation of code and UI (User Interface).
5. Great tool support.
6. Security
7. Maintain page state.
8. Session State
9. Mobile Web device support.




Read More »

Thursday, 7 April 2016

DBMS Basic Concept

=> DBMS Features
------------------------------------------------------------------------
 (1) . Redundancy
 (2) . Security
      a. Authentication
      b. Authorization
 (3) . Data integrity
 (4) . Atomicity


=> RDBMS Features
--------------------------------------------------------------------------
 1. Large amount of data can be store.
 2. Structure Query language
    a. DDL ( Data Definition Language)
    b. DML (Data Manipulation Language)
    c. DCL  (Data Control Language)
    d. TCL  (Transaction Control Language)
    e. DQL  (Data Query Language)
 3. multiple table can be joined.
 4. Multiple relation can be created between tables relation can be 
     1:1 (One to one)
     1:M ( One to many)
     M:1 (Many to One)
     M:N (It is combination of Many to one and one to many)


=> Data Models
---------------------------------------------------------------------------------
 Their are several type of data model. 
 1. physical Data Model
 2.Conceptual Data Model
 3. Logical Data Model
     a. Hierarchical data model
     b. Network data model
     c. Relational data model
     d. Object data model
     e. Object relational data model

=> Constraints
------------------------------------------------------------------------------------
Constraints are used to give conditions or rules on the table so that valid and meaningful data cab be store in table.

  type of constraints
 ----------------------------------------------------
  1. Unique
  2. Not null
  3. Primary key
      a. Candidate Key
      b. Secondary Key (Alternate Key)
  4. Foreign key
  5. Composite key

=> Normalization
----------------------------------------------------------------------------------------
 Normalization means decomposing of larger and complex data into simple and smaller tables.

 Advantage of normalization
   --------------------------
a). Redundancy can be reduce
b). Inconsistency can be avoided.
c). Related data will be stored in table.

Their are several type of normalization.
  1. First Normal Form (1st NF)
  2. Second Normal Form (2nd NF)
  3. Third Normal Form (3rd NF)
  4. Boyce Code Normal Form (BCNF)
  5. Forth Normal Form (4th NF)

=>  De normalization
----------------------------------------------------------------------------------------
De normalization means it is a reverse of normalization it contains data redundancy or data repetition.

=> Database means collection of tables.
=>SQL Server contains two types of database
 1) OLTP (Online Transaction Processing).
 2) OLAP (Online Analytical Processing).
Read More »

Architecture of Asp.net

INTRODUCTION OF ASP.NET

                       We can say that ASP.net is programming framework used to developed web applications and web services with help of any compatible .net language. Such as visual C#.net or Vb.net.Basically it is next generation of Classic ASP.
It provides the easy way to build, deploy and run web application on any browser.

OR

In another words we can say that Asp.net is a web development platform, which provides a program model, a comprehensive software infrastructure and various services required to build up robust web application for personal computer as well as mobile application.  

What is Web Application 

             A web application is an application program i.e. stored on a remote server and delivered over the internet or intranet through a browser interface.
Or
In another words we can say that A web application is s/w package that can be accessed through the web browser interface. The s/w and database reside on a central server machine interface. Rather than being installed on the desktop machine  and it is accessed over a network.

Flow of web Application

1. Initial request is triggered by user through the browser over the       network to the web server.
2. The web server manage the request forwarding to the application      web application server.
3. The web application server perform the requested task.
4. Access the database ,if needed.
5. And response back to the web server.
6. The web server response back to the user with the successful           transaction.
7. And finally output appears on the user browser.
Read More »