Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4 . 5 Your Name, Week 4 Database PA All Addresses in the Database Address 1 : 1 2 3 Apple Tree Ln Fremont, NC

4.5Your Name, Week 4 Database PA
All Addresses in the Database
Address 1:
123 Apple Tree Ln
Fremont, NC 23145
Address 2:
321 Labrador Dr
Apt 5
Greenville, VA 54321
Address 3:
916 Spring Grove St
Unit 3
Spring, TX 73915
Address 4:
739 Green Way
Flynt, MI 28537
Get an Address Using an Invalid ID
Address -1:
,-1
Updated Address
Address 2:
321 Labrador St
Apt 12
Greendale, TN 20194
All Addresses in the Database
Address 1:
123 Apple Tree Ln
Fremont, NC 23145
Address 3:
916 Spring Grove St
Unit 3
Spring, TX 73915
Address 4:
739 Green Way
Flynt, MI 28537 create the C# code based on the requirements provided below.
Your application will demonstrate storing and retrieving data in a SQLite database by creating software classes that create a database with one table and perform CRUD (Create, Read, Update, Delete) operations on data in that table. The data table will represent addresses and will store information typically associated with mailing addresses. Incorporate the following requirements into your application:
For all classes provide the following
Documentation at the top of the class file that includes
Your name
Date of development
Assignment (e.g., CIS317 Performance Assessment - Database)
Description of the class
Address information to store must include the following:
ID (primary key)
Street Address 1(e.g.,123 Main Street)
Street Address 2(e.g., Suite 102)
City
State
Zip Code (5-digit, e.g.,12345)
Create classes to perform the following:
Create or connect to a SQLite database
Interact with the Addresses database table
Create the table if it does not exist
Add a record to the table
Read a single record from the table
Read all records from the table
Update a record in the database
Delete a record from the database
Model or represent the data stored in the Addresses table
The main application must do the following
Print a line that states "Your Name - Week 4 Database PA"
Connect to the database or create it with the name "YourName.db"(replacing "YourName" with your actual name) if it doesn't exist
Create the Addresses table if it doesn't exist
Add 4 records to the addresses table, some with address line 2 information and some without (i.e. just an empty string)
Print the addresses in the database as follows, preceded by a line indicating you're printing all addresses in the database (see sample output for an example):
Header stating "Address :" where ID is the ID of the address record
Street address part 1
Street address part 2, if it is not blank
City, State, Zip Code
Print the result of trying to retrieve an address from the database using an invalid ID, preceded by a line indicating you're printing an address retrieved using an invalid ID
Update an address and print the updated address, preceded by a line indicating you're printing an updated record
Delete an address followed by printing all the records in the database, preceded by an appropriate header
Data stored and specific implementation of the classes is up to your discretion - your verbiage DOES NOT have to match the wording in the example output. Feel free to be creative with it.
Reminder:
You will need to add support to the C# project for using SQLite as follows:
Open a command prompt at the project folder (using the same techniques used to open a
command prompt for running an application)
Enter the following command and press Enter:
dotnet add package System.Data.SQLite --version 1.0.116
Sample Output:
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Apache Cassandra Development

Authors: Vivek Mishra

1st Edition

1484201426, 9781484201428

More Books

Students also viewed these Databases questions

Question

What problems do you see here, especially as it relates to control?

Answered: 1 week ago