Microsoft SQL Server Database Project in Visual Studio 2022( Getting Started)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone welcome back once again in this video we'll look at microsoft sql server database project inside the visual studio 2022 but before we get started please make sure you subscribe to the channel if you haven't so let's get to it then so microsoft sql server is a relational database management system its primary function is retrieving and storing data as requested by other applications with the visual studio 2022 you can create a new database project and import a database schema from an existing database sql script file you can then invoke some visual designer tools transact sql editor table designer which is available for connected database development to make changes to the offline database project and also publish the changes back to the production database but enough of all the talking so let's get to the real stuff here so if you can look on the screen here i've got a visual studio 2022 opened so we go ahead by clicking on the create a new project but obviously before we go ahead you need to make sure that you have you are connected to a sql server or microsoft sql server so we can type here database yeah so this is a sql server database project so we click on it then we go next so here obviously we can configure the database project details or the project details yeah so we're just going to make it yt project basically the yt for youtube so we click on the create yeah so this might take a while so i'm just going to pause the video okay so it's created now so basically we have an empty project yeah so what we do next is we come inside the server so basically you should you should or you are supposed to be able or you have to be connected to a sql server yeah so we click on the right click on the data connection and add connection so here we can select the server if it's available so let's see so this should take some time so i'm just going to type in this my server is a local host localhost so i'm just going to type it here just a second so i have actually typed in my my server name so here we're going to create a new database so we're just going to add it we're just going to add the database name here so we click ok so as you can see we've got this prompt here the database name that's not exactly so we click on yes to create a new one yeah so as you can see here now we have the database created we have nothing inside the table so we're just going to right click and then add a new table so here we're just going to change the table name yeah we're just going to make it products and then the id we're going to change it to product id then we're just going to add one more stuff so we're just going to add the name for product name so this will just be a simple test so that's all we're going to do here so we're just going to we come up here we click on the update here so basically i'm just up in here so this is the table we're gonna refresh it yeah so we don't have the table created here so we're going to update the script here so we click update database so the database has been updated so we come back here then obviously we write we refresh it so as you can see we've got the table created here the table created with the product name and the name yeah so we're just going to close this table yeah so what we do next is we come inside a project we right click the project then the first bit import yes so we import the database yeah so here you can select your database connection so here obviously you can select your you show more properties so here you select the database that you created so in our case it was u2 yeah so we connect so we start with the import we wait wait a bit so we click on the finish so as you can see here now we've got a new folder added to the project and inside we've got tables and then we've got products dot sql so that this the file that contains that this table details this product details so we're just going to make a very simple change we're gonna add price so this will be money so we're just gonna add one more thing description description then this will be just a test yeah so that's all we're going to do here we're going to save the the script here so now once we've saved it is what we're going to do we're going to right click on the project and then publish it so but before we do that we come back here we refresh the table again so as you can see we've only got the product id and the product name so we publish it so here we select the target database so in our case is the youtube as you can see it's already been displayed here so we click on the okay we can text the connection to see so the connection is succeeded and then we click on ok so we we publish click on the publish we could either we could have generated a sql file to be published later on or we could just publish it directly so we just wait for the whole things to complete so i'm just gonna refresh the table here so as you can see here now we've got the price and description added to it here so we can double click on the on the table and as you can see here we've got the other two attributes added to it yeah so as you can see it's very simple to start with the database project and and get going so you can make either changes you can make the changes from this big arcs directly from the project yeah so i'm going to leave the video here and i hope you actually got this actually got you started yeah we'll continue further to details yeah so if you haven't subscribed to the channel please make sure you do because i've got lots of videos coming up and i hope you have a lovely morning evening afternoon wherever you are peace
Info
Channel: Hacked
Views: 191,784
Rating: undefined out of 5
Keywords: microsoft sql server, sql, sql server, microsoft sql server tutorial, database project, visual studio database project, mssql, ms sql 2020, sql server connection, server connection, my sql database, database, sql database, database project ideas, windows server 2019, sql express project, visual studio 2022 database project, visual studio 2022, msql database project, ms sql 2022, ms database visual studio, server
Id: 5nTlqgQLkIc
Channel Id: undefined
Length: 8min 36sec (516 seconds)
Published: Fri Apr 22 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.