Beginning SQL Server Modeling- P6
Số trang: 20
Loại file: pdf
Dung lượng: 971.69 KB
Lượt xem: 12
Lượt tải: 0
Xem trước 2 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Tham khảo tài liệu beginning sql server modeling- p6, công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả
Nội dung trích xuất từ tài liệu:
Beginning SQL Server Modeling- P6 CHAPTER 4 INTRODUCTION TO QUADRANT In this case, I’ll click the As Original option, and a check mark will appear next to the value in theOriginal column, indicating this is the selected value for resolving the conflict (see Figure 4-29).Figure 4-29. After selecting As Original to resolve the conflict The exclamation point (!) next to the Shock Absorbers entity has now changed to an asterisk (*), andif you close the Changes view, you will see the same indication in the CarComponents Explorer. The dataconflict has been resolved, but the change has not yet been committed. You can take this last step ofcommitting this change by using Ctrl+S or the File Save Changes menu option, which will make thedata consistent again. Finally, there can be situations where the local copy of the data can become stale becausesomething has changed in the database, but the local copy of the data hasn’t refreshed since thedatabase change. Suppose the suspension engineering team has decided to go with two shock absorbersper wheel rather than one, and they have just changed the Description value for Shock Absorbers to Twofor Each Wheel and the corresponding Quantity value from 4 to 8 in the database. This would mean thelocal copy of the data displayed by Quadrant is stale and no longer matches what is in the database.Figure 4-30 shows the resulting Quadrant view. 101 Download from Wow! eBook CHAPTER 4 INTRODUCTION TO QUADRANT Figure 4-30. Stale data in Quadrant after a recent change in the database This situation is resolved by simply refreshing the data from the data store using the F5 refresh key. Figure 4-31 shows the result. Figure 4-31. After using F5 to refresh stale data Using the Quadrant Explorer Query Bar The area immediately above the column titles and below the menu bar in the Explorer window is called the Query Bar. The default entry normally displayed in the Query Bar is the name of the extent, or table, that is displayed in the Explorer window; in the case of this example, it is Car.Model.CarComponents.102 Download from Wow! eBook CHAPTER 4 INTRODUCTION TO QUADRANTYou can enter any SQL query in this bar to filter what is being displayed in the Explorer pane. Forinstance, if you wanted to see the top-level subsystem in the model, you could enter the following queryin the Query Bar:Car.Model.CarComponents where value.PartOfComponent.Name == My Car The query is executed by pressing the Enter key with the cursor in the Query Bar. Figure 4-32 showsthe result of this query, which is exactly what you would expect: The query returns all of the top-levelsubsystems. SQL keywords such as where and value are automatically bolded as the query is entered.Figure 4-32. Using the Query Bar to find the top-level subsystems Another example of a query you could perform would be to find all subsystems that have a quantitygreater than 1. Figure 4-33 shows the results of such a query. To make the display more useful, you canclick the Quantity column label to sort by ascending or descending quantities, as indicated by an up ordown arrow to the right of the column label. 103 Download from Wow! eBook CHAPTER 4 INTRODUCTION TO QUADRANT Figure 4-33. Using the Query Bar to find the components with a quantity greater than 1 As a last example, you can add .Count to any query to return the number of records found by the query. This is useful with very large tables with hundreds or thousands of records. Figures 4-34 and 4-35 show two examples. Figure 4-34. Getting a count of records for a query Figure 4-35. Getting a count of all items in the extent104 Download from Wow! eBook CHAPTER 4 INTRODUCTION TO QUADRANT To return to the normal table display after executing a query, click on the title bar of the Query paneto make sure the pane is active, press the Esc key to restore the default query, and then press the Enterkey. If you are not using the Query Bar in an Explorer workpad, you can remove it by right-clicking thetitle bar of the workpad, and clicking the Query Bar option in the context menu.More on Customizing the View“Know Your Audience” is an important cr ...
Nội dung trích xuất từ tài liệu:
Beginning SQL Server Modeling- P6 CHAPTER 4 INTRODUCTION TO QUADRANT In this case, I’ll click the As Original option, and a check mark will appear next to the value in theOriginal column, indicating this is the selected value for resolving the conflict (see Figure 4-29).Figure 4-29. After selecting As Original to resolve the conflict The exclamation point (!) next to the Shock Absorbers entity has now changed to an asterisk (*), andif you close the Changes view, you will see the same indication in the CarComponents Explorer. The dataconflict has been resolved, but the change has not yet been committed. You can take this last step ofcommitting this change by using Ctrl+S or the File Save Changes menu option, which will make thedata consistent again. Finally, there can be situations where the local copy of the data can become stale becausesomething has changed in the database, but the local copy of the data hasn’t refreshed since thedatabase change. Suppose the suspension engineering team has decided to go with two shock absorbersper wheel rather than one, and they have just changed the Description value for Shock Absorbers to Twofor Each Wheel and the corresponding Quantity value from 4 to 8 in the database. This would mean thelocal copy of the data displayed by Quadrant is stale and no longer matches what is in the database.Figure 4-30 shows the resulting Quadrant view. 101 Download from Wow! eBook CHAPTER 4 INTRODUCTION TO QUADRANT Figure 4-30. Stale data in Quadrant after a recent change in the database This situation is resolved by simply refreshing the data from the data store using the F5 refresh key. Figure 4-31 shows the result. Figure 4-31. After using F5 to refresh stale data Using the Quadrant Explorer Query Bar The area immediately above the column titles and below the menu bar in the Explorer window is called the Query Bar. The default entry normally displayed in the Query Bar is the name of the extent, or table, that is displayed in the Explorer window; in the case of this example, it is Car.Model.CarComponents.102 Download from Wow! eBook CHAPTER 4 INTRODUCTION TO QUADRANTYou can enter any SQL query in this bar to filter what is being displayed in the Explorer pane. Forinstance, if you wanted to see the top-level subsystem in the model, you could enter the following queryin the Query Bar:Car.Model.CarComponents where value.PartOfComponent.Name == My Car The query is executed by pressing the Enter key with the cursor in the Query Bar. Figure 4-32 showsthe result of this query, which is exactly what you would expect: The query returns all of the top-levelsubsystems. SQL keywords such as where and value are automatically bolded as the query is entered.Figure 4-32. Using the Query Bar to find the top-level subsystems Another example of a query you could perform would be to find all subsystems that have a quantitygreater than 1. Figure 4-33 shows the results of such a query. To make the display more useful, you canclick the Quantity column label to sort by ascending or descending quantities, as indicated by an up ordown arrow to the right of the column label. 103 Download from Wow! eBook CHAPTER 4 INTRODUCTION TO QUADRANT Figure 4-33. Using the Query Bar to find the components with a quantity greater than 1 As a last example, you can add .Count to any query to return the number of records found by the query. This is useful with very large tables with hundreds or thousands of records. Figures 4-34 and 4-35 show two examples. Figure 4-34. Getting a count of records for a query Figure 4-35. Getting a count of all items in the extent104 Download from Wow! eBook CHAPTER 4 INTRODUCTION TO QUADRANT To return to the normal table display after executing a query, click on the title bar of the Query paneto make sure the pane is active, press the Esc key to restore the default query, and then press the Enterkey. If you are not using the Query Bar in an Explorer workpad, you can remove it by right-clicking thetitle bar of the workpad, and clicking the Query Bar option in the context menu.More on Customizing the View“Know Your Audience” is an important cr ...
Tìm kiếm theo từ khóa liên quan:
thủ thuật máy tính công nghệ thông tin tin học quản trị mạng computer networkTài liệu liên quan:
-
52 trang 432 1 0
-
24 trang 358 1 0
-
Top 10 mẹo 'đơn giản nhưng hữu ích' trong nhiếp ảnh
11 trang 319 0 0 -
Làm việc với Read Only Domain Controllers
20 trang 307 0 0 -
74 trang 303 0 0
-
96 trang 297 0 0
-
Báo cáo thực tập thực tế: Nghiên cứu và xây dựng website bằng Wordpress
24 trang 291 0 0 -
Đồ án tốt nghiệp: Xây dựng ứng dụng di động android quản lý khách hàng cắt tóc
81 trang 284 0 0 -
EBay - Internet và câu chuyện thần kỳ: Phần 1
143 trang 277 0 0 -
Tài liệu dạy học môn Tin học trong chương trình đào tạo trình độ cao đẳng
348 trang 269 1 0