SQL Server Database Creation, Tables and Relationships | SQL Server Management Studio

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ธ.ค. 2020
  • SQL Server Management Studio Database Creation, Creating Tables and Relationships. All you need to know about SQL Server Database Creation operations are explained in this video.
    Please subscribe ❤️ ...and turn on notifications! 🔔
    Video Transcript:
    Hi, I'm Muhammad Asif, and we'll see how to create databases, tables, and relations using SQL server management studio. If you're new to this channel, please subscribe to the youtube channel to support the work and to receive more videos like this.
    So, let's back to the topic. To create a database, tables, and relations, we would need to translate the requirements into a physical model that is deciding table names, their relationships, primary key, and foreign keys by carefully analyzing the requirements.
    After creating the database's physical model, Open SQL server management studio, I've created separate videos if you're facing any issues in SQL management studio database connection.
    Expand the databases, right-click on the database folder and select New Database
    Enter the database name and then click on the OK button
    A new database is created; expand the Newly created database. Expand the Tables folder.
    Right-click on the Tables Folder, Hover New, and then select Table.
    Enter the table column names and data types one by one.
    Right-click on the Column name field to assign Primary Key, Click on the First option, Set Primary Key.
    Scroll down the column properties panel. Double click on the "Identity Specification" option to change it from No to Yes; it will assign the auto-increment property to the primary key.
    Right-click on the table name and select Save Table or Press Ctrl + S keys.
    Enter the table name and select, OK.
    Right Click on the tables folder and then click on the refresh option.
    The new table is added to the tables folder.
    Similarly, create the second table.
    Enter the table column names and datatypes one by one, select Primary key, assign identity column and save the table.
    You can also create tables using the SQLQuery window.
    Let's build the third table using the SQLQuery window.
    Keep the Tables folder selected; click on the New Query Option in the top menu options bar.
    Write the Create Table SQL query,
    Click on the Parse option to check for syntax errors.
    After that, click on the Execute option to execute the SQL Query.
    Refresh the Tables folder, and the table is successfully added to the tables folder.
    Now, let's create the relationships model using SQL Server.
    Expand the Database Diagram folder, install any missing modules by clicking on the Yes option.
    Right-click on the Database Diagrams folder, Select New Database Diagram, select the tables, and click on the Add button.
    Arrange the tables by dragging the tables to the appropriate positions.
    Click on the Primary key of the first table, and then click on the table where you want to use it as a reference key.
    Check the Primary key and foreign key tables, and click on the OK button.
    Similarly, make the relationship between the second and third table.
    Right-click on the diagrams window and select Save Diagram, or Press Ctrl + S keys. Name the diagram and Press Enter.
    The relationship table is created successfully; now, you can check the primary key and foreign keys for each table in the tables folder.
    Right Click on one Table and Click on "Edit Top 200 Rows."
    Add records to the first table.
    Now, Again right-click on the second table and select "Edit Top 200 Rows."
    Enter any record in the child table. The child table's foreign key column gives an error because PackageID 4 is not present in the parent table, which means the relationship model is working well. Correct the data and press enter.
    Here is a Bonus tip of the video:
    By default, SQL Server Management Studio will not allow you to make any changes in the table design view after creating the relationship model; you can fix the issue by clicking on the tools item and then select Options...
    Select Designers, and then Uncheck the option "Prevent saving changes that require table re-creation" click on the OK button.
    I hope you'll have learned something new from this video, You can ask questions and share suggestions in the comment section below this youtube video. Thank you so much for watching, and we'll meet in the next video.
    💡 TOPICS IN THIS VIDEO 💡
    • SQL server database creation
    • microsoft SQL server database creation
    • microsoft SQL server
    • sql server management studio
    • database
    • create table
    • Database creation
    • relational database table creation
    • Microsoft SQL Server database creation
    • SQL Server create tables
    • sql server
    • sql
    • how to create a table in SQL server
    • how to create a database in SQL server
    • how to update in SQL server
    • SQL Server- create a database
    • Create Insert Update Delete SQL server
    • create a database and table
    🔎 HASHTAGS 🔎
    #SQLserverdatabasecreation
    #microsoftSQLserver
    #database
    #createtable
    #Databasecreation
    #sqlserver
    #sql
    #SQLServer-createadatabase
    #createadatabaseandtable

