Premium Essay

Premiere Products Exercises

In:

Submitted By Guillermoramos
Words 750
Pages 3
1. Create the TopLevelCust view described in Review Question 2. Display the data in the view.

CREATE VIEW TopLevelCust AS
SELECT CustomerNum,CustomerName, Street, City, State, Zip, CreditLimit
FROM Customer

2. Create the PartOrder view described in Review Question 3. Display the data in the view. CREATE VIEW PartOrder AS
SELECT Part.PartNum, Part.Description, Part.Price, OrderLine.OrderNum, OrderLine.NumOrdered, OrderLine.QuotedPrice, Orders.OrderDate
FROM Orders INNER JOIN (Part INNER JOIN OrderLine ON Part.[PartNum] = OrderLine.[PartNum]) ON Orders.[OrderNum] = OrderLine.[OrderNum];

3. Create a view named OrdTot. It consists of the order number and order total for each order currently on file.
(The order total is the sum of the number ordered multiplied by the quoted price on each order line for each order.) Display the data in the view.
SELECT OrderNum,NumOrdered, QoutedPrice, NumOrdered*QuotedPrice AS OrderTotal
FROM

4. Create the following indexes. If it is necessary to name the index in your DBMS, use the indicated name.
a. Create an index named PartIndex1 on the PartNum field in the OrderLine table.
CREATE INDEX PartIndex1
ON OrderLine (PartNum)

b. Create an index named PartIndex2 on the Warehouse field in the Part table.
CREATE INDEX PartIndex2
ON Part (Warehouse)

c. Create an index named PartIndex3 on the Warehouse and Class fields in the Part table.
CREATE INDEX PartIndex3
ON Part (Warehouse,Class)

d. Create an index named PartIndex4 on the Warehouse and OnHand fields in the Part table and list units on hand in descending order.
CREATE INDEX PartIndex4
ON Part (Warehouse, OnHand DESC)

5. Drop the PartIndex3 index.
DROP INDEX PartIndex3 ON Part

6. Assume the Part table has been created, but there are no integrity constraints. Create the necessary integrity constraint to ensure that the only allowable

Similar Documents

Premium Essay

Premiere Products Exercise for Relational Algebra

...1. List the number and name of all sales reps. PROJECT Rep OVER (RepNum, LastName, FirstName) GIVING Answer 2. List all information from the Part table for part FD21. SELECT Part WHERE PartNum = 'FD21' GIVING Answer 3. List the order number, order date, customer number, and customer name for each order. JOIN Orders, Customer WHERE Orders.CustomerNum=Customer.CustomerNum GIVING Temp PROJECT Temp OVER (OrderNum, OrderDate, CustomerNum, CustomerName ) GIVING Answer 4. List the order number, order date, customer number, and customer name for each order placed by any customer represented by the sales rep whose last name is Kaiser. JOIN Orders, Customer WHERE Orders.CustomerNum=Customer.CustomerNum GIVING Temp1 JOIN Temp1, Rep WHERE Temp1.RepNum=Rep.RepNum GIVING Temp2 SELECT Temp2 WHERE Rep.LastName= ‘Kaiser’ GIVING Temp3 PROJECT Temp3 OVER (OrderNum, OrderDate, CustomerNum, CustomerName) GIVING Answer 5. List the number and date of all orders that were placed on 10/20/2013 or that were placed by a customer whose rep number is 20. SELECT Orders WHERE OrderDate= ‘10/20/2013’ GIVING Temp1 PROJECT Temp1 OVER (OrderNum, OrderDate) GIVING Temp2 JOIN Orders, Customer WHERE Orders.CustomerNum=Customer.CustomerNum GIVING Temp3 SELECT Temp3 WHERE RepNum= ‘20’ GIVING Temp4 PROJECT Temp4 OVER (OrderNum, OrderDate) GIVING Temp5 UNION Temp2 WITH Temp5 GIVING Answer 6. List the number and date of all orders that were placed on 10/20/2013 by a customer...

Words: 352 - Pages: 2

Premium Essay

Concepts of Database Management – Premiere Product Exercise Chapter 4

