[Solved] Computer Science Assignment: Database Schema and Connection String

Written by

in

✓ Verified Academic Solution Available

Executive Solution Overview

Download and install SQL Server **Express** on your local machine. Here is the installation guide: MAKE SURE YOU INSTALL SSMS AS PART OF THE SQL SERVER INSTALL. THIS IS AN INDIVIDUAL ASSIGNMENT. Next, create the database schemas (write the SQL) for the following table and execute them on your local …

Instant Solution Download

$6.99

Immediate access to the full model answer, formatted citations, and rubric breakdown.

Need a Fresh Custom Paper?

Have this question answered from scratch according to your specific instructions and deadline.

Order on TutorsGallery →

Assignment Prompt & Instructions

Download and install SQL Server **Express** on your local machine.
Here is the installation guide:
MAKE SURE YOU INSTALL SSMS AS PART OF THE SQL SERVER INSTALL.
THIS IS AN INDIVIDUAL ASSIGNMENT.
Next, create the database schemas (write the SQL) for the following table  and execute them on your local SQL Server.
Table name: Employee
Fields should be:
    EmpID int,
    LastName varchar(255),
    FirstName varchar(255),
    Address varchar(255),
    City varchar(255)
[https://www.mytecbits.com/microsoft/dot-net/error-sqlconnection-could-not-be-foundLinks to an external site.](https://www.mytecbits.com/microsoft/dot-net/error-sqlconnection-could-not-be-found) explains how to update your code reference for System.Data.SqlClient.
Populate the table with dummy data (this will let you test that it actually works). The dummy data does not have to be a large dataset- a couple of rows of data should suffice. Create a console app in C# (you can create any kind of solution, upto you; even a console application is fine).
Once you have made the sln file/project folder: Project -> Manage NuGet Packages…In the search, type System.Data.SqlClient and install it. Do not install Other versions of SqlClient – what you need is System.Data.SqlClient
Create a C# file in your console app and call it ConnectionAccessor.cs.  Write one method inside this class and call it TestDatabaseConnection. Utilize a connection string in this method and connect to the database you just created and populated. Print a message to the console when your connection is successful, and take a screenshot of the message. UPLOAD THE  FOLLOWING TO THIS ASSIGNMENT:
1. Your .cs file containing the code to connect (If you used a web.config file, include that also. If not, just include the .cs file).
2. The screenshot of a successful connection
3. your SQL script you used to create the table – in a .sql file
Here are code examples:
This assignment is worth 50 points in total. 25 for the SQL script and config files, and 25 for the C# code.
Good luck!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *