To see a video demonstration, watch: https://youtu.be/whGpm-H3w08
1. Create a Word document. Save the file as chapter2-textbook-assignment.docx
2. Copy the following headings and paste them into the document:
AP tables=
Columns in Vendor table=
Vendor integer columns=
Vendor character columns=
Vendor primary key=
Vendor foreign key=
2. Launch SSMS. Expand the Database object. Expand the AP database object. Expand the table folder and count the number of tables. Enter the number next to the AP tables= heading you copied and pasted in step 2
3. Expand the Vendors table and count the number of columns within the table. Enter the number of columns next to Columns in Vendor table= .
4. With the Vendors table expanded, count the number of columns in the Vendor table that have the int data type and enter the value next to the heading.
5. With the Vendors table expanded, count the varchar AND char columns in the Vendor table, then type the value next to the heading.
6. With the Vendors table expanded, type the name of the primary key next to its' heading.
7. With the Vendors table expanded, type the name of the foreign keys next to their heading.
8. Save your changes.
To see a video demonstration, watch: https://youtu.be/i-a4bQoAg8E (The video covers how to complete steps 1 through 6, steps 7 through 9 are similar and you will need to do those on your own. The video also explains what you need to do in task #3 and how to upload to the dropbox in Moodle).
1. At the bottom of the word document, enter the heading: AP Database Diagram
2. Using SSMS, generate a Database Diagram for the AP database that includes all the tables. Take a screenshot of the diagram and paste it into the Word document
3. Copy the headings showing below and paste them below your database diagram
Terms Table Primary Key=
Tables related to Terms Table=
Terms Table Primary Key data type=
Column Names of the InvoiceLineItem Table Primary keys (2 keys)=
Tables related to InvoiceLineItems Table=
InvoiceLineItems Table Primary key data type (2 keys)=
4. Using the database diagram, find the Terms table and enter the name of the primary key next to the heading.
5. Using the database diagram, enter the names of the tables that are related to the Terms table next to the heading.
6. Expand the Terms Table to find the primary key and enter the data type for the primary key next to the heading.
7. Using the database diagram, enter the names of the two primary keys in the InvoiceLineItems table next to the heading.
8. Using the database diagram, enter the names of the tables that are related to the InvoiceLineItems table next to the heading
9. Expand the InvoiceLineItems Table to find the primary keys and enter the data type for each key next to the heading.
10. Save your changes
1. At the bottom of the word document, enter the heading: Examples Database Information
2. Copy/paste the questions below into your word document below the heading, then find the answers to the questions and enter them into the document. HINT: For e, see G:Viewing Rows in the chapter keypoints.
a) How many tables are in the Examples database
b) In the Examples database, how many columns are in the Customers table?
c) In the Examples database, how many columns in the Invoices table have a data type of int?
d) In the Examples database, how many columns in the PaidInvoices table have a data type of money?
e) In the Examples database, how many rows are in the SalesReps table?
f) In the Examples database, what is the primary key in the SalesReps table?
g) In the Examples database, Project table, what is the maximum number of characters allowed in the ProjectNo column?
h) In the Examples database, Projects table, can the ProjectNo column have a value of null?
3. Save your changes.
4. Upload the document to the dropbox.