...1) A… CREATE VIEW TopLevelCust AS SELECT CustomerNum, CustomerName, Street, City, State, Zip, Balance, CreditLimit FROM Customer WHERE CreditLimit >=10000 ; B… SELECT CustomerNum, CustomerName FROM TopLevelCust WHERE Balance>10000 AND CreditLimit>=10000 ; C… SELECT Customer.CustomerNum, Customer.CustomerName, Customer.Street, Customer.City, Customer.State, Customer.Zip, Customer.Balance, Customer.CreditLimit FROM Customer WHERE (((Customer.Balance)>10000) AND ((Customer.CreditLimit)>=10000)); 2) A… CREATE VIEW PartOrder AS SELECT PartNum, Description, Price, OrderNum, OrderDate, NumOrdered, QuotedPrice FROM Part ; B… CREATE VIEW TopLevelCust AS SELECT PartNum, Description, OrderNum, QuotedPrice FROM Part WHERE QuotedPrice>100 ; C… SELECT Part.PartNum, Part.Description, Part.Price, Orders.OrderNum, Orders.OrderDate, OrderLine.NumOrdered, OrderLine.QuotedPrice FROM Part INNER JOIN (Orders INNER JOIN OrderLine ON Orders.OrderNum = OrderLine.OrderNum) ON Part.PartNum = OrderLine.PartNum WHERE (((OrderLine.QuotedPrice)>100)); 3) CREATE VIEW OrdTot AS SELECT OrderNum, NumOrdered*QuotedPrice AS OrderTotal INTO OrdTot FROM OrderLine; 4) A… CREATE INDEX PartIndex1 ON OrderLine(PartNum); B… CREATE INDEX PartIndex2 ON Part(Warehouse); C… CREATE INDEX PartIndex3 ON Part(Warehouse, Class); D… CREATE INDEX PartIndex4 ON Part(Warehouse, OnHand DESC); 5) DROP INDEX PartIndex3; 6) CHECK (Class IN (SG, HW, AP)) FOREIGN KEY...

Words: 340 - Pages: 2

Premium Essay

Access

...Assignment Chapter 5 Members: 4 Deadline: Before final term year 2 semester 2 I. Review Questions: 1. 2. 3. 4. 5. Define functional dependence. Define primary key. Define candidate key. Define first normal form. Define second normal form. What types of problems would you find in tables that are not in second normal form? 6. Define third normal form. What types of problems would you find in tables that are not in third normal form? 7. Define fourth normal form. What types of problems would you find in tables that are not in fourth normal form? 8. Define interrelation constraint and give one example of such a constraint. How are interrelation constraints addressed? 9. Consider a Student table containing StudentNum, StudentName, student’s StudentMajor, student’s AdvisorNum, student’s AdvisorName, student’s AdvisorOfficeNum, student’s AdvisorPhone, student’s NumCredits, and student’s Class (freshman, sophomore, and so on). List the functional dependencies that exist, along with the assumptions that would support those dependencies. 10. Convert the following table to an equivalent collection of tables that are in third normal form. This table contains information about patients of a dentist. Each patient belongs to a household. Patient (HouseholdNum, HouseholdName, Street, City, State, Zip, Balance, PatientNum, PatientName, (ServiceCode, Description, Fee, Date)) The following dependencies exist in the Patient table: PatientNum  HouseholdNum, HouseholdName, Street, City, State, Zip...

Words: 1004 - Pages: 5

Premium Essay

Premier Products Normalization

...Premiere Products Exercises The following exercises are based on the Premiere Products database. 1. Using your knowledge of Premiere Products, determine the functional dependencies that exist in the following table. After determining the functional dependencies, convert this table to an equivalent collection of tables that are in third normal form. Part (PartNum, Description, OnHand, Class, Warehouse, Price, (OrderNum, OrderDate, CustomerNum, CustomerName, RepNum, LastName, FirstName, NumOrdered, QuotedPrice) ) The functional dependencies are as follows: PartNum—Description OnHand Class WareHouse Price OrderNum—OrderDate CustomerNum CustomerNum—CustomerName RepNum RepNum—LastName FirstName PartNum, OrderNum—NumOrdered QuotedPrice New tables would be as follows: Part (PartNum, Description, OnHand, Class, Warehouse, Price) OrderLine (PartNum, OrderNum) NumOrdered, QuotedPrice) Rep (RepNum, LastName, FirstName) Customer (CustomerNum, CustomerName, RepNum) Orders (OrderNum, OrderDate, CustomerNum) 2. List the functional dependencies in the following table that concerns invoicing (an application Premiere Products is considering adding to its database), subject to the specified conditions. For a given invoice (identified by the InvoiceNum), there will be a single customer. The customer’s number, name, and complete address appear on the invoice, as...

Words: 448 - Pages: 2

Premium Essay

Database Management Concepts

