Skip to content

Exercise 2: Create database and table for users data

  1. Connect to the local database server using SQL Server Management Studio with the following credentials:

    • Server name: (localdb)\mssqllocaldb or if you are using the Express edition, then localhost\sqlexpress
    • Authentication: Windows Authentication

    Connect to SQL Server

  2. Use Object explorer to create a new database. The name should be your NEPTUN code.

    Create new database

  3. Create a new table to store data from the users csv file. The columns of the table should copy the columns of the csv file with one exception: the "Location" column should be split into "City" and "Country."

    Click the New query button and execute the following script to create the table.

    CREATE TABLE "BXUser" (
         "UserID" int,
         "Age" int,
         "City" nvarchar(1000),
         "Country" nvarchar(1000)
     )
    
Back to top