Premiere Products Exercise for Relational Algebra

In: Computers and Technology

Submitted By klutzyninja
Words 352
Pages 2
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 whose rep number is 20.
SELECT Orders WHERE OrderDate= ‘10/20/2010’
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
INTERSECT Temp2 WITH Temp5
GIVING Answer

7. List…...

Similar Documents

Relational Algebra

...The relational algebra is a theoretical language with operations that work on one or more relations to define another relation without changing the original relation. Thus, both the operands and the results are relations; hence the output from one operation can become the input to another operation. This allows expressions to be nested in the relational algebra. This property is called closure. Relational algebra is an abstract language, which means that the queries formulated in relational algebra are not intended to be executed on a computer. Relational algebra consists of group of relational operators that can be used to manipulate relations to obtain a desired result. Knowledge about relational algebra allows us to understand query execution and optimization in relational database management system. Role of Relational Algebra in DBMS Knowledge about relational algebra allows us to understand query execution and optimization in relational database management system. The role of relational algebra in DBMS is shown in Fig. 3.1. From the figure it is evident that when a SQL query has to be converted into an executable code, first it has to be parsed to a valid relational algebraic expression, then there should be a proper query execution plan to speed up the data retrieval. The query execution plan is given by query optimizer. Relational Algebra Operations Operations in relational algebra can be broadly classified into set operation and database......

Words: 344 - Pages: 2

Algebra

...Preparation of income statement, balance sheet and statement of cash flows: Accounting for specialized items: Property, Plant & Equipment, bad debts; provisions; financial instruments; leases; employee benefits; income taxes; revenues,; foreign currency transactions etc.;Accounting for mergers and consolidations; IFRS vs GAAP; Financial statement analysis 3. Cost and Management Accounting: Cost concepts; Job-order costing vs process costing;ABC Costing; Marginal costing vs absorption costing: CVP analysis; Relevant costs: special order, make or buy decisions; ROA, residual income and economic value added; Standard costing and variance analysis; EOQ and linear programming 4. Quantitative Methods and Business Mathematics: Algebra and logarithm; Series and progressions; Probability, confidence intervals and testing; Measures of central tendency and measures of dispersion; Simple and compound interest: compounding and discounting;Differentiation and integration; Regression and correlation 5. Business Management: Vision, mission and strategy; Human resource management : recruitment and retention, performance measurement and development, compensation, employee rations and ethics etc.; Marketing; Organizational culture, organizational change and effective communication; Business analyses: SWOT, PESTLE, balanced scorecard 6. Microsoft Excel 2003/2007/2010: Financial Model Development; Visual Basic for Application(VBA) development, Lookup; Solver;......

Words: 764 - Pages: 4

Relational Algebra

...Edited by Foxit PDF Editor Copyright dddddd (c) by Foxit Software Company, 2004 For Evaluation Only. Edited by Foxit PDF Editor Copyright (c) by Foxit Software Company, 2004 For Evaluation Only. Computer Science Volume 1 Silberschatz−Korth−Sudarshan • Database System Concepts, Fourth Edition Front Matter 1 1 11 11 35 35 36 87 140 140 141 194 229 260 307 307 308 337 363 393 393 394 446 494 529 563 563 564 590 637 Preface 1. Introduction Text I. Data Models Introduction 2. Entity−Relationship Model 3. Relational Model II. Relational Databases Introduction 4. SQL 5. Other Relational Languages 6. Integrity and Security 7. Relational−Database Design III. Object−Based Databases and XML Introduction 8. Object−Oriented Databases 9. Object−Relational Databases 10. XML IV. Data Storage and Querying Introduction 11. Storage and File Structure 12. Indexing and Hashing 13. Query Processing 14. Query Optimization V. Transaction Management Introduction 15. Transactions 16. Concurrency Control 17. Recovery System iii VI. Database System Architecture 679 679 680 705 750 773 773 774 810 856 884 Introduction 18. Database System Architecture 19. Distributed Databases 20. Parallel Databases VII. Other Topics Introduction 21. Application Development and Administration 22. Advanced Querying and Information Retrieval 23. Advanced Data Types and New Applications 24. Advanced Transaction Processing iv Silberschatz−Korth−Sudarshan:......

Words: 301237 - Pages: 1205

The Study of Relational Analysis of Brand Image、Brand Personality、Brand Attitude、Brand Preference and Sports Product Purchase Intention

