SQL Data Tools In C# - Database Creation, Management, and Deployment in Visual Studio

preview_player
Показать описание

What if I told you that you could create a SQL Database in Visual Studio, manage it like any other project, track it with source control, deploy it to multiple environment, and refactor it like C# code? In this video, I am going to show you how to do all of those tasks and more. The best part is that it is free and comes baked into Visual Studio. And no, we aren't going to be using Entity Framework, although this method is compatible with Entity Framework.

Chapters provided by: Ralfs HBK
0:00 - Intro
1:12 - SQL Server Database Project in Visual Studio
4:35 - Designing a new SQL database: adding and editing tables
11:22 - Adding a foreign key
12:46 - Publishing the database
17:10 - Putting data in database
18:52 - Adding a View
23:20 - Adding a Stored Procedure
25:00 - Publishing database with the added changes
27:06 - Changing column names
31:41 - Schema Compare tool
39:37 - Database Queries
41:26 - New Database data: Data Comparison tool
43:13 - New Database data: Scripts
47:41 - Importing existing database to SQL project
49:49 - Summary and concluding remarks
Рекомендации по теме
Комментарии
Автор

All these years a have been living in the dark. So much effort put into manual versioning databases when there were elegant solutions for the job. This is really great! Thank you Tim!

iulianaciobanitei
Автор

Hi Tim, I worked through that video last night and thought it was excellent, I live in SSMS and am now have a project which needs to be deployed to multiple DBs, this is just what I need. Thank you.

Soundwaveof
Автор

My god tutorials are hard to find for SSDT, and this one is pure gold. 🥇 Thank you for making this.

JoshuaCMcMahon
Автор

I'm so glad I began developing when you had to do this as the standard. I've come across senior Devs who don't know T-SQL other than a select * from statement. EF has ruined a lot of developers.

PK-xugu
Автор

Amazing! Just amazing. I never knew that Visual Studio had such powerful tools for working with data. Thank you so much for creating and sharing such helpful content.

Maverick
Автор

0:00 - Intro
1:12 - SQL Server Database Project in Visual Studio
4:35 - Designing a new SQL database: adding and editing tables
11:22 - Adding a foreign key
12:46 - Publishing the database
17:10 - Putting data in database
18:52 - Adding a View
23:20 - Adding a Stored Procedure
25:00 - Publishing database with the added changes
27:06 - Changing column names
31:41 - Schema Compare tool
39:37 - Database Queries
41:26 - New Database data: Data Comparison tool
43:13 - New Database data: Scripts
47:41 - Importing existing database to SQL project
49:49 - Summary and concluding remarks

RalfsBalodis
Автор

Once again Tim, great video. No matter how complex a topic is, you always make it simple. Thank you for your great work and contribution to the software development community. If I had known this for years, my database development experience would have been much easier. Nevertheless, this tutorial is an additional asset to my toolbox.

Thanks a lot!

omostan
Автор

Superb, Tim. Just to let you know that team management could be a hot topic for your channel. Because you know how to teach complex things in a simple manner, a lot of developers like me could benefit from your team experience.

What I means is: there are thousands of developers who are good at what they do - develop code - but with no experience with team tools/team management. And those skill are a must when you are " entrepeneuring" ou "solopreneuring", which is pretty common this days and should be more and more regular in a foreseable future.

Thank you. I learnt a lot with this video. Will see it again in a few days.

gavranhas
Автор

Quick tip, for those who may be attempting to create a table and the design is not showing, make sure that you update the VS to the latest version or packages. Worked for me

Kreyn-nsgx
Автор

Wow I didn'T realize all of these features for SQL in Visual Studio, thanks for this. Truly a masterpiece of a software by microsoft, I gotta say.

beautifulheartsoothingreci
Автор

Another great video Tim. I just wanted to share that I wrote a program for work using Entity Framework. It was great. Entity Framework set up my Microsoft SQL database (the more coding I do, the more I appreciate Microsoft, they really are doing great things) and as long as I played according to EF rules I was was golden. I decided to rewrite my program for MySQL. Exact same program, only this time no hint of DB Context in my code (yes I know, it is still there behind the scenes :) ). The Visual Studio file without EF (identical programs remember) was six times smaller! Both programs do exactly the same thing!

MrMrkBo
Автор

Tim, thank you so much for such a descriptive video covering mostly all the uses of SQL Server Database Project. I have been struggling to understand the purpose of it but this video gave me complete clarity.
In the end you talked about putting it in Source control and using it to sync DB in different environments. I checked in you channel but could not find the video. I hope you did make that video, can you point me to it please?

harmanpreetbhatti
Автор

Excellent introductory tutorial to start with. Thanks a lot.

ganeshnayak
Автор

Thanks so much, leveling up on VS2019 SQL tools. Especially useful was the schema comparison between the deployed DB and the project code.

ekejma
Автор

This is pure gold, Tim. I'm embarrassed to say that I'm a developer and not doing this.

sunilanthony
Автор

Taking a kickstarter so I could continue the Retail Manager Course!

yossefelkilany
Автор

A small coffe (I wish my currency was not that bad =P ) for the simple and easy to understand video

aindaecedo
Автор

Thanks for this phenomenally instructive video! There are so many video tutorials out there with either a top down or a bottom up approach where it's hard for learners to connect the dots.
As far as the quirk in Visual Studio is concerned, I think I can confirm that it possibly is a quirk. In the version 16.9.2 I'm currently using I can authenticate MSSQLLocalDB with Windows.

sandokanfirst
Автор

I am so glad I found this video! Thanks Tim.

dejohnny
Автор

Been a few weeks since I watched one of your videos, and as always it's very clear. I currently use SSMS and VS2017 for development as I never really dived into the sql side of things via VS. I'll have to look into this more now.

Would love a later video showing how to move all this into a build environment and how to set it up for team use. Great work Tim!

harag