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, new data-tier applications (DACs), and to update existing databases and data-tier applications. 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 that 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.

For a list of the database features that are supported by data-tier applications, see DAC support for SQL Server objects. If you use features in your database that are not supported by data-tier applications, you should instead use a database project to manage changes to your database.

Common high-level tasks

High-Level Task 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 3-tier application. A DAC includes database objects, such as tables and views, together with instance entities such as logins. You can use Visual Studio to create a DAC project, build a DAC package file, and 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
Performing iterative database development: Developers can check out parts of the project and update them 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)
Prototyping, verifying test results, and modifying database scripts and objects: You can use the Transact-SQL editor to perform any one of these common tasks. - Query and text editors (SQL Server Management Studio)