...運動傳播學刊 第三期 品牌形象、品牌個性、品牌態度、品牌偏好與運動商品購買一圖關係之研究 品牌形象、品牌個性、品牌態度、 第 130-148 頁 I S S N:2 0 7 1 - 3 6 0 6 N: 品牌形象、品牌個性、品牌態度、品牌偏好與運動商品購買意圖 關係之研究 The study of relational analysis of Brand Image、Brand Personality、Brand Attitude、Brand Preference and Sports Product Purchase Intention 黃少章 / 國立臺灣師範大學 Haung Shau Chang / National Taiwan Normal University 真理大學運動知識學院 運動傳播學刊 第三期 抽印本 中華民國 九十九 年 八 月 一 日 第三期 運動傳播學刊 第三期 品牌形象、品牌個性、品牌態度、品牌偏好與運動商品購買一圖關係之研究 品牌形象、品牌個性、品牌態度、 第 130-148 頁 I S S N:2 0 7 1 - 3 6 0 6 N: 品牌形象、品牌個性、品牌態度、品牌偏好與運動商品購買意圖 關係之研究 黃少章 / 國立臺灣師範大學 摘要 品牌經營對頂尖的企業而言是關鍵要素之一,對企業而言,有雄厚品牌資 產是影響消費者行為重要的指標。本研究旨在暸解品牌形象、品牌個性、品牌 態度、品牌偏好與消費者購買意圖之影響。研究對象為臺北市立松山工農 157 個學生,以「品牌形象、品牌個性、品牌態度與品牌偏好與購買意圖調查問卷」 為研究工具以了解消費者的消費者對品牌的知覺。資料分析以 PASW 18.0 for windows 統計軟體分析,以相關分析及路徑分析為研究方法,得到的結果發現: 一、品牌形象、品牌個性、品牌態度、品牌偏好與購買意圖之間有高度相關性, 特別在品牌形象與品牌個性間有很高的相關性很高,顯示品牌個性會受到品 牌形象的影響;其次為品牌個性與品牌態度之相關。至於影響購買意圖相關 性最高的則是品牌態度。 二、品牌形象、品牌個性、品牌態度、品牌偏好對購買意圖路徑模式的結果可 發現,品牌形象、品牌個性、品牌態度、品牌偏好對購買意圖的迴歸模型達 顯著;品牌態度對品牌偏好的迴歸模型達顯著;品牌形象、品牌個性與品牌 態度間之迴歸模型亦達顯著,而品牌態度在品牌形象、品牌個性與品牌偏好 間,有良好的中介效果。 關鍵字:品牌形象、品牌個性、品牌態度、品牌偏好、購買意圖 130 第三期 運動傳播學刊 第三期 品牌形象、品牌個性、品牌態度、品牌偏好與運動商品購買一圖關係之研究 品牌形象、品牌個性、品牌態度、 第 130-148 頁 I S S N:2 0 7 1 - 3 6 0 6 N: The study of relational analysis of Brand Image、Brand Personality、Brand Attitude、Brand Preference and Sports Product Purchase Intention Shau-Chang Haung / National Taiwan Normal University. ABSTRACT Brand management is one of the important key factors for a top......

Words: 1376 - Pages: 6

Algebra

... bi. Constant - a number with no variable attached to it. Constant of proportionality - real number that describes either direct or indirect variation. Coordinate - part of an ordered pair that designates a points location on a coordinate plane. Coordinate pair - The point (x,y) used to descibe a locatio in the coordinate plane. Coordinate plane - grid used to visualize mathematical graphs. Cramers rule - technique used to solve systems of equations using determinants of matrices. Critical numbers - the values of x for which an expression equals 0 or is undefined. Cross multiplication - method of solving proportions in which you multiply the numerator of one fraction by the denominator of the other and set those products equal. Cube root - a radical whose index is 3. Cubic - adjective that descibes an expression in which the highest power is three. Decimal - fraction with an unwritten denominator of 10 indicated by the decimal point./ adjective describing the number system that is organized in increments of ten. Degree - the largest exponent in a polynomial. Degree of an angle - number of degrees between 1 and 360 that comprise the measure of an angle. Degree of an expression - highest power occurring in the expression. Denominator - the bottom number in a fraction. Dependant - describes a system of equations with an infinite number of solutions. Determinant (of a matrix) - real number value defined for square matrices only. ...

Words: 3052 - Pages: 13

Algebra

...SUBDOMAIN 212.1 - NUMERACY, ALGEBRA, & GEOMETRY Competency 212.1.2: Solving Algebraic Equations - The graduate solves algebraic equations and constructs equations to solve real-world problems. Introduction: An important element of learning is to connect mathematical concepts with physical concepts. Graphical representations of mathematical functions will allow you to visualize the meaning and power of mathematical equations. The power of computer programs and graphing calculators provide a more thorough connection between algebraic equations and visual representation, which will increase appreciation and understanding of mathematical language. In this task, you will be making connections between algebraic equations and graphical representations. You will use the following situation to complete your task: A man shines a laser beam from a third-story window of a building onto the pavement below. The path of the laser beam is represented by the equation y = –(2/3)x + 30. In this problem, y represents the height above the ground, and x represents the distance from the face of the building. All height and distance measurements are in feet. Task: A. Use the situation above to complete parts A1 through A5. 1. Find the x-intercept and y-intercept of the given equation algebraically, showing all work. 2. Graph the given equation. • Label each axis of the coordinate plane with descriptive labels. • Label each intercept as “x-intercept” or “y-intercept” and include the ordered pair. 3.......