ความคิดเห็น • 28

  • @mr.bayram1
    @mr.bayram1 6 หลายเดือนก่อน +2

    I tried for two hours to solve a problem and I couldn't solve it. I found the solution in this video that I randomly clicked on, thanks bro

  • @enddigital2377
    @enddigital2377 8 หลายเดือนก่อน +5

    Thought me more than my advance database teacher in 5 minutes

  • @Andalfulfulde
    @Andalfulfulde 4 หลายเดือนก่อน +1

    Assalamu alaikum warahmatullahi wabarakatuhu, Congratulations dear, am thrilled ❤❤🎉🎉🎉

  • @unknownfactor6489
    @unknownfactor6489 4 หลายเดือนก่อน +1

    thank you for helping me with this video

  • @pfaqiri001
    @pfaqiri001 11 วันที่ผ่านมา

    THANKS

  • @imtiazraza6178
    @imtiazraza6178 ปีที่แล้ว +1

    sir, your concept is excellent and this one video is very helpful for me. Thanks!

  • @ImTariq911
    @ImTariq911 4 หลายเดือนก่อน

    Really helpful and best visualize all the method. Thank you!

  • @anirudh7150
    @anirudh7150 8 หลายเดือนก่อน

    Thank you Sir. It was helpful. From India.

    • @TECHINSPEC
      @TECHINSPEC  8 หลายเดือนก่อน

      Most welcome! 🇵🇰🤝🇮🇳

  • @ABDULLAHKHAN-lz7bi
    @ABDULLAHKHAN-lz7bi 7 หลายเดือนก่อน

    one confusion the data that is being showed in the table did you made put it manually there or it was randomly created at the time example asif jhon was that data present or you manually added it after creating the table

  • @ikshitiz1272
    @ikshitiz1272 3 ปีที่แล้ว +5

    i liked the bonus tip :O
    very useful

    • @TECHINSPEC
      @TECHINSPEC  3 ปีที่แล้ว

      Glad to hear that!

  • @Pujakumari-gl9kf
    @Pujakumari-gl9kf ปีที่แล้ว +1

    Itna time waste hogya..... Thank you for the bonus part at the end😢🎁

  • @VedicVisionsToday
    @VedicVisionsToday 3 ปีที่แล้ว +1

    simple and clear , good one

  • @jour785
    @jour785 ปีที่แล้ว

    Ah the classic indian tutorial

  • @anonub
    @anonub ปีที่แล้ว

    Thank you so much

  • @guillermomazzari4983
    @guillermomazzari4983 ปีที่แล้ว +1

    Thankd bro, new suscriber :D very usefull video

  • @user-xi8gt9zu2g
    @user-xi8gt9zu2g 4 หลายเดือนก่อน +1

    🙏🙏🙏🙏

  • @AmericaLIED
    @AmericaLIED ปีที่แล้ว

    When I try to (LINK) my tables together I get errors?! TABLES DO NOT MATCH?

  • @AmericaLIED
    @AmericaLIED ปีที่แล้ว +1

    Great video!

    • @TECHINSPEC
      @TECHINSPEC  ปีที่แล้ว

      Glad you enjoyed it‼️😇

  • @khaalidraabi2665
    @khaalidraabi2665 ปีที่แล้ว

    Tnx

  • @SanthoshKumar-kx1xh
    @SanthoshKumar-kx1xh ปีที่แล้ว

    The bonus tip was very usefull.

    • @TECHINSPEC
      @TECHINSPEC  ปีที่แล้ว

      Glad it was helpful!

  • @md.nahidulislam6667
    @md.nahidulislam6667 ปีที่แล้ว

    bonus tips help me.thanks

  • @rishipotdukhe5310
    @rishipotdukhe5310 ปีที่แล้ว

    link for the sql software