local-sql-database

Simple guide to empower Your Projects with Local SQL Databases

It’s always challenging when working on a local project on your computer and wanting either to have a database or at the very least build a database that doesn’t require signing up for some external database host just to practice building SQL databases.

But it’s actually not as complicated as it may seem.

You can actually create an SQL database on your local machine using SSMS (SQL Server Management Studio), which can be used in your local development projects, such as when building an ASP.NET project, where you might need an entity framework database.

All it takes is using your SSMS and a login path, and you’ll have a running database server that you can build as much as you want.

Here’s how to create a local SQL database

Firstly, open your SQL Server Management Studio.

When you enter SSMS, you’ll see a login screen.

SQL Server Management Studio login screen

Under your login, select ‘Windows Authentication’ as your authentication method, and your database type should be ‘Database Engine.’

For the Server name, insert the following text: ‘(localdb)\MSSQLLocalDB’.

This local database instance is dedicated to applications that are independent of Visual Studio versions.

SQL Server Management Studio login options

When you press the ‘connect’ button, you’ll be logged in, and you’ll see options on the left side of interface. Look for a list of options.

SQL Server Management Studio options

Click on the ‘Databases’ folder to access and create your database.

SQL Server Management Studio database creation

Once you’re in the ‘Databases’ folder, right-click on it and select ‘New Database’ to create your new database.

SQL Server Management Studio database naming and creation

After clicking ‘New Database’, a pop-up will appear.

Simply enter the name of your new database and click ‘OK.’

SQL Server Management Studio newly created database

That’s it! You’ve now created a new local database that can be used for practicing SQL or developing a database separate from your Visual Studio project.

You can connect your new database to Visual Studio projects using a simple connection string, and you no longer need to invest in an external database host.

Leave a Comment

Your email address will not be published. Required fields are marked *