Words: 521 - Pages: 3

Relational Databases

...Relational Databases Jason A. Mizener Professor Merkel Intro to Information Technology 17 August 2014 Relational Databases As technology as grown throughout the years, so has the information it utilizes. Early on databases were organized through the hierarchical model, which was the earliest representation of the parent-child structure (each parent can have multiple children, but each child can only have one parent). Shortly thereafter the network database model was incorporated to more effectively represent complex data relationships. Large amounts of data became better organized, which improved database performance. Additionally, the parent-child structure was improved to where children could now have multiple parents. Despite these advances, databases continued to grow increasingly cumbersome and complex, and further advances were necessary to keep everything manageable. The relational database, designed in 1970 by E. F. Codd, represented a major breakthrough in database technology for both designers and users alike. The relational model is very simple, yet very effective in concept. As strange as it may be to think, the relational database pioneered the concept of using tables to hold and organize data. An Excel spreadsheet is probably the most obvious example of a relational database that the end user can relate to today. Essentially, a relational database is the logical view, rather than the physical view, of information. (Carlos Coronel,......

Words: 1200 - Pages: 5

Dsin Assingment 2 Premiere Products Exercises

...Premiere Products Exercises: QBE 1. List the number and name of all customers. |Customer Number |Customer Name | |148 |Al’s Appliance and Sport | |282 |Brookings Direct | |356 |Ferguson’s | |408 |The Everything Shop | |462 |Bargains Galore | |524 |Kline’s | |608 |Johnson’s Department Store | |687 |Lee’s Sport and Appliance | |725 |Deerfield’s Four Seasons | |842 |All Season | 2. List the complete Part......

Words: 813 - Pages: 4

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......

Words: 340 - Pages: 2

Algebra

...Name: Taylor Harmon_________________________ Score: ______ / ______ Pre-Algebra Midterm Exam Solve the problems below. Show your work when applicable. 1. Write using exponents. (–4)(–4) -4^2 2. Simplify. Show your work. 513 +-3918 5x3+1/3 + -3 9/18 16/3 + -3 9/18 16/3 + -3 ½ 16/3 – 3x2+1/2 16/3 – 7/2 Least common denominator found is 6 16x2/3x2 – 7x3/2x3 32/6 – 21/6 = 11/6 11/6 = 1 5/6 3. What type of measurement would you use to describe the amount of water a pot can hold? Volume – gallons, liters 4. Estimate the sum of 9.327 + 5.72 + 4.132 to one decimal place. 19.2 5. State whether the number 91 is prime, composite, or neither. Composite. It can be divided by 7 or 13 6. What are the mean and the mode of the following set of data: 5, 12, 1, 5, 7 mean: 6 mode: 5 7. To measure the distance from the U.S. to Istanbul, Turkey you would most likely use __________. miles 8. What percent of 67 is 33? Round to the nearest tenth of a percent. 49.3% 9. An adult house cat could be about 1 ___________ high. foot 10. Write a number sentence for the model. Let one white tile equal +1 and one black tile equal –1. There are -14 black tiles and 6 of them become white tiles. -14+6=-8 11. Determine whether the statement is true or false. 94 is divisible by 3. false 12. State whether the number 97 is prime, composite, or neither. prime 13.......

Words: 389 - Pages: 2

Premiere Products Exercises

...key of the Part table. 7. Add a field named Allocation to the Part table. The allocation is a number representing the number of units of each part that have been allocated to each customer. Set all Allocation values to zero. Calculate the number of units of part number KV29 currently on order. Change the Allocation value for part number KV29 to this number. Display all the data in the Part table. 8. Increase the length of the Warehouse field in the Part table to two characters. Change the warehouse number for warehouse 1 to 1a. Display all the data in the Part table. 9. Delete the Allocation field from the Part table. Display all the data in the Part table. 10. What command would you use to delete the Part table from the Premiere Products database? (Do not delete the Part table.) DROP TABLE Part 11. Write a stored procedure that will change the price of a part with a given part number. How would you use this stored procedure to change the price of part AT94 to $26.95? CALL Change _Price (‘AT94’, 26.95) 12. Write the code for the following triggers following the style shown in the text. a. When adding a customer, add the customer's balance times the sales rep's commission rate to the commission for the corresponding sales rep. b. When updating a customer, add the difference between the new balance and the old balance multiplied by the sales rep's commission rate to the commission for the corresponding sales rep. c. When deleting a customer, subtract the......

Words: 750 - Pages: 3

Algebra

...What is Algebra? Algebra is a branch of mathematics that uses mathematical statements to describe relationships between things that vary over time. These variables include things like the relationship between supply of an object and its price. When we use a mathematical statement to describe a relationship, we often use letters to represent the quantity that varies, sisnce it is not a fixed amount. These letters and symbols are referred to as variables. (See the Appendix One for a brief review of constants and variables.) The mathematical statements that describe relationships are expressed using algebraic terms, expressions, or equations (mathematical statements containing letters or symbols to represent numbers). Before we use algebra to find information about these kinds of relationships, it is important to first cover some basic terminology. In this unit we will first define terms, expressions, and equations. In the remaining units in this book we will review how to work with algebraic expressions, solve equations, and how to construct algebraic equations that describe a relationship. We will also introduce the notation used in algebra as we move through this unit. History of algebra The history of algebra began in ancient Egypt and Babylon, where people learned to solve linear (ax = b) and quadratic (ax2 + bx = c) equations, as well as indeterminate equations such as x2 + y2 = z2, whereby several unknowns are involved. The ancient Babylonians solved......

Words: 1079 - Pages: 5

Chp 1 Premiere Products

...Answer each of the following questions using the Premiere Products data shown in Figure 1-5. No computer work is required. 1. List the names of all customers that have a credit limit less than $10,000. Al’s Appliance and Sport | Ferguson’s | The Everything Shop | Lee’s Sport and Appliance | Deerfield’s Four Seasons | All Season | 2. List the descriptions of all parts in item class AP and located in warehouse number 3. Microwave Oven | Gas Range | Washer | Dryer | Dishwasher | 3. List the order numbers for orders placed by customer number 608 on October 23, 2013. 21617 | 21623 | 4. List the part number, part description, and on-hand value (OnHand * Price) for each part in item class SG. PartNum | Description | OnHand | Price | OnHand Value | BV06 | Home Gym | 45 | 794.95 | 35,772.75 | KV29 | Treadmill | 9 | 1,390.00 | 12,510.00 | 5. List the name of each customer that placed an order for two different parts in the same order. Ferguson’s | Johnson’s Department Store | 6. List the name of each customer that has a credit limit of $5,000 and is represented by Richard Hull. The Everything Shop | Lee’s Sport and Appliance | 7. Find the sum of the balances for all customers represented by Juan Perez. 5,785.00 | 3,412.00 | 2,106.00 | 11,303.00 | 8. For each order, list the order number, order date, customer number, and customer name. 21608 | 10/20/2013 | 148 | Al’s Appliance and Sport | 21610 |...

Words: 361 - Pages: 2

Algebra Syllabus

... |Algebra 1B | Copyright © 2010, 2009, 2007 by University of Phoenix. All rights reserved. Course Description This course explores advanced algebra concepts and assists in building the algebraic and problem-solving skills developed in Algebra 1A. Students solve polynomials, quadratic equations, rational equations, and radical equations. These concepts and skills serve as a foundation for subsequent business coursework. Applications to real-world problems are also explored throughout the course. This course is the second half of the college algebra sequence, which began with MAT/116, Algebra 1A. Policies Faculty and students/learners will be held responsible for understanding and adhering to all policies contained within the following two documents: • University policies: You must be logged into the student website to view this document. • Instructor policies: This document is posted in the Course Materials forum. University policies are subject to change. Be sure to read the policies at the beginning of each class. Policies may be slightly different depending on the modality in which you attend class. If you have recently changed modalities, read the policies governing your current class modality. Course Materials Bittenger, M. L. & Beecher, J. A. (2007). Introductory and intermediate algebra (3rd ed.). Boston, MA: Pearson-Addison......

Words: 2141 - Pages: 9

Algebra

...7.0208 6.2911 5.8357 6.00 19.3328 11.1021 8.4386 7.1643 6.4430 5.9955 Your assignment must follow these formatting requirements: Be typed, double spaced, using Times New Roman font (size 12), with one-inch margins on all sides. Check with your professor for any additional instructions. Include a cover page containing the tile of the assignment, the student’s name, the professor’s name, the course title, and the date. The cover page is not included in the required assignment page length. The specific course learning outcomes associated with this assignment are: Apply finance formulas and logarithms to amortize loans and calculate interest. Use technology and information resources to research issues in algebra. Write clearly and concisely about algebra using proper writing mechanics....

Words: 643 - Pages: 3