Write down a statement to create a view

Assignment Help Computer Engineering
Reference no: EM1327985

This must be done in SQL Server 2005.

In the first exercise, the Class field in the Part table should be a string of size 5, and not an int.

1- Write a statement that creates a table named Part, with an Id field as an int idendity primary key(PK), a SupplierId int field, a Description string field of size 25, a Count int field, a Class string field of size 5, and an inspection small date field. All fields cannot have a value of null, and the SupplierId field should be an FK that references the PK of a Supplier parent table.

2- Write a satement to add a check constraint to the above defined table, which guarantees that values entered in the inspection small date field are not older than today, meaning from now on. According to new requirements from your business analyst, an inspection can only be scheduled in the future.

3- Write a statement to add a check constraint to the above defined table, which guarantees that values entered in the Count field are never less than zero.

4- Write a statement to add a check constraint to the above defined table, which guarantees that values entered in the Class field can only be limited to the following strings: Open, Spec, and Priv.

5- Write a statement to create a view that selects all fields from the above table, except for both Id fields, in addition to the supplier name field of the Supplier table referenced in question 1. Note that the user is only interested in Parts that are not of class Priv. In other words, parts of class Priv should not be returned. Hint: A JOIN must be used to only return common rows.

Reference no: EM1327985

Questions Cloud

Problems in networking is the lack of enforceable standards : Both the engineering and the front office areas will use 100BaseT (twisted-pair Ethernet), how may you interconnect those two areas.
Methods for assuring non-discriminatory work environment : What are the three commonly used methods for assuring a non-discriminatory work environment?
The appropriate erp : The appropriate ERP - What enterprise resource planning (ERP) systems do your organization rely on
Democratic leadership style to address international issues : How can you adapt the participative/democratic leadership style to address international, cultural, and ethical issues?
Write down a statement to create a view : Write down a satement to add a check constraint to the above defined table that guarantees that values entered in the inspection small date field are not older than today, meaning from now on. According to new requirements from your business analys..
What managemnet control system might guillermo use : What Managemnet control system might Guillermo use to help it achieve its organizational goals? Please list references. 300 Words
Explaining the aaffirmative, action, policies, job, terminat : Are affirmative action plans necessary for social progress? Given that employment at will is the basic policy, how can employees then challenge a termination?
Advantages and disadvantages of erp : Advantages and disadvantages of ERP - Enterprise Resource Planning has many advantages. What are some of the disadvantages?
Explaining self-awareness and self-concept : How do self-awareness, self-concept, and emotional intelligence and worldview enable a leader to model the capacities or characteristics of servant leadership?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Windows live id and skydrive account

Suppose there are 1 million books within your campus library. Approximate (to the nearest order of magnitude) how several bytes of the data there are in case all these books were stored online and accessible across the computer network.

  Osi layered structure and different protocols

List and discuss major de-merits of the layered approach to protocols in scholarly detail.Explain why data network communication and distributed applications.

  Generating a brand new database for a company

If you were preparing to generate a brand new database for a company, explain whether you think there is the necessity of interviewing the users to find out what the colors and the designs they like.

  Why didn''t the vendor just bid fewer disks

Why didn't the vendor just bid fewer disks

  How might bpr be used in your organization

What is Business Process Reengineering (BPR)? Discuss how BPR might be used and describe the 'theoretical' results.

  A variety of both technical and business skill sets

An effective project manager wants a variety of both technical and business skill sets. recognize the nontechnical skills that have been associated with superior project management.

  Sorting the array

Write down a program which stores lists of the names (the last name first) and ages in parallel arrays and sorts names into alphabetical order keeping the ages along with the correct names.

  Plan and implement a stringed musical instrument class

Plan and implement a stringed musical instrument class

  Definition of data mining

In the Data Mining the first step to address this question is to carry out the appropriate research through the Web. Utilizing what you have found on Web, address the following questions in detail. To receive the full credit, you should supply URL..

  What kind of algorithm is required

figuring out how to find the last element of the print statement. For array A(N) and input element ARG, what kind of algorithm is needed to determine which element of A(N) is closest to but not greater than ARG? I've gotten this far but can't find..

  Developing logic for program

Design the logic for a program which reads in 100 customer records and stores first and last names and total purchases in three parallel arrays.

  Local v/s network printers

Write down a paper explaining the Windows Printer Model for Server 2008. Explain the local v/s network printers and how to decide which printers to deploy.

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