
- #ADVENTUREWORKS DATABASE TABLES UPDATE#
- #ADVENTUREWORKS DATABASE TABLES PASSWORD#
- #ADVENTUREWORKS DATABASE TABLES WINDOWS#
Exercise 2: Querying a Database by Using Transact-SQL Scenario Results: In this exercise, you created a database diagram in the AdventureWorks2016 database and a database diagram in the AdventureWorksDW2016 database.

Save the database diagram as AdventureWorks Data Warehouse Diagram, and then close the diagram window. In the AdventureWorksDW2016 database, create a database diagram and add then the following tables to it: Save the database diagram as AdventureWorks Diagram, and then close the diagram window. In the AdventureWorks2016 database, create a database diagram and then add the following tables to it:Įxamine the primary key columns and the foreign key relationships between the tables in the diagram, and note which columns are involved in the relationships.
#ADVENTUREWORKS DATABASE TABLES WINDOWS#
Open SQL Server Management Studio and connect to the MIA-SQL Database Engine instance by using Windows Authentication. You will begin your exploration of the databases by creating two database diagrams, one for the Adventure Works OLTP database, and one for the Adventure Works data warehouse.
#ADVENTUREWORKS DATABASE TABLES PASSWORD#
Log on to 10985C-MIA-SQL as ADVENTUREWORKS\Student with the password Ps$$w0rd.īrowse to the D:\Labfiles\Lab01\Starter folder, and then run Setup.cmd as Administrator.Įxercise 1: Exploring an OLTP Schema and a Data Warehouse Schema Scenario Write Transact-SQL SELECT statements that include a WHERE clause.Įnsure that the 10985C-MIA-DC and 10985C-MIA-SQL virtual machines are both running. You intend to create database diagrams of parts of the OLTP database and data warehouse database, and examine the table ObjectivesĪfter completing this lab, you will be able to:Ĭreate database diagrams to explore databases. Your line manager has asked you to familiarize yourself with the databases that you will be working with, and has given your user account the required permissions to do so. You have recently started working as a database developer at Adventure Works, manufacturers and retailers of bicycles and associates products.

The specific products associated with the sales order are stored in SalesOrderDetail Table.

Now I need to give edit feature where a user can edit a past sale for example (sale id = 2) He can change the sold qty to 100 from 50. This kind of table is useful for a report where I need to show how the items sold over a period. Sale Id | Item ID | Sold QTY | Balance QTY | Date Should I calculate balance qty on the fly when needed for report/visualization and not storing it in the sale table? Sale table structure of records in this table < 10 K, is this a good design?
#ADVENTUREWORKS DATABASE TABLES UPDATE#
I would need to run a query to update all the sale records past this sale. This will affect the balance qty field of all the records past that sale of that particular item. While implementing 'edit sale' feature, I need to update the sold qty field of a sale done in the past. This table contains fields sold qty and balance qty of an item after each sale. In my inventory database there is a sale table.