...your help in planning the data archive for the following Premiere Products database:     Rep (RepNum, LastName, FirstName, Street, City, State, Zip, Commission, Rate)     Customer (CustomerNum, CustomerName, Street, City, State, Zip, Balance, CreditLimit, RepNum)     Orders (OrderNum, OrderDate, CustomerNum)     OrderLine (OrderNum, PartNum, NumOrdered, QuotedPrice)     Part (PartNum, Description, OnHand, Class, Warehouse, Price) Determine which data from the database to archive; that is, for each table, specify whether data needs to be archived. If it does, specify which data, when it should be archived, and whether it should be archived with data from another table. 2. The DBA denormalized some of the data in the Premiere Products database to improve performance, and one of the resulting tables is the following: Customer (CustomerNum, CustomerName, Street, City, State, Zip, Balance, CreditLimit, RepNum, RepName) Which field or fields cause the table to no longer be in third normal form? In which normal form is the denormalized table? 3. Does your school have a formal disaster recovery plan? If it does, describe the general steps in the plan. If it does not, describe the informal steps that would be taken if a disaster occurred. For the following exercises, you will answer problems and questions from management at Premiere Products. You do not use the Premiere Products database for any of these exercises. 1. Fragment the Customer table so that customers of rep...

Words: 471 - Pages: 2

Premium Essay

Normalization

...1. Premiere Products Complete the Premiere Products Exercises in Chapter 5 - Name your Answers Last Name Normalization (i.e. Smith Normalization). Submit the assignment in a word document under the week's Assignment 1. Using your knowledge of Premiere Products, determine the functional dependencies that exist in the following table. After determining the functional dependencies, convert this table to an equivalent collection of tables that are in third normal form. Part (PartNum, Description, OnHand, Class, Warehouse, Price, (OrderNum, OrderDate, CustomerNum, CustomerName, RepNum, LastName, FirstName, NumOrdered, QuotedPrice)) 2. List the functional dependencies in the following table that concerns invoicing (an application Premiere Products is considering adding to its database), subject to the specified conditions. For a given invoice (identified by the InvoiceNum), there will be a single customer. The customer’s number, name, and complete address appear on the invoice, as does the date. Also, there may be several different parts appearing on the invoice. For each part that appears, display the part number, description, price, and number shipped. Each customer that orders a particular part pays the same price. Convert this table to an equivalent collection of tables that are in third normal form. Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State, Zip, Date, (PartNum, Description, Price, NumShipped)) 3. The requirements for Premiere Products...

Words: 351 - Pages: 2

Premium Essay

Sql Book

...Edition Philip J. Pratt, Mary Z. Last Vice President, Publisher: Jack Calhoun Editor-in-Chief: Alex von Rosenberg Senior Acquisitions Editor: Charles McCormick, Jr. Product Manager: Kate Hennessy Development Editor: Jessica Evans Editorial Assistant: Bryn Lathrop Marketing Director: Brian Joyner Marketing Manager: Bryant Chrzan Marketing Communications Manager: Libby Shipp Marketing Coordinator: Suellen Ruttkay Content Project Manager: Matt Hutchinson Art Director: Stacy Jenkins Shirley, Marissa Falco Cover Designer: Joseph Sherman Cover Image: Getty Images/Taxi/Chris Bell Manufacturing Coordinator: Denise Powers © 2009 Course Technology, Cengage Learning ALL RIGHTS RESERVED. No part of this work covered by the copyright hereon may be reproduced, transmitted, stored, or used in any form or by any means graphic, electronic, or mechanical, including but not limited to photocopying, recording, scanning, digitizing, taping, Web distribution, information networks, or information storage and retrieval systems, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the publisher. For product information and technology assistance, contact us at Cengage Learning Customer & Sales Support, 1-800-354-9706 For permission to use material from this text or product, submit all requests online at www.cengage.com/permissions Further permission questions can be emailed to permissionrequest@cengage.com ISBN-13: 978-0-324-59768-4...

Words: 48772 - Pages: 196

Free Essay

Lesson 3

