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

Full courses: www.iamtimcorey.com/courses
Source Code: leadmagnets.app/?Resource=SQL...
Patreon: / iamtimcorey
Newsletter signup: signup.iamtimcorey.com/
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

Пікірлер: 404

  • @iulianaciobanitei9509
    @iulianaciobanitei95092 жыл бұрын

    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!

  • @Soundwave1of9
    @Soundwave1of94 жыл бұрын

    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.

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    Fantastic!

  • @Maverick5866
    @Maverick58662 жыл бұрын

    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.

  • @IAmTimCorey

    @IAmTimCorey

    2 жыл бұрын

    You are welcome.

  • @omostan
    @omostan2 жыл бұрын

    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!

  • @tomthelestaff-iamtimcorey7597

    @tomthelestaff-iamtimcorey7597

    2 жыл бұрын

    Fantastic endorsement, thanks for your faithful support.

  • @vartikagupta8816
    @vartikagupta88163 жыл бұрын

    I had used database project, and published but seems like today I have understood it. Thanks Tim!

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    Excellent!

  • @ganeshnayak3849
    @ganeshnayak38494 жыл бұрын

    Excellent introductory tutorial to start with. Thanks a lot.

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    You are welcome.

  • @dejohnny2
    @dejohnny23 жыл бұрын

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

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    You' are very welcome!

  • @sunilanthony17
    @sunilanthony174 жыл бұрын

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

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    Thank you!

  • @beautifulheartsoothingreci28
    @beautifulheartsoothingreci283 жыл бұрын

    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.

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    Glad you enjoyed it!

  • @ekejma
    @ekejma4 жыл бұрын

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

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    That is a pretty great feature.

  • @harag9
    @harag95 жыл бұрын

    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!

  • @IAmTimCorey

    @IAmTimCorey

    5 жыл бұрын

    Sounds exactly like the course I'm working on this weekend.

  • @Macej22
    @Macej225 жыл бұрын

    Perfect Tim, this video is exactly what I needed.

  • @IAmTimCorey

    @IAmTimCorey

    5 жыл бұрын

    Excellent!

  • @PK-xu7gu
    @PK-xu7gu4 жыл бұрын

    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.

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    It does make for better development if you know T-SQL.

  • @jseneque
    @jseneque4 жыл бұрын

    I love it! So easy to understand, covers everything I needed to know plus more..Thank you for sharing

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    You are welcome.

  • @MrMrkBo
    @MrMrkBo5 жыл бұрын

    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!

  • @IAmTimCorey

    @IAmTimCorey

    5 жыл бұрын

    Nice!

  • @harag9

    @harag9

    5 жыл бұрын

    @Mark Botirius, Glad you got it all working and as you say, the MySQL version was 6 times smaller, in a previous role I found this too, and when our DBA looked at the SQL code that EF generated he was horrified how poor it actually was. I would recommend that you look into Dapper - and check out some of the videos on Tims' site on using it. Yes you can then use it for both MSSQL and MySQL - not two programs either!... Give yourself some homework to make a 3rd application that will do both databases via dapper. :)

  • @pietsmitsa
    @pietsmitsa2 жыл бұрын

    Hi Tim, I'm late to the game and this completely blew my mind! Thanks so much for this video.

  • @IAmTimCorey

    @IAmTimCorey

    2 жыл бұрын

    You are welcome.

  • @Nickag47
    @Nickag472 жыл бұрын

    I've been wondering what was that project type is being used for and now I know! Great video as always. Thanks!

  • @IAmTimCorey

    @IAmTimCorey

    2 жыл бұрын

    You are welcome.

  • @gavranhas
    @gavranhas2 жыл бұрын

    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.

  • @IAmTimCorey

    @IAmTimCorey

    2 жыл бұрын

    Thanks for the suggestion. We are looking into how I could do something like this.

  • @robertklausch4487
    @robertklausch44874 жыл бұрын

    Oh Tim, you saved me actually days with this tutorial! Thank you! Again... :-)

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    You are welcome.

  • @isaahliu
    @isaahliu5 жыл бұрын

    Thank you Tim. Exactly what I've been wanting to learn.

  • @IAmTimCorey

    @IAmTimCorey

    5 жыл бұрын

    Excellent!

  • @cesarlv86
    @cesarlv864 жыл бұрын

    Hey Tim, great video. Excellent guidance rithm through the tools to creating DBs. thanks.

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    You are welcome.

  • @carlcaztec
    @carlcaztec3 жыл бұрын

    Great introduction video to this. Helped get me started really quickly - thank you!

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    Glad it was helpful!

  • @Kreyn-ns8gx
    @Kreyn-ns8gx2 жыл бұрын

    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

  • @IAmTimCorey

    @IAmTimCorey

    2 жыл бұрын

    Thanks for sharing.

  • @sandokanfirst2
    @sandokanfirst23 жыл бұрын

    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.

  • @tomthelestaff-iamtimcorey7597

    @tomthelestaff-iamtimcorey7597

    3 жыл бұрын

    Thanks for watching and sharing!

  • @iT_dev41k
    @iT_dev41k4 жыл бұрын

    Hi Tim, another good video from you! That is really cool feature to manage database scheme, will include in my current project) thanks!

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    Awesome!

  • @jpgarza5205
    @jpgarza52053 жыл бұрын

    Amazing video! great content, great pace, and lucid explanations. Thanks much!

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    Glad you liked it!

  • @user-cs6fq8ov7w
    @user-cs6fq8ov7w5 ай бұрын

    this is an amazing guide, thank you so much

  • @IAmTimCorey

    @IAmTimCorey

    5 ай бұрын

    You are welcome.

  • @alihmyir8257
    @alihmyir8257 Жыл бұрын

    Wonderful video. Very clear and informative. Thanks!

  • @IAmTimCorey

    @IAmTimCorey

    Жыл бұрын

    You are welcome.

  • @bohuang3122
    @bohuang31222 жыл бұрын

    Excellent video! I have leaned a lot from it. Thanks!

  • @IAmTimCorey

    @IAmTimCorey

    2 жыл бұрын

    You are welcome.

  • @francosimonini7103
    @francosimonini7103 Жыл бұрын

    Thank you for all your videos 🙂

  • @IAmTimCorey

    @IAmTimCorey

    Жыл бұрын

    You are welcome.

  • @everetttaylor4312
    @everetttaylor43124 жыл бұрын

    Good intro - very concise

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    Thank you!

  • @marceloleoncaceres6826
    @marceloleoncaceres68269 күн бұрын

    Thank you Tim, another great video!

  • @IAmTimCorey

    @IAmTimCorey

    9 күн бұрын

    You are welcome.

  • @aliabdullah9354
    @aliabdullah93543 жыл бұрын

    The Comparing Tool Is Very Nice and Helpful .... Great job thank you brother.

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    You are welcome.

  • @harmanpreetbhatti4354
    @harmanpreetbhatti43546 ай бұрын

    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?

  • @IAmTimCorey

    @IAmTimCorey

    6 ай бұрын

    We do that in the TimCo Retail Manager series.

  • @JustPlayingBroGD
    @JustPlayingBroGD5 жыл бұрын

    I thought about it yesterday. Very in time ) thank you =)

  • @IAmTimCorey

    @IAmTimCorey

    5 жыл бұрын

    You are welcome.

  • @thomstunes6485
    @thomstunes64853 жыл бұрын

    The priest as hit again ! Great tutorial, perfect for managing test and production database in the same time and replicate them easily !

  • @tomthelestaff-iamtimcorey7597

    @tomthelestaff-iamtimcorey7597

    3 жыл бұрын

    Thanks for growing your skills with this video.

  • @nickout99
    @nickout99 Жыл бұрын

    Always love your videos :)

  • @IAmTimCorey

    @IAmTimCorey

    Жыл бұрын

    You are welcome.

  • @caosabitan
    @caosabitan4 жыл бұрын

    It's so great video. Thanks Tim!

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    Glad you liked it!

  • 5 жыл бұрын

    great Tutorial Tim, thanks a lot!

  • @IAmTimCorey

    @IAmTimCorey

    5 жыл бұрын

    You are most welcome. Thanks for watching.

  • @florianpreu4482
    @florianpreu44822 жыл бұрын

    @IAmTimCorey absolute awesome. Didn't know it's that easy.... Iam totally blown and smiling as fuck because I know what Iam now going to implement at work. Thank you so much for all of your videos.

  • @IAmTimCorey

    @IAmTimCorey

    2 жыл бұрын

    Awesome!

  • @v-idiootjes
    @v-idiootjes3 жыл бұрын

    This is great! I'm sure going to use it!

  • @tomthelestaff-iamtimcorey7597

    @tomthelestaff-iamtimcorey7597

    3 жыл бұрын

    Thanks for building your skills with Tim.

  • @cosmarvv5000
    @cosmarvv50004 жыл бұрын

    Excellent, thanks Tim

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    You are welcome.

  • @amnesia3490
    @amnesia34903 жыл бұрын

    Thats amazing having source control of sql server

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    Sharing tools and tips helps build the whole community.

  • @danielrestreporuiz6074

    @danielrestreporuiz6074

    3 жыл бұрын

    @@IAmTimCorey You are amazing Tim, thank you for sharing your knowledge!

  • @supercyclone8342
    @supercyclone834211 ай бұрын

    This is an amazing tutorial! Thank you!

  • @IAmTimCorey

    @IAmTimCorey

    11 ай бұрын

    You are welcome.

  • @carloswanderley8868
    @carloswanderley88683 жыл бұрын

    Spectacular! 👏👏👏

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    Thanks!

  • @cgzver
    @cgzver5 жыл бұрын

    wow! its really great tool. Many thanks!

  • @IAmTimCorey

    @IAmTimCorey

    5 жыл бұрын

    You are welcome.

  • @sanketss84
    @sanketss844 жыл бұрын

    This is just superb.

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    Thanks!

  • @seldom89
    @seldom894 жыл бұрын

    AWESOME...Really helpful sir. Thank you.

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    You are welcome.

  • @dusangraovac2645
    @dusangraovac26455 жыл бұрын

    Thank you very much for another awesome tutorial

  • @IAmTimCorey

    @IAmTimCorey

    5 жыл бұрын

    You are most welcome. Thanks for watching.

  • 5 жыл бұрын

    Thanks Tim, great job ^^

  • @IAmTimCorey

    @IAmTimCorey

    5 жыл бұрын

    You are most welcome. Thanks for watching.

  • @ahmedroberts4883
    @ahmedroberts4883 Жыл бұрын

    Fantastic video, Tim. I just heard about this tool and I thought, "I would bet Tim Corey has something on this." You are awesome and you have helped me tremendously. 😁 Thank you.💻

  • @IAmTimCorey

    @IAmTimCorey

    Жыл бұрын

    Glad it was helpful!

  • @user-pm7pn5rn8i
    @user-pm7pn5rn8i3 жыл бұрын

    Thanks Tim! super useful!

  • @tomthelestaff-iamtimcorey7597

    @tomthelestaff-iamtimcorey7597

    3 жыл бұрын

    Thanks for watching

  • @ibnfpv
    @ibnfpv3 жыл бұрын

    Greate overview of this VS project type! keep up

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    Thanks!

  • @yuriimahotskyi6487
    @yuriimahotskyi64874 жыл бұрын

    Cool, it was very helpful. Thank you a lot !!!

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    You are welcome.

  • @aktaruzzamansuman6264
    @aktaruzzamansuman62643 жыл бұрын

    Spectacular!

  • @tomthelestaff-iamtimcorey7597

    @tomthelestaff-iamtimcorey7597

    3 жыл бұрын

    Thanks for watching and trusting Tim

  • @ScottLHolmes
    @ScottLHolmes4 жыл бұрын

    I started looking for alternatives to SSMS yesterday. Considered some open source stuff and whatnot. It occurred to me to see what was up with SSDT because it's been a long time since I last looked at it (it was horrible at the time). Wow. This tutorial just convinced me to dig into these tools again. Something I never thought I'd do. Thanks!

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    Excellent!

  • @tonyjones1758
    @tonyjones17584 жыл бұрын

    Great video. Great tool. Thanks.

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    You're welcome!

  • @satheeshkumar3926
    @satheeshkumar39262 жыл бұрын

    Really helpful.. Tim

  • @IAmTimCorey

    @IAmTimCorey

    2 жыл бұрын

    Great!

  • @johnwright7457
    @johnwright74574 жыл бұрын

    Thanks very much, excellent video

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    You are welcome.

  • @LifeOnTwoWheels8255
    @LifeOnTwoWheels82553 жыл бұрын

    Thank you, sir, for this video

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    You are welcome.

  • @StatiQQQ
    @StatiQQQ3 жыл бұрын

    This video is fire @34:24 "You've got mail!"

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    Thanks!

  • @yossefelkilany623
    @yossefelkilany62311 ай бұрын

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

  • @IAmTimCorey

    @IAmTimCorey

    10 ай бұрын

    The entire series is free on KZread. No Kickstarter needed.

  • @yossefelkilany623

    @yossefelkilany623

    10 ай бұрын

    Thanks a lot @@IAmTimCorey

  • @kimiadarbeh744
    @kimiadarbeh7442 жыл бұрын

    Thank you, really helpful

  • @IAmTimCorey

    @IAmTimCorey

    2 жыл бұрын

    You're welcome!

  • @philippechamberland7419
    @philippechamberland74195 жыл бұрын

    Great tutorial! The only thing we miss in VS is the gaphical way to create view in SSMS.

  • @IAmTimCorey

    @IAmTimCorey

    5 жыл бұрын

    Thanks!

  • @MrIrrepressible
    @MrIrrepressible Жыл бұрын

    This is gold, thank you. Do you have a vid explaining how post deploy and pre deploy scripts work in database projects? Edit: It's already explained in the video towards the end....Thanks again

  • @IAmTimCorey

    @IAmTimCorey

    Жыл бұрын

    I'm glad you found it.

  • @eugene-white-shark
    @eugene-white-shark2 жыл бұрын

    Thank you, nice video.

  • @IAmTimCorey

    @IAmTimCorey

    2 жыл бұрын

    Glad you liked it!

  • @ZoidbergForPresident
    @ZoidbergForPresident5 жыл бұрын

    Cool stuff!

  • @IAmTimCorey

    @IAmTimCorey

    5 жыл бұрын

    Thanks!

  • @aindaecedo
    @aindaecedo Жыл бұрын

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

  • @IAmTimCorey

    @IAmTimCorey

    Жыл бұрын

    Thank you!

  • @Antonio-lt1sp

    @Antonio-lt1sp

    Жыл бұрын

    @aindaecedo realmente, dá vontade de chorar rsrsrs. Vc já trabalha na área?

  • @aindaecedo

    @aindaecedo

    Жыл бұрын

    @@Antonio-lt1sp oi Antonio, trabalho sim, mas não conhecia criar via VS studio, sempre usei o MSSQL para criar tudo

  • @barrythorne693
    @barrythorne6933 жыл бұрын

    Great - Very Helpful

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    Glad to hear that!

  • @barrythorne693

    @barrythorne693

    3 жыл бұрын

    @@IAmTimCorey Hi Tim, could you provide a list showing the order/sequence I should attempt each of your KZread videos. Many thanks. Barry

  • @RalfsBalodis
    @RalfsBalodis3 жыл бұрын

    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

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    Thank you! Rock Star!

  • @jean-francoispedneault3632
    @jean-francoispedneault36322 жыл бұрын

    Hi Tim! Thank you for your great crystal clear videosss! I'm not sure which one I should watch next on the same vs/sql/local DB topics and in which order... "Stored procedures" "Database connections strings" "Connect C# to SQL" ? Thank you for your time

  • @IAmTimCorey

    @IAmTimCorey

    2 жыл бұрын

    Probably Stored Procedures, then Connect C# to SQL, and then Database Connection Strings but there is some overlap there.

  • @jean-francoispedneault3632

    @jean-francoispedneault3632

    2 жыл бұрын

    @@IAmTimCorey Great thank you!

  • @hamidrezaashkiyan
    @hamidrezaashkiyan4 жыл бұрын

    Hi Mr Corey. This tutorial was amazing and helped me alot i had a serious problem in working with team on DB and now i learned how to do it. But there I came up with a question: How to make installation from this db and install (deploy) DB on customer pc? Thanks alot for your great courses.

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    Deploying on a customer DB is the trick, since they will need SQL Server installed. You would need to set up a publish script to push to each SQL Server unless you could point each customer at a central SQL Server.

  • @WaftureRobin
    @WaftureRobin Жыл бұрын

    @IAmTimCorey hey tim, thanks for putting this video together, I’ve really learned a lot from it. Do you mind doing a more in-depth tutorial to share your best practices, pipelines (in azure devops) and workflows to manage, collaborate (e.g. on github), potentially handle huge schema changes (e.g. translating data from old tables to new tables, and mapping the right web app ver to the right db ver) and push changes (e.g. schemas and stored procedures changes) to the development, staging and production environment?

  • @IAmTimCorey

    @IAmTimCorey

    Жыл бұрын

    Thanks for the suggestion. Please add it to the list on the suggestion site so others can vote on it as well: suggestions.iamtimcorey.com/

  • @manju_narasimha
    @manju_narasimha3 жыл бұрын

    Can i create a DB project and publish to MSSQLLocalDB and host it on a machine where there is no SQL server installed?

  • @user-wv7cs5rr2h
    @user-wv7cs5rr2h11 ай бұрын

    Tim, Thanks for the great video. It has helped me understand localdb much better. I still have 2 questions. 1. If I publish my project and copy the executable to a new computer, will it create the databases automatically the first time it runs? 2. Could I allow the user to point to an SQL Server on the cloud and (with the correct permissions) create the databases automatically there? If you have any courses on your web site or KZreads that you could point me to that would help to understand this better, it would be greatly appreciated.

  • @georgeseese
    @georgeseese3 жыл бұрын

    Thanks for another great video. Are these amazing tools included in any of your paid courses (e.g. Tournament Tracker, TimCo)?

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    Yes they are! 'C# Application from Start to Finish Complete Bundle'

  • @denitsageorgieva7209
    @denitsageorgieva7209 Жыл бұрын

    Hi Tim, as always ANOTHER AMAZING TUTORIAL! I absolutely love your videos! I wanted to pick your brains on something. The Schema Compare tool seems to have issues for some people. The compare tool just freezes and not lets you do anything, i can see a few people have reached out to VS for this..I seems to work just fine for you tho, any advise? 😆

  • @IAmTimCorey

    @IAmTimCorey

    Жыл бұрын

    Not sure. I've not had a problem, but maybe my databases don't use things that yours do. If you can narrow it down, submit a bug report to Microsoft to see if they can fix it.

  • @hildaperales7766
    @hildaperales77664 жыл бұрын

    Hello Tim, thank you for this video very helpful. I'm at the starting point, this really made sense. My next step is to push the project to source control and eventually built pipelines to deploy to dev, stage and finally prod. Which of your videos would you recommend watching next to accomplish that?

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    I don't have videos that show all of that on KZread. I do have the Application Lifecycle Design course which covers all of that: www.iamtimcorey.com/p/application-lifecycle-design

  • @georgeseese
    @georgeseese3 жыл бұрын

    I'm glad to see these tools to make SQL projects easier. I assume the tools wanted an SQL server with known specifications. Is that why my existing servers are not utilized? But what's the purpose of two servers, first is (localdb)]MSSQLLocalDB, second is (localdb)\ProjectsV13? Only the first one is used here.

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    LocalDB allows for an easy development environment without the expense of installing full SQL. As for why there are two "servers", these are just two locations to install the database files. You don't have to have or use both.

  • @ondrej243
    @ondrej243 Жыл бұрын

    Hi Tim, there is one thing I am not sure I get correctly.. Can I for example create a codebook sql table in this LocalDB and deploy it on IIS Folder with my API project, so the API will not depend on real SQL Server that might be sometimes unavailable, but will read the codebook value from this localDB server instance, that will be deployed in the same folder as the API project? Thank you

  • @auroragherman6369
    @auroragherman63693 жыл бұрын

    @IAmTimCorey Hi! I just want to ask you a question. I have a PC with Win10 and Visual Studio 2019 on it. I created the SQLproject as you did but when I try to create the Person table, I receive this error message: 'Could not load file or assembly 'Microsoft.SqlServer.BatchParser.dll' or one of its dependencies. The specified module could not be found.' What is the problem? What can I do? Please help me! Thank you in advance! Sorry for my English.

  • @georgeseese
    @georgeseese3 жыл бұрын

    There are many professional people who specialize in the Database business, never writing application code. Some of their work is done manually (analyzing business data, stages of normalization, designing tables and other db objects, etc.). Each db system has software to help manage it (eg. SSMS for Microsoft SQL Server). There are many add-ins and plug-ins to "improve" SSMS in various ways. This new VS "SQL Server Database Project" aims at a small part of what's done in SSMS. For those in small companies (or for personal projects) who already utilize Visual Studio, this project type provides great tools to make it easier to generate and maintain a database. Tim says some of these are "golden". Were these improvements also made directly in SSMS? Are there clues about the future?

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    SSDT isn't necessarily a new tool. It has been around for a bit. The difference between SSMS and SSDT is that SSMS is about management, where SSDT is about development. SSDT provides the tools to build a database (refactoring, source control, etc.) that are really beneficial to the development process. SSDT can be really useful for any size application and company, even if you are dedicated to building databases only. It does not replace SSMS, it just approaches a different part of the problem.

  • @georgeseese

    @georgeseese

    3 жыл бұрын

    @@IAmTimCorey Thanks Tim. I didn't know this video was about SSDT.

  • @stephenmurphy8833
    @stephenmurphy88333 жыл бұрын

    Hi Tim I found this very helpful. There is another aspect to SSDT which I think needs its own treatment and that is Unit Testing once a database project has been built. Would you be able to do another video to cover this topic? I have scoured youtube recently and there isn't much content on this. The area I am most interested in is how to create a custom unit test in ssdt.

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    Thank you. I have added this to my list of possible future topics.

  • @xelaksal6690
    @xelaksal66905 жыл бұрын

    ty

  • @IAmTimCorey

    @IAmTimCorey

    5 жыл бұрын

    You are welcome.

  • @buddyrowe7460
    @buddyrowe74604 жыл бұрын

    Nice work! Thank you. Do you have any follow up videos on this? You had mentioned showing us how to use with TFS and within teams.

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    I have two courses that do just that. The Database DevOps from Start to Finish course ( www.iamtimcorey.com/p/database-devops-from-start-to-finish/ ) shows you how to build a database with this, deploy it, bring in an existing database, and even work with external changes. The Application Lifecycle Design course ( www.iamtimcorey.com/p/application-lifecycle-design/ ) covers using Azure DevOps to deploy this automatically to an Azure SQL database (although the principle applies to even local databases). It also covers deploying web apps, creating different versions (development, staging, and production), and how to put all of this under source control. On KZread, I am using this in my TimCo Retail Manager series to handle all of the database work.

  • @dleasman
    @dleasman2 жыл бұрын

    Question for you, Tim... What if you have several db instances. What is the best practice to deploy the latest schema changes to all instances? I tried creating a publish.xml file with multiple property groups (one for each db instance) but that did not work. I was thinking of writing code that would automate via command line and generate .publish.xml files for each db, and then deploy to each sequentially. Any advice, or a known method for doing this?

  • @IAmTimCorey

    @IAmTimCorey

    2 жыл бұрын

    You can use a tool like Azure DevOps to automate the deployment of your database to as many instances as you want.

  • @janicekang8745
    @janicekang87453 жыл бұрын

    hi Tim, can i ask what is the best practice to do the database versioning in code? for example for database version 2.0 i have added 3 new columns, how do i keep track on those changes and upgrade or downgrade the database versions for different customer?

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    This tool will allow you to keep track of how your database changes over time. Rollback is a tricky one. If you added columns, put data in, and then try a rollback, it will fail (or delete data).

  • @magnus7538
    @magnus75384 жыл бұрын

    Hi Tim, as always great content. Thank you so much! I was wondering if this is something you would use instead of something like flyway scripts?

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    Yes, I use these all of the time. I haven't gotten into using Flyway.

  • @tomlee7073
    @tomlee70734 жыл бұрын

    Tim, thanks for all your videos they're great. Im using them to get up to date with all the latest additions in the past 8 years Ive been away from c#. I have one question though, it seems like in all your videos you name the table names singlular when Ive always made them plural and in other languages it's either recommended or forced to make them plural so certain apis work seemlessly with them. Is there a specific reason you name them singular? I always looked at it like a table is called "Users" because it holds many users, but the model class is singular "User.cs" because it only represents one instance or row from that table, just wondering if there was any particular reason you do that, thanks again

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    Good question. That naming convention is much more ambiguous. I lean towards singular because when you query a table, you say things like User.FirstName to represent a user's first name rather than Users.FirstName. However, I've worked on projects that do it the other way and that's fine.

  • @always90s
    @always90s4 жыл бұрын

    Hi Tim. Great video. So I have a Post Script question. Lets say I do a release on Monday and I have some post scripts where I add Frank to the User table. Then Wednesday I'm gonna do another release where I'm gonna add some Addresses to the Address table. Given the fact I'm gonna keep running the post script file on every release it means all my scripts need to do some type of check so it does not add from the previous script. Like you did in your example from the video where you did an exists check before adding the Demo user. So my question is there a way so that on every release I don't have to run the previous post scripts? Each release just runs whatever is new for this release. I don't want to keep running the previous post scripts. Thanks!

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    Not natively, no. You could create a version table and based upon the current version, you would run the post scripts after that version.

  • @Highnorthy
    @Highnorthy4 жыл бұрын

    Hi Tim, I have reached the point of linking the foreign key and the ID key. But every time I publish it the value for Address.PersonID will return to allowing nulls because it says there is no data present so allowing it will cause data loss

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    It sounds like a setting on your SQL Server that is preventing the change. However, you can manually run the change and it should work.

  • @smailbahamida3973
    @smailbahamida39734 жыл бұрын

    Thank you Tim for video, just question: if I have user in security options of my db, how to add it automatically in publishment of my c# project?

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    That would be a post-deploy script.

  • @bardugoym
    @bardugoym4 жыл бұрын

    Hi Tim, is the a way to add conditions? for example script that should run on enterprise (compression) vs standard, sql different versions (2014, 2016) with unsupported features?

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    You have to specify which database you are going to target. That will limit what tools you have available. However, you can run pre and post scripts using TSQL so if you can do it in TSQL, you can run it during deployment.

  • @anhvuau1465
    @anhvuau14652 жыл бұрын

    Hi Tim, thanks for sharing this great contents. This is great when you working with single database. What about multiple databases and they all have cross databases query in views and procs? Can you please make another video about how to add database references DACPAC files and how to deal with 3 parts name query for cross databases and cross servers environment? I'm a bit unclear how to make a good use of it. Much appreciated.

  • @IAmTimCorey

    @IAmTimCorey

    2 жыл бұрын

    That can be done, although I would encourage you to avoid cross-database queries wherever possible.

  • @satheeshkumar3926

    @satheeshkumar3926

    2 жыл бұрын

    @@IAmTimCorey Have you done any video for Multiple Databases or Linked Servers

  • @karatekid559
    @karatekid5594 жыл бұрын

    Hello Tim is the Post Publish Script the only way to alter a Table after it has been created and already has data stored in it? I'm trying to add a column I forgot about but I can no longer publish. I just went ahead and deleted the table and created it again because I only had 2 rows, but in the future when there is significant data stored that wouldn't be a good idea.

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    You can do a Pre-Deploy script as well, in case you need to clean things up before you add a column or delete a column. If you attempt to do something that will cause data loss, the system won't do it automatically without you explicitly forcing it (it is a safety measure). You can get the script that it created for the update and modify it to force the update, then run the script.

  • @shawnmofid7131
    @shawnmofid71315 жыл бұрын

    Great content. Thanks. This is a very nice way of saving our Database schema and deploy to different instances, and versions of databases. I noticed when I created a post deployment script, the id of Demo User was 1002 instead of the next available int which was 4. I am not sure what I did wrong. I am concerned about it since the max rows value is set to 1000.

  • @IAmTimCorey

    @IAmTimCorey

    5 жыл бұрын

    Nothing wrong. When SQL restarts, it skips a set up IDs so it doesn't step on the toes of previous transactions. As for the max value of 1000, I don't think that is what you have set. If so, you wouldn't get a value of 1002.

  • @jannickpedersen4620

    @jannickpedersen4620

    4 жыл бұрын

    @@IAmTimCorey I got the same problem and it was on max 1000 xD Anyways really good video, and i am considering buying a turtorial soon :)

  • @satori8626
    @satori8626 Жыл бұрын

    SSDT is really great, but I would love a video that explains what is going on under the hood, and how you would do source control on your database if you didn't have SSDT.

  • @IAmTimCorey

    @IAmTimCorey

    Жыл бұрын

    Unless you want to do a lot of manual work, you don't put a database into source control without a third-party tool like SSDT. Typically, those tools are expensive.

  • @satori8626

    @satori8626

    Жыл бұрын

    @@IAmTimCorey Thanks, I am definitely using SSDT in my daily work, I am just curious as to what is going on underneath :)

  • @gregory9028
    @gregory90284 жыл бұрын

    another beginner question: You use the term scripts @ 16:39 while hoovering over the properties window. Also you are renaming a lot of files, hard to keep up. I have been trying to connect two tables (primary/ foreign key) but the Red exclamation point say My data cannot be saved. Any suggestions.

  • @IAmTimCorey

    @IAmTimCorey

    4 жыл бұрын

    It sounds like you have a syntax error but I'm not sure. You can add a foreign key relationship to link the two tables. The trick is that the types need to be of the same type (int to int) and you should link it to a primary key column (one that is marked as such).

  • @jordandoell
    @jordandoell3 жыл бұрын

    Is there a way to generate these publish scripts from a C# project? We would like to loop through a few databases and programmatically change what database the publish process points to so we can deploy our changes to multiple databases when we update our client installations. Is that possible through this VS project type??

  • @IAmTimCorey

    @IAmTimCorey

    3 жыл бұрын

    Sure. The entire deployment process can be automated, so it can also be deployed to multiple locations.

  • @cloud77hot40
    @cloud77hot403 жыл бұрын

    How do I publish a project with a database inside? New to programming here.