Create database in sql server

Assignment Help Database Management System
Reference no: EM131571653

Task 1: Update Your Logical Database Design from Project 1

First, make sure your ERwin data model from Project 1 is a logical/physical data model that uses MS SQL Server as the database. If you have created a logical only data model or pointed to another type of database in Project 1, you will need to create a new logical/physical model that uses SQL Server as the database, copy and paste everything from your previous model.

Next, update your ERwin data model based on instructor's review and feedback on Project 1. Make sure you have the correct primary keys, foreign keys, data types, relationships, and cardinalities for these tables.

If you don't specify the data type for each attribute appropriately, you may encounter errors during the forward engineering process because SQL Server will not accept inappropriate data types, such as precision and scales for decimal type of data. For example, use Decimal (10,2) for prices instead of Decimal ().

Similarly, if you don't specify the field width for each attribute/column as described in the table, data may be truncated during the data populating process.

Task 2. Create Database in SQL Server Using ERwin Forward Engineering

Use ERwin forward engineering function to automatically create the database schema in Microsoft SQL Server. Save the .ere file generated during the process. Watch the YouTube video (link posted on Blackboard -> Course Documents -> YouTube videos) to learn how to forward engineer ERwin model to SQL Server.

Task 3. Normalize and populate the data

3.1 Normalize the data

Next you need to normalize the data provided in "Project 2 Starting Data Summer 2017" to the 3rd level, and populate them to your MS SQL database tables created from above.

In addition to that the business rules in Project #1, more hints are listed in the following:

Products with the exact same name are considered as the same product. In your normalized data, you will need to create a product ID starting from 1, incremental by 1, for each product that has a unique name. Sort the products by name alphabetically and then assign each a product ID, for example, "Bandages (Box of 1000)" will have product ID 1.

All products that PSC sells are purchased from suppliers. A product can be purchased from multiple suppliers at various costs.

Some products may not have been ordered yet, such as Silicon Spatula.

The Quantity in the "Customer Orders Detail" is the Order Quantity associated with each item ordered by each customer, and should go into ORDER_LINE_T.

The Quantity in the "Product Supply Detail " is the Supply Quantity that should go into PRODUCT_SUPPLIER_T. Because the same item/product can be purchased from multiple suppliers, so the sum of the quantity you can find for this item/product is the Stock Quantity that should go into PRODUCT_T.

The Item Price in the "Customer Orders Detail" is the Unit Price the product is sold for, and should go into PRODUCT_T.

The Cost in the "Supplier Purchasing Details" is the Supply Unit Cost and should go into PRODUCT_SUPPLIER_T.

PSC decided that one product can be in one and only one category, while one category contains one or more products.

Lastly, do not forget that in "Customer Orders Detail", "Customer 3876 wants to add 1 snow mobile for $5,400 to their order 1530. Please populate the database with this new information as well."

3.2 Populate the data in MS SQL Server using SQL

When you populate the data, be aware that existing integrity constraints will force you to enter data in certain orders. For example, customer ID is required in Order_T so you cannot populate the orders before you populate the customers. So a good approach is to write down the order you populate the tables with data following integrity constraints.

For example,

CUSTOMER_T -> ORDER_T, PRODUCT_T -> ORDERLINE_T...

