web analytics

Tech Guidence

Guidance at Ease

Database And Database Handling

Database handling

We make a project in Three tier architecture in Asp.net.

1st Tier    : -   Database.

2nd Tier    : -   Business Logic or Classes or OOPS or C# or VB.net.

3rd Tier    : -   Presentation Tier or Design Phase.

Hench in this article we will discuss about first tier that is Database.

Database is the group of information which is present on client side and is in structured, organized and is very easy to manage.

Database is made in SQL Server 2008 and Version SQL Express. SQL Express is an instance.

Instance can be used for ultimate bank sector or insurance sector and professional for corporate sector.

Database is made in Server Explorer.

How to access data is Asp.net??   

There are four techniques of accessing data in Asp.net

  1. ADO.NET
  2. Microsoft Application Block.data.dll
  3. LINQ (Language INtegrated Security )
  4. Entity Framework

How many types of database??

There are two types of database

  1. File Server Database (For example : MS Access)
  2. Client Server Database (For example : ORACLE, MS SQL Server)

File Server Database is used with single user environment but not with single user environment. In file Server user directly access the file.

Client Server Database is used with multiple user environment. Client server user do not directly access the file, master (server) user.

Why we use SQL Server 2005, 2008 and 2012?

CIR is inbuilt in MS SQL Server.

SQL stands for Structured Query Language. It is base language for all databases. It is simple english like and non procedure language.

T – SQL (MS SQL Server) : – T stands for Transe . It is asking about the programming in SQL.

T-SQL (Programming in SQL)

  1. Stored Procedure
  2. Functions
  3. Trigger
  4. Views
  5. Cursor
  6. Indexes (for fast retrieving)  

Requirement for creating database??

SQL Server must be installed. SQL Express Versions is free for students and Enterprise Edition if of 12 – 13 Lakhs. In SQL express, there is 8 GB storage space.

What are extensions of Databases??

  1. .mdf
  2. .ldf
  3. .ndf
  4. .sdf

.mdf is a primary file is for single database and single file but not for multiple file.

.ldf (Log file) is also called as Transaction Log File.

If your .mdf file is corrupted then you can recover it from .ldf file but in case of separate drive you can fix the size of .mdf file.

.ndf is the secondary file. It can be multiple. When primary file data exceeds then you can store data in secondary file.

.sdf extension is for mobile database. It is Compact database from file.

How to create Database??

Go to View —–> Server Explorer —-> Right click on Data Connection —-> Create new SQL Server Database.

Server Name : -  Server name/Sqlexpress

SQL Express is a instance as you know and described above.

How to Create TABLE??

Go to database —-> Right Click on Table —-> Add new Item

  1. Emp No.               Int (Primary Key)
  2. Ename                  VarChar(50)
  3. Eadd                      VarChar(50)
  4. Esal                        Int

Primary Key is the unique value of a table that is it is only one in a table. After making Primary key indexing happens for doing the data retrieving fast.

How to make primary key??

Right Click on Emp No. —–> Set as Primary Key.

You May also Like to read :

Tags:

About

I am B.tech Holder and have completed my B.tech from Hisar in Electronics and communications. I am asp.net developer and certified in this language. I love to share my experience and knowledge

View all posts by

2 Responses

  1. sukham says

    great…..i m pleased….

    • Aman Doda says

      Thanks for visiting. keep visiting :D

POST A COMMENT


*
CommentLuv badge

a