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
- Microsoft Application Block.data.dll
- LINQ (Language INtegrated Security )
- Entity Framework
How many types of database??
There are two types of database
- File Server Database (For example : MS Access)
- 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)
- Stored Procedure
- 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??
.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
- Emp No. Int (Primary Key)
- Ename VarChar(50)
- Eadd VarChar(50)
- 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 :