...ITCS215: Lesson Three Worksheet | Student Name: Instructions: This worksheet will assist you in completing your assignments for this week. Save this worksheet as lastname_Lesson3.docx and submit. You are required to complete all sections indicated by red brackets. You will replace the red brackets and text with the indicated material. For example, for the “Student Name” section above, a completed response would look like this: Student Name: When responding with text, please leave the text red so that your instructor will be able to find your responses easily. When pasting an image, please replace the red text with the image. Total Points: 37 Assignments:     Review Questions - Short Answer   Short Answer - Review Questions, Chapter 6: Questions 1, 5, 7, and 15. Student is to complete in Short Answer format: a) Define the term user view as it applies to database design. Saved queries created with SQL. User views specify which users are permitted access to what data in a database. 5. Describe the function of each of the following types of keys: primary, alternate, secondary, and foreign. Primary Key: The primary key is a attribute or a set of attributes that uniquely identify specific instance of an entity. Every entity in the data model must have a primary key whose values uniquely identify instance of the entity. Sometimes a record may contain more than one key field. Primary key is selected from one of the candidate key and the...

Words: 1035 - Pages: 5

Premium Essay

Jva Corp

...Nike Basketball and Accessories Our Marketing plan is to sell Nike Basketballs, rims, nets, shirts, socks, shoes, and head bands. The main purpose is to promote the basketball and tell you why Nike is different from our competitors. A basketball is an inflated ball used in the game of basketball. Basketballs typically range in size from very small promotional items possibly only a few inches in diameter to extra large balls nearly a foot in diameter used in training exercises to increase the skill of players. The standard size of a basketball in the NBA is 29.5 inches in circumference. Nearly all basketballs have an inflatable inner rubber bladder, generally wrapped in layers of fiber and then covered with a tacky surface made either from leather (traditional), rubber, or a synthetic composite. As in most inflatable balls, there is a small opening to allow the pressure to be increased or decreased. The surface of the ball is nearly always divided by "ribs" that are recessed below the surface of the ball in a variety of configurations and are generally a contrasting color. An orange surface with black ribs and a possible logo is the traditional color scheme of basketballs but they are sold in various colors. Balls are generally designated for indoor (generally made of leather or absorbent composites), or all-surface use (generally made of rubber or durable composites, also known as Indoor/Outdoor balls). Indoor balls tend to be considerably more expensive than all-surface...

Words: 748 - Pages: 3

Premium Essay

Great Man

...Great-Man Theory Defining a Leader Omar Quesada Webber International University Introduction As I have read about it, a particular interest in my has been raising about the wonderful way many people has utilized their natural abilities as a medium of reunion and leadership. I found a string link between this gifts or skills these men had and their particular behavior in the time they lived. I would like to talk about the special characteristics that had to be present; more specific the building process of a divine individual, a prophet capable of guiding its people and the importance they have represented to humanity, whether realistic or not, since the theory has been around ever since. Great-Man Theory In order to get to know more about the theory of the great man, we should not ignore that this is a theory based on leadership. So, what is leadership? Scholars have defined leadership as “ the process of social influence in which one person can enlist the aid and support of others in the accomplishment of a common task”. To my personal beliefs, leadership is: a medium to an end, it is a very particular tool with which gifted individuals in the interpersonal field can either alone or together command, guide, and lead another group of people towards completing an established goal by cheering, supporting and setting a relation with the subordinates based on a strong dose of trustworthiness. Now, the Great-Man theory of leadership according to...

Words: 1762 - Pages: 8

Premium Essay

Final Strategic Plan

...Final Strategic Plan Many organizations try to cater to one aspect of a family like the children, parents, husband, or wife, depending on the product sold. It is not very often that an organization will attract an entire family. The company can be successful if the product marketed meets the needs of each member of the family. It can be difficult to identify a product that the entire family would like. This organization is named, “Family Activities Incorporated.” Family Activities Inc., is designed as a playful environment for the entire family. It includes video games, go-karts, inflatable play area for the younger patrons, a multi-media area with multiple televisions for sports entertainment and a snack shop. This is a one stop shop for a family’s entertainment needs. Families seem to live fast-paced lives because of the children’s activities such as sports, dance, drama, and along with other activities. The Family Activities center will be a place that will have an inviting atmosphere. The employees will make everyone think they are part of the family. Families will want to return to enjoy the activities for a reasonable cost. To achieve the environment for a family to partake in the organization and continue to return several items need to be taken into consideration. Those items consist of the mission and vision statements, the guiding principles, strategic direction, customer needs, technology, competitive analysis, opportunities, supply chain, financial...

Words: 3683 - Pages: 15

Free Essay

Eco 365