One way to populate the data is to use INSERT SQL statements (SQL Server Management Studio -> New Query). When you use SQL insert statements to populate the data, be aware of the columns that do not have any data, enter a pair of empty quotes (,‘',) for empty string type of columns, and null (,,) for empty number type of columns, otherwise the SQL Server will not execute your insert statement. Note that date is text-based too so when you insert a date value don't forget to use ‘', otherwise incorrect value will be inserted. Alternatively, you can insert values into selected columns instead of all columns.

Sometimes you will realize your database structure is built incorrectly once you started to populate data into it, and because you created the database structure using ERwin Forward Engineering function, it may have limitation of what you can change afterwards - such as changing the data type for a non-key column in the table design in Management Studio.

You may first need to turn off the default "Prevent saving changes that require table re-creation", by going to top menu, select Tools -> Options -> Designer, uncheck the "Prevent saving changes that require table re-creation" option. In most cases you probably will find it easier to detach and delete the database, correct your ERwin model and re-create the SQL Server database from ERwin.

Another way to populate the data to import the data from an Excel spreadsheet using the Query Wizard, however the same integrity constraints apply, so you will still need to populate the tables in order.

Lastly you are able to populate the data manually in Design View in Management Studio - this is not preferred because it is highly labor-intensive and subject to human error. The method may work with this class project but not realistic in real-world scenario. Also when you do this do not turn on auto-generate identifier option.

What to include in your project report:

· Screenshot of your revised ERwin diagram (1 full page, use landscape layout if needed)

· Make the screenshot big enough to be readable. Use "Landscape" instead of "Portrait" setting in Word if you can.

· Each page of your report should show the screenshot of one table structure (Right click on the table name and select "Design" or use Design View), AND the screenshot of the data in that table (right click on the table name and select "select top 1000 rows" or use Data View).

And make sure your table data screenshot clearly shows the number of rows returned in the right bottom corner. Print table name on top of page.

· Make each screenshot is big enough to be readable but it should take about half page (in Word) not entire page like ERwin screenshot.

· In all screenshots, show your SQL server name and all table names in left explorer pane in Management Studio. You can take multiple screenshots if you have to in order to capture the entire result set (i.e., all records), but make sure to crop each screenshot and put them together so they are readable as a whole, and without repeating data.

Attachment:- Starting_data_summer.rar

Reference no: EM131571653

Questions Cloud

What is your experience managing projects : What is your experience managing projects through a virtual environment, and what tools have helped your success? Be specific, citing such tools as Webex.
How many scoring scenarios are possible for penalty kicks : This procedure is used to break ties in games in the championship round of theWorld Cup soccer tournament. Each team selects five players in a prescribed order.
Why the netherlands conducting a parallel criminal investion : Why can the SEC charge a company in The Netherlands with U.S. security violations? Why is The Netherlands conducting a parallel criminal investigation
Explain how dead capital is related to the informal economy : Explain how "Dead Capital" is related to the informal economy? Define these terms and explain what they mean in the context of DeSoto's ‘dead capital'.
Create database in sql server : Create Database in SQL Server Using ERwin Forward Engineering.Products with the exact same name are considered as the same product.
Find ways for three medal to be awarded if ties are possible : There are six runners in the 100-yard dash. How many ways are there for three medals to be awarded if ties are possible?
What would cause you to buy or sell a stock : Is it true that the only risk associated with owning a bond is that the issuer not make all the payments? Explain.
What is the minimum-cost schedule for the bank : Assignment: Chase Manhattan Bank Case Study- What is minimum-cost schedule for the bank? Would changing 40 percent to a higher value significantly reduce costs?
Advantages and disadvantages of renting versus owning a home : a. Describe in detail the advantages and disadvantages of renting versus owning a home. b. What is the role of the title search in making a home purchase?

Reviews

Write a Review

Database Management System Questions & Answers

  Design a database system for the publishing company

Design a database system for the publishing company- The National Publishing Company L.L.C - Explain the central concepts of database and web database systems, including constraints in the design of databases due to issues of concurrency, securit..

  How the design of a database can affect data quality

Evaluate how the design of a database can affect data quality. Discuss the role of a data dictionary in ensuring both the quality of enterprise-wide data and data within a specific database application.

  Create a simple query for each table that returns

Create a simple query for each table that returns all of the columns and all of the rows for each table. Write a query that displays each part that has been purchased by Huffman Trucking Company

  Draw the er diagrams for the following business rules using

draw the er diagrams for the following business rules using gliffy. identify all entities attributes relationships

  Develop an activity relationship chart for four departments

A machine shop located on the outskirts of Los Angeles accepts custom orders from a number of high-tech firms in southern California.

  Design and build a prototype data warehouse

Design and build a prototype data warehouse using the data on Spend over £25,000 in the Science and Technology Facilities Council

  What are the major components of a migration plan

Discuss why testing is so essential to the development of a new system, and explain how a test case relates to a test plan - compare and contrast unit testing, integration testing, system testing and acceptance testing.

  The impact of photodetectors on chromatic dispersion

Design and analyze the impact of photo detectors on chromatic dispersion with rz and nrz line encoded radio over fibre link having amplitude modulated suppressed carrier rf signal.

  Co-related sub-query to return one row per customer

Use a co-related sub-query to return one row per customer, representing the customer's oldest order (the one with the earliest date).

  Define four levels of distributed database functionality

IBM Corporation. Distributed Relational Database Architecture Reference. IBM Form No. SC26-4651.

  Create a database driven application for a business

Create a database driven application for a business. Identify a potential problem that this business might have. (ie, needs an automated inventory system, needs a payroll calculation system, needs a time management system.

  Design operational database to support the process described

Design operational database to support the process described above. Design reporting database schema to serve Daily snapshot report.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd