Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 . Create an empty database. Call it Personnel . db 2 . Create a table called people with the following fields. Make the ID

1. Create an empty database. Call it Personnel.db
2. Create a table called people with the following fields. Make the ID the primary key.
Field Name
Data Type
ID
INTEGER (primary key)
first_name
TEXT
last_name
TEXT
title
TEXT
3. Create a table called addresses with the following fields. Make the ID the primary key, and have the person_number be a foreign key into the person table.
Field Name
Data Type
ID
INTEGER (primary key)
person_id
BIGINT (FK to person table)
street
TEXT
city
TEXT
state
TEXT
zip
TEXT
4. Insert three person records into the person table, using whatever information you like.
5. Insert one more person using SQL. Look up the syntax for INSERT into...
6. Insert three address records, assigning 2 addresses to person 1 and 1 address to person 2.
7. Insert one more address using SQL.
8. Query your database for all people and addresses using SQL with a LEFT JOIN.
9. Query your database for all people (along with their addresses) whose last name starts with S(or any letter you know is in your table) and addresses using SQL with a LEFT JOIN.
10. Create three person records in Excel and auto-import then into your person table.

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

Students also viewed these Databases questions

Question

Distinguish between filtering and interpreting. (Objective 2)

Answered: 1 week ago