...Fine Foods (KFF) commits to provide its customers with the finest selection of foods and wines available on the market. The owner’s vision is to be the premiere gourmet grocery store for discerning shoppers seeking the best meats, produce, cheeses, and wines (Apollo Group, Inc., 2011). To further her mission and vision, owner Kathy Kudler formed the business within the monopolistic competition market structure, developed a marketing overview, and created market surveys to evaluate the business’s competitiveness in the marketplace. The monopolistic competition market structure includes many firms selling slightly differentiated products. There is an easy entry into the market by new firms in the long run, and the firms are large enough to influence the total supply. There are also multiple dimensions of competition including distribution outlets, advertising, and product attributes (Colander, 2010). The marginal cost will be less than price at its profit-maximizing output level. According to the text, a monopolistic competitor cannot make long-run profit (Colander, 2010). The benefits of the monopolistic competition market structure are the ability to act independently to adapt to changing economic forces and customer tastes to differentiate KFF’s from its competitors. KFF exercises monopolistic behavior through product differentiation and marketing strategies to gain competitive advantage. Additionally, collusion is unlikely to occur because of the difficulty of getting...

Words: 1291 - Pages: 6

Premium Essay

Differentiating Between Market Structures

...Foods Kudler Fine Foods is dedicated to providing quality products and services to its customers. The company operates three local upscale specialty food stores in the San Diego area. The company’s “vision is to be the premiere gourmet grocery store for those selective shoppers searching for the best meats, produce, cheeses, and wine” (Apollo, 2013, Strategic Plan, p. 3). Kudler has three stores in Southern California, and the owner Kathy Kudler considers the company as operating in an industry without direct competition (Apollo, 2013, Strategic Plan). This paper will attempt to address Kudler Fine Foods market structures, its competitive strategies, strengths, and weaknesses as well as provide some strategic competitive recommendations. Market Structure The monopolistic competitive market structure according to (Colander, 2010) includes several firms selling slightly different products. Kudler Fine Foods falls within this market structure. There is an easy entry into the market for new firms in the long-run, and these firms are large enough to influence total supply. The benefits of a monopolistic competitive market structure is the ability to act independently, and adapt to economic changes while meeting customer preferences, which differentiates the firm from its competitors. In other words Kudler Fine Foods exercises monopolistic competitive behavior through product differentiation, and marketing strategies to gain the competitive advantage...

Words: 1298 - Pages: 6

Premium Essay

Qnt-351

...approximately 8,000 square feet of retail space, each providing the same products. Kudler’s is more expensive than a traditional grocery store, but plan to service a more refined customer found in more upscale areas. They specialize in (All of which are special that Kudler’s uniquely provides): * Baked goods that are baked fresh daily using only organic ingredients. * Fresh produce, if they don’t have what you want they will order it with over 350 varieties. * Fresh meat and seafood (Organic only). The Pacific Ocean is nearby so why not take advantage of it. * Cheeses and dairy products, offering 250 varieties of cheeses (Weekend cheese tasting is planned for the future). * Wine, offering extensive collections of domestic and imported wines and have recently employs a wine steward in each of their three stores to assist customers with becoming better versed in wine tasting. Their mission is to “be the premiere gourmet grocery store for those savvy shoppers who are searching for the finest meats, produce, cheeses and wine” (Source: Kudler Virtual Organization). I conducted an extensive review of Kudler Fine Foods as presented in the virtual organization and I have the following observations. Kudler has been successful because they have identified the right location and the right product at the right time. They have found a niche market their products thrive in by offering high end grocery products that were not available to their customers anywhere...

Words: 1415 - Pages: 6

Premium Essay

Child Obesity

...Hargraves, Huxford, Kirby, Meneely, Mikel Professor Michael Begnal ENG 104 March 16, 2016 Kids These Days Childhood obesity plagues more children in America than ever before, and it continues to grow in number year by year. In order to avoid letting childhood obesity numbers continue to grow, there needs to be changes in certain aspects of children’s lifestyles. This increase over the years can be attributed to many factors including unhealthy, calorie-filled school lunches and children not receiving enough exercise. Childhood obesity poses a very real threat to the health of younger generations and can lead to dangerous, life-threatening health issues later in life. In the rise of child obesity, children are at more risk of diabetes and other heart diseases that could not only affect them in the short and long term. In response to this issue, child obesity should be combated by offering healthier choices for school lunches, and allowing a full hour for recess. All of these could be accomplished by allowing more funding from the Department of Education, and this would allow more funding to state educational funds. Decreasing child obesity would be important for children in the long run because it would decrease their chance of developing type-two diabetes and early heart diseases. Obesity is the root cause of countless diseases, conditions, and illnesses, some of which are even life-threatening. Adulthood obesity has been linked to many deadly diseases. Some examples include...

Words: 2169 - Pages: 9