Edit

Share via


Database projects and data-tier applications (.NET Framework)

Note

Datasets and related classes are legacy .NET Framework technologies from the early 2000s that enable applications to work with data in memory while the applications are disconnected from the database. The technologies are especially useful for applications that enable users to modify data and persist the changes back to the database. Although datasets have proven to be a very successful technology, we recommend that new .NET applications use Entity Framework Core. Entity Framework provides a more natural way to work with tabular data as object models, and it has a simpler programming interface.

You can use database projects to create new databases and new data-tier applications (DACs) and update existing databases and DACs. Both database projects and DAC projects enable you to apply version control and project management techniques to your database development efforts in much the same way you apply those techniques to managed or native code. You can help your development team manage changes to databases and database servers by creating a DAC project, database project, or a server project and putting it under version control. Members of your team can then check out files to make, build, and test changes in an isolated development environment, or sandbox, before sharing them with the team. To help ensure code quality, your team can finish and test all changes for a particular release of the database in a staging environment before you deploy the changes into production.

To review the list of the supported database features for data-tier applications, see DAC support for SQL Server objects. If you use unsupported features in your database, you should instead use a database project to manage changes to your database.

Common high-level tasks

The following table describes the common high-level tasks you can accomplish for your database projects and data-tier applications in Visual Studio:

High-level task Description Supporting content
Start development of a data-tier application The concept of a data-tier application (DAC) was introduced with SQL Server 2008. A DAC contains the definition for a SQL Server database and the supporting instance objects that are used by a client-server or three-tier application. A DAC includes database objects, such as tables and views, together with instance entities like logins. You can use Visual Studio to create a DAC project and build a DAC package file. Then you can send the DAC package file to a database administrator for deployment onto an instance of the SQL Server Database Engine. - Data-tier applications
- SQL Server Management Studio
Perform iterative database development Developers can check out parts of the project and make updates in an isolated development environment. By using this type of environment, you can test your changes without affecting other members of the team. After the changes are complete, you check the files back into version control, where other team members can obtain your changes and build and deploy them to a test server. - Project-oriented offline database development (SQL Server Data Tools)
- Transact-SQL debugger (SQL Server Management Studio)
Prototype, verify test results, modify database scripts and objects You can use the Transact-SQL editor to perform any of these common tasks. - Query and text editors (SQL Server Management Studio)