精通
英语
和
开源
,
擅长
开发
与
培训
,
胸怀四海
第一信赖
锐英源精品开源心得,转载请注明:“锐英源www.wisestudy.cn,孙老师作品,电话13803810136。”需要全文内容也请联系孙老师。中文译文
ASP.NET SQL Server Manager
Working whit the data; I believe that the Microsoft SQL Server is the best choice for managing your huge amount of data / information. Any database related application development, all the developers are very much familiar with the Microsoft SQL Server database management system with the Server tools, Client tools and it’s common developing environments as well.
Just think for a few moments; if we have a WEB based SQL Server admin tools where the developers can do all the basic common tasks for a database related application I think it might be good for all of us. The purpose of this article is to share with you on how to create an ASP.NET SQL Server admin tools. This article is about to give you an overall idea on how you can directly access the SQL Server database objects, Working with the objects like tables, views, stored procedure etc.
This application is a WEB based SQL Server admin tool. It will give you some flexibility to handle various database objects. It’s allowed you to quick show of any table / views data of a particular database. You will enjoy working with views, stored procedure, and function as well.
In a word the ASP.NET SQL Server Manager will give you an overall idea of a Web based SQL Server Admin Tools.
It will facilitate you to generate auto SQL script such as views, stored procedures, functions etc. You can also create, alter or delete any database objects and many more....
When you work with Microsoft SQL Server Client Tools, you must need to register with the Database Server to works. The environment may be local area network (LAN) or it may remote / internet. Microsoft SQL Server internally manages the registration process and the connectivity in local or remote environment.
In this article I showed how to connect with the database server in a local area network (LAN) and remote / internet environment as well.
As we discussed before you can work with any database objects as likely as you work on Microsoft SQL Server Client tools. Here I try to demonstrate you on how easily you can get the SQL Server database objects, working with the object like performing the basic database manipulation activates, executing your custom transact-SQL statements etc.
Lets consider this scenario. For any purpose you select a object such as view, stored procedure etc... form a particular database. This application will auto generate the transact-SQL statements and allowing you to perform the basic like CREATE/ALTER / DROP object etc.
You will get more detail on the section "Understand & Using the code".
The base of every Relational Database Management System (RDBMS) is a database object called table. Every database consists of one or more then one table, which store the database’s data or information or records. Each table has its own unique name and consists of columns and rows.
The basic task of a table such as creating, altering and deleting as well. This application allows you to perform all the mentioned task. The transact-SQL syntax of creating, altering and deleting tables are given below:
[ ON { filegroup | DEFAULT } ]
[ TEXTIMAGE_ON { filegroup | DEFAULT } ]?
For more information can be found at this link.
Alter Table Syntax
ALTER TABLE table_name
ALTER COLUMN column_name
{
type_name[({precision[.scale]})][NULL|NOT NULL]
{DROP DEFAULT
| SET DEFAULT constant_expression
| IDENTITY [ ( seed , increment ) ]
}
| ADD
{ < column_definition > | < table_constraint > } [ ,...n ]
| DROP
{ [ CONSTRAINT ] constraint_name
| COLUMN column }
] }
For more information can be found at this link.
Delete Table Syntax
DROP TABLE [ database_name . [ schema_name ] . | schema_name . ]
table_name [ ,...n ] [ ; ]
For more information can be found at this link.
In SQL Server, a view is a pre-written query that is stored on the database. A view consists of a SELECT statement, and when you run the view, you see the results of it like you would when opening a table. Some people like to think of a view as a virtual table. This is because a view can pull together data from multiple tables, as well as aggregate data, and present it as though it is a single table.
This application allows you to perform all the basic tasks of a SQL Server view objects such as as creating, altering and deleting as well. The transact-SQL syntax of creating, altering and deleting view are given below:
Create view
Creates a virtual table that represents the data in one or more tables in an alternative way. CREATE VIEW must be the first statement in a query batch.
Syntax
CREATE VIEW [< owner > . ] view_name [ ( column [ ,...n ] ) ]
[ WITH < view_attribute > [ ,...n ] ]
AS
select_statement
[ WITH CHECK OPTION ]?
For more information can be found at this link.
Few month ago I wrote an article on the basic overview of SQL Server Stored Procedure at codeproject.com. I would like to request you read this article form this link.
A Scalar user-defined function returns one of the scalar data types. Text, ntext, image and timestamp data types are not supported. These are the type of user-defined functions that most developers are used to in other programming languages.
Table value functionAn Inline Table-Value user-defined function returns a table data type and is an exceptional alternative to a view as the user-defined function can pass parameters into a T-SQL select command and in essence provide us with a parametrized, non-updateable view of the underlying tables.