What does KED stand for? List of 38 KED definitions. Updated June 2020. Top KED abbreviation meaning: Kriging with External Drift. A new artificial pancreas system, which monitors and regulates blood glucose levels, proved safe and effective in young children with type 1 diabetes. The system may improve quality of life and disease outcomes for kids with diabetes.
Introduction
This is a short guide to using the text editor called “KED” in RT-11 on the PDP-11.
KED is a full-screen editor that comes with RT-11. It is intended to be used with a VT100 or later model DEC serial terminal. A similar editor called K52 is for use with VT52 and VT55 terminals.
For the sake of simplifying this guide, I am going to be focussing on VT100 (and VT100 compatible) terminals. So I will not be discussing the differences between K52 and KED here.
My main interest in KED is using it to create and edit PDP-11 assembly language source code files and plain-text files, both on real VT100 terminals, and on a PC-keyboard under SIMH.
Starting KED
There are several ways to start KED (KED.SAV) and load your existing text file (or create a new text file).
The method I prefer is to type “KED [filename] <CR>” at the RT-11 prompt.
If the file does not exist, you will be asked to confirm that it should be created.
Here is an example of starting KED and creating a new file:
KED will then start and your file will be displayed. If you are creating a new file, the screen will be blank except for a flashing cursor in the top left corner.
VT100 Keyboard
KED relies heavily on special functions that are accessible only via the terminal’s numeric keypad. So getting familiar with the numeric keypad, and the commands that are accessible via the numeric keypad, is a necessary first step to editing and saving files.
The KED numeric keyboard configuration for the VT100 is shown to the right. Click on the picture, to see a larger version of it.
The text at the lower-right corner of the key shows the key name.
Keys PF1 and PF2 have a special purpose. PF1 is the “Gold” key, and PF2 is the “Help” key.
All other keys have two functions. The text on the top row of the key shows the function that the key will perform if pressed alone. The text on the bottom row shows the function that the key will perform if the PF1 (“Gold”) key is pressed first. It may be helpful to think of PF1 as being a “Shift” key for the numeric keypad.
PuTTY Keyboard
I use PuTTY as a VT100 emulator on the PC when running RT-11 under SIMH.
Configuring PuTTY to work properly as a VT100 emulator and to talk to SIMH involves a few steps. I will sometime put together a separate How-to Guide for that. But just be aware that if the display or keyboard are not responding under KED as expected, you may need to change some configuration settings in PuTTY. This is necessary sometimes to enable the PC’s numeric keypad to emulate the VT100 keypad, and for the VT100’s escape codes (sent to the display) and text scrolling to work properly.
In particular, your .INI file in SIMH will need to include the following lines>
You should also look the terminal size (in PuTTY) to 24 lines of 80 characters. Otherwise you will get odd behaviour when scrolling up or down.
One thing to be aware of: For the PC’s numeric keypad to function correctly in KED under PuTTY, you will need to go into PUTTY’s Change Settings ->Terminal ->Features panel and check that “Disable application keypad mode” is unticked. If it is ticked, the keypad will return the ASCII code corresponding to the numeric key pressed (such as 0x37 for the ‘7’ key) rather than the special sequence that signifies a numeric key press. The result will be that you won’t be able to access any of the KED numeric keyboard functions (such as GOLD -> 7, which is necessary to enter a Command, such as EXIT, SAVE or QUIT).
Once PuTTY and SIMH are configured, you will notice the following differences when attempting to use the PC’s keyboard to emulate a VT100 keyboard:
- The top row of the PC’s numeric keypad (Numlock, /, * and -) does not emulate the top row of the VT100 numeric keypad. Ignore the top row on the PC. You won’t need it.
- The first four function keys on the PC (F1, F2, F3 and F4) are instead used to emulate the top row of the VT100 numeric keypad. Of these, the two you will use the most are F1 (equals the PF1 “Gold” key) and F2 (equals the PF2 “Help” key).
- The PC’s numeric keypad has a large (double-size) “+” key above the Enter key. This emulates the DELCHAR/UNDELCHAR key in KED (marked as a comma key on the VT100). Because of the size of this key on the PC, there is no DELWORD/UNDELWORD KED key on the PC (this is the minus key on the VT100).
Functions and Commands
KED is a fairly powerful editor. It can (for example) perform search-and-replace and cut-and-paste operations. However, this How-to Guide is only concerned with using KED for the simplest operations. You’ll need to consult the KED documentation for information about its more advanced commands.
Here is a list of the basic functions and commands that are useful when getting started with KED:
Function or Command | Real VT100 | PuTTY in VT100 mode |
---|---|---|
Move cursor within file | Arrow keys | Arrow keys |
Move to top of file | PF1-5 | F1-5 |
Move to bottom of file | PF1-4 | F1-4 |
Delete character to left of cursor | Delete (on main keyboard) | Backspace (on main keyboard) |
Delete character under cursor | DELCHAR | + |
Delete to end of line | PF1-2 | F1-2 |
Paste last deleted character | PF1-UNDELCHAR | F1 then + |
Advance forwards through file | 4 | 4 |
Backup through file | 5 | 5 |
Advance/Backup by one character | 3 | 3 |
Advance/Backup by one word | 1 | 1 |
Advance/Backup to end of line | 2 | 2 |
Advance/Backup by one “section” | 8 | 8 |
Update the display | CTRL-W | CTRL-W |
Save file and exit | PF1-7-EXIT-ENTER | F1-7-EXIT-ENTER |
Abandon changes and exit | PF1-7-QUIT-ENTER | F1-7-QUIT-ENTER |
A few things to note about the table above:
- Text in italics represents text that needs to be typed on the main keyboard. All other text represents the key of that name (usually on the numeric keypad).
- ENTER means the Enter key on the numeric keyboard (the Return key on the main keyboard is not an acceptable alternative).
- By default a “section” is 16 lines, but this can be changed.
- On a real VT100, the DELCHAR/UNDELCHAR key is the comma key on the numeric keypad. It is immediately above the Enter key.
A concise summary of major KED commands can be found in Chapter 1 of the RT-11 Quick Reference Manual (DEC Order Number AA-M241D-TC). See the links section below for access to the full document. Alternatively, click here to access a local copy of Chapter 1.
Brief guide to compiling PDP-11 assembly-language programs
Source files have the suffix “.MAC”.
To compile the source file MYFILE.MAC:
To link the resulting object file:
To run the resulting executable file:
Revision History
16 September 2015:
- Posted initial version
22 December 2015:
- Added link to the RT-11 Quick Reference Manual, and a local copy of Chapter 1
- Explained the significance of the PuTTY “Disable application keypad mode” setting
30 July 2016:
- Ported this page across to WordPress. Made formatting changes to suit.
5 June 2017: This is the police 2 1 0 6.
- Updated the “PuTTY Keyboard” section to include some speicifc information about configuring PuTTY and configuring the SIMH .INI file.
- Added the new section titled “Brief guide to compiling PDP-11 assembly-language programs”.
Links
Dimensions in data management and data warehousing contain relatively static data about such entities as geographical locations, customers, or products. Data captured by Slowly Changing Dimensions (SCDs) change slowly but unpredictably, rather than according to a regular schedule.[1]
Some scenarios can cause referential integrity problems.
For example, a database may contain a fact table that stores sales records. This fact table would be linked to dimensions by means of foreign keys. One of these dimensions may contain data about the company's salespeople: e.g., the regional offices in which they work. However, the salespeople are sometimes transferred from one regional office to another. For historical sales reporting purposes it may be necessary to keep a record of the fact that a particular sales person had been assigned to a particular regional office at an earlier date, whereas that sales person is now assigned to a different regional office.[clarification needed]
Dealing with these issues involves SCD management methodologies referred to as Type 0 through 6. Type 6 SCDs are also sometimes called Hybrid SCDs.
Type 0: retain original[edit]
The Type 0 dimension attributes never change and are assigned to attributes that have durable values or are described as 'Original'. Examples: Date of Birth, Original Credit Score. Type 0 applies to most Date Dimension attributes.[2]
Type 1: overwrite[edit]
This method overwrites old with new data, and therefore does not track historical data.
Example of a supplier table:
Supplier_Key | Supplier_Code | Supplier_Name | Supplier_State |
---|---|---|---|
123 | ABC | Acme Supply Co | CA |
In the above example, Supplier_Code is the natural key and Supplier_Key is a surrogate key. Technically, the surrogate key is not necessary, since the row will be unique by the natural key (Supplier_Code).
If the supplier relocates the headquarters to Illinois the record would be overwritten:
Supplier_Key | Supplier_Code | Supplier_Name | Supplier_State |
---|---|---|---|
123 | ABC | Acme Supply Co | IL |
The disadvantage of the Type 1 method is that there is no history in the data warehouse. It has the advantage however that it's easy to maintain.
If one has calculated an aggregate table summarizing facts by state, it will need to be recalculated when the Supplier_State is changed.[1]
Type 2: add new row[edit]
This method tracks historical data by creating multiple records for a given natural key in the dimensional tables with separate surrogate keys and/or different version numbers. Unlimited history is preserved for each insert.
For example, if the supplier relocates to Illinois the version numbers will be incremented sequentially:
Supplier_Key | Supplier_Code | Supplier_Name | Supplier_State | Version |
---|---|---|---|---|
123 | ABC | Acme Supply Co | CA | 0 |
124 | ABC | Acme Supply Co | IL | 1 |
Another method is to add 'effective date' columns.
Supplier_Key | Supplier_Code | Supplier_Name | Supplier_State | Start_Date | End_Date |
---|---|---|---|---|---|
123 | ABC | Acme Supply Co | CA | 2000-01-01T00:00:00 | 2004-12-22T00:00:00 |
124 | ABC | Acme Supply Co | IL | 2004-12-22T00:00:00 | NULL |
The Start date/time of the second row is equal to the End date/time of the previous row. The null End_Date in row two indicates the current tuple version. A standardized surrogate high date (e.g. 9999-12-31) may instead be used as an end date, so that the field can be included in an index, and so that null-value substitution is not required when querying.
And a third method uses an effective date and a current flag.
Supplier_Key | Supplier_Code | Supplier_Name | Supplier_State | Effective_Date | Current_Flag |
---|---|---|---|---|---|
123 | ABC | Acme Supply Co | CA | 2000-01-01T00:00:00 | N |
124 | ABC | Acme Supply Co | IL | 2004-12-22T00:00:00 | Y |
The Current_Flag value of 'Y' indicates the current tuple version.
Transactions that reference a particular surrogate key (Supplier_Key) are then permanently bound to the time slices defined by that row of the slowly changing dimension table. An aggregate table summarizing facts by state continues to reflect the historical state, i.e. the state the supplier was in at the time of the transaction; no update is needed. To reference the entity via the natural key, it is necessary to remove the unique constraint making Referential integrity by DBMS impossible.
If there are retroactive changes made to the contents of the dimension, or if new attributes are added to the dimension (for example a Sales_Rep column) which have different effective dates from those already defined, then this can result in the existing transactions needing to be updated to reflect the new situation. This can be an expensive database operation, so Type 2 SCDs are not a good choice if the dimensional model is subject to frequent change.[1]
Type 3: add new attribute[edit]
This method tracks changes using separate columns and preserves limited history. The Type 3 preserves limited history as it is limited to the number of columns designated for storing historical data. The original table structure in Type 1 and Type 2 is the same but Type 3 adds additional columns. In the following example, an additional column has been added to the table to record the supplier's original state - only the previous history is stored.
Supplier_Key | Supplier_Code | Supplier_Name | Original_Supplier_State | Effective_Date | Current_Supplier_State |
---|---|---|---|---|---|
123 | ABC | Acme Supply Co | CA | 2004-12-22T00:00:00 | IL |
This record contains a column for the original state and current state—cannot track the changes if the supplier relocates a second time.
One variation of this is to create the field Previous_Supplier_State instead of Original_Supplier_State which would track only the most recent historical change.[1]
Type 4: add history table[edit]
The Type 4 method is usually referred to as using 'history tables', where one table keeps the current data, and an additional table is used to keep a record of some or all changes. Both the surrogate keys are referenced in the Fact table to enhance query performance.
For the above example, the original table name is Supplier and the history table is Supplier_History.
Supplier_key | Supplier_Code | Supplier_Name | Supplier_State |
---|---|---|---|
124 | ABC | Acme & Johnson Supply Co | IL |
Supplier_key | Supplier_Code | Supplier_Name | Supplier_State | Create_Date |
---|---|---|---|---|
123 | ABC | Acme Supply Co | CA | 2003-06-14T00:00:00 |
124 | ABC | Acme & Johnson Supply Co | IL | 2004-12-22T00:00:00 |
This method resembles how database audit tables and change data capture techniques function.
Type 5[edit]
The type 5 technique builds on the type 4 mini-dimension by embedding a “current profile” mini-dimension key in the base dimension that’s overwritten as a type 1 attribute. This approach, called type 5 because 4 + 1 equals 5, allows the currently-assigned mini-dimension attribute values to be accessed along with the base dimension’s others without linking through a fact table. Logically, we typically represent the base dimension and current mini-dimension profile outrigger as a single table in the presentation layer. The outrigger attributes should have distinct column names, like “Current Income Level,” to differentiate them from attributes in the mini-dimension linked to the fact table. The ETL team must update/overwrite the type 1 mini-dimension reference whenever the current mini-dimension changes over time. If the outrigger approach does not deliver satisfactory query performance, then the mini-dimension attributes could be physically embedded (and updated) in the base dimension.[3]
Type 6: combined approach[edit]
Uselessxray 1 1 0
The Type 6 method combines the approaches of types 1, 2 and 3 (1 + 2 + 3 = 6). One possible explanation of the origin of the term was that it was coined by Ralph Kimball during a conversation with Stephen Pace from Kalido[citation needed]. Ralph Kimball calls this method 'Unpredictable Changes with Single-Version Overlay' in The Data Warehouse Toolkit.[1]
The Supplier table starts out with one record for our example supplier:
Supplier_Key | Row_Key | Supplier_Code | Supplier_Name | Current_State | Historical_State | Start_Date | End_Date | Current_Flag |
---|---|---|---|---|---|---|---|---|
123 | 1 | ABC | Acme Supply Co | CA | CA | 2000-01-01T00:00:00 | 9999-12-31T23:59:59 | Y |
The Current_State and the Historical_State are the same. The optional Current_Flag attribute indicates that this is the current or most recent record for this supplier.
When Acme Supply Company moves to Illinois, we add a new record, as in Type 2 processing, however a row key is included to ensure we have a unique key for each row:
Supplier_Key | Row_Key | Supplier_Code | Supplier_Name | Current_State | Historical_State | Start_Date | End_Date | Current_Flag |
---|---|---|---|---|---|---|---|---|
123 | 1 | ABC | Acme Supply Co | IL | CA | 2000-01-01T00:00:00 | 2004-12-22T00:00:00 | N |
123 | 2 | ABC | Acme Supply Co | IL | IL | 2004-12-22T00:00:00 | 9999-12-31T23:59:59 | Y |
We overwrite the Current_State information in the first record (Row_Key = 1) with the new information, as in Type 1 processing. We create a new record to track the changes, as in Type 2 processing. And we store the history in a second State column (Historical_State), which incorporates Type 3 processing.
For example, if the supplier were to relocate again, we would add another record to the Supplier dimension, and we would overwrite the contents of the Current_State column:
Supplier_Key | Row_Key | Supplier_Code | Supplier_Name | Current_State | Historical_State | Start_Date | End_Date | Current_Flag |
---|---|---|---|---|---|---|---|---|
123 | 1 | ABC | Acme Supply Co | NY | CA | 2000-01-01T00:00:00 | 2004-12-22T00:00:00 | N |
123 | 2 | ABC | Acme Supply Co | NY | IL | 2004-12-22T00:00:00 | 2008-02-04T00:00:00 | N |
123 | 3 | ABC | Acme Supply Co | NY | NY | 2008-02-04T00:00:00 | 9999-12-31T23:59:59 | Y |
Type 2 / type 6 fact implementation[edit]
Type 2 surrogate key with type 3 attribute[edit]
In many Type 2 and Type 6 SCD implementations, the surrogate key from the dimension is put into the fact table in place of the natural key when the fact data is loaded into the data repository.[1] The surrogate key is selected for a given fact record based on its effective date and the Start_Date and End_Date from the dimension table. This allows the fact data to be easily joined to the correct dimension data for the corresponding effective date.
Here is the Supplier table as we created it above using Type 6 Hybrid methodology:
Supplier_Key | Supplier_Code | Supplier_Name | Current_State | Historical_State | Start_Date | End_Date | Current_Flag |
---|---|---|---|---|---|---|---|
123 | ABC | Acme Supply Co | NY | CA | 2000-01-01T00:00:00 | 2004-12-22T00:00:00 | N |
124 | ABC | Acme Supply Co | NY | IL | 2004-12-22T00:00:00 | 2008-02-04T00:00:00 | N |
125 | ABC | Acme Supply Co | NY | NY | 2008-02-04T00:00:00 | 9999-12-31T23:59:59 | Y |
Once the Delivery table contains the correct Supplier_Key, it can easily be joined to the Supplier table using that key. The following SQL retrieves, for each fact record, the current supplier state and the state the supplier was located in at the time of the delivery:
Pure type 6 implementation[edit]
Having a Type 2 surrogate key for each time slice can cause problems if the dimension is subject to change.[1]
A pure Type 6 implementation does not use this, but uses a Surrogate Key for each master data item (e.g. each unique supplier has a single surrogate key).
This avoids any changes in the master data having an impact on the existing transaction data.
It also allows more options when querying the transactions.
Here is the Supplier table using the pure Type 6 methodology:
Supplier_Key | Supplier_Code | Supplier_Name | Supplier_State | Start_Date | End_Date |
---|---|---|---|---|---|
456 | ABC | Acme Supply Co | CA | 2000-01-01T00:00:00 | 2004-12-22T00:00:00 |
456 | ABC | Acme Supply Co | IL | 2004-12-22T00:00:00 | 2008-02-04T00:00:00 |
456 | ABC | Acme Supply Co | NY | 2008-02-04T00:00:00 | 9999-12-31T23:59:59 |
The following example shows how the query must be extended to ensure a single supplier record is retrieved for each transaction.
A fact record with an effective date (Delivery_Date) of August 9, 2001 will be linked to Supplier_Code of ABC, with a Supplier_State of 'CA'. A fact record with an effective date of October 11, 2007 will also be linked to the same Supplier_Code ABC, but with a Supplier_State of 'IL'.
While more complex, there are a number of advantages of this approach, including:
- Referential integrity by DBMS is now possible, but one cannot use Supplier_Code as foreign key on Product table and using Supplier_Key as foreign key each product is tied on specific time slice.
- If there is more than one date on the fact (e.g. Order Date, Delivery Date, Invoice Payment Date) one can choose which date to use for a query.
- You can do 'as at now', 'as at transaction time' or 'as at a point in time' queries by changing the date filter logic.
- You don't need to reprocess the Fact table if there is a change in the dimension table (e.g. adding additional fields retrospectively which change the time slices, or if one makes a mistake in the dates on the dimension table one can correct them easily).
- You can introduce bi-temporal dates in the dimension table.
- You can join the fact to the multiple versions of the dimension table to allow reporting of the same information with different effective dates, in the same query.
The following example shows how a specific date such as '2012-01-01T00:00:00' (which could be the current datetime) can be used.
Both surrogate and natural key[edit]
An alternative implementation is to place both the surrogate key and the natural key into the fact table.[4] This allows the user to select the appropriate dimension records based on:
- the primary effective date on the fact record (above),
- the most recent or current information,
- any other date associated with the fact record.
This method allows more flexible links to the dimension, even if one has used the Type 2 approach instead of Type 6.
Here is the Supplier table as we might have created it using Type 2 methodology:
Supplier_Key | Supplier_Code | Supplier_Name | Supplier_State | Start_Date | End_Date | Current_Flag |
---|---|---|---|---|---|---|
123 | ABC | Acme Supply Co | CA | 2000-01-01T00:00:00 | 2004-12-22T00:00:00 | N |
124 | ABC | Acme Supply Co | IL | 2004-12-22T00:00:00 | 2008-02-04T00:00:00 | N |
125 | ABC | Acme Supply Co | NY | 2008-02-04T00:00:00 | 9999-12-31T23:59:59 | Y |
The following SQL retrieves the most current Supplier_Name and Supplier_State for each fact record:
If there are multiple dates on the fact record, the fact can be joined to the dimension using another date instead of the primary effective date. For instance, the Delivery table might have a primary effective date of Delivery_Date, but might also have an Order_Date associated with each record.
The following SQL retrieves the correct Supplier_Name and Supplier_State for each fact record based on the Order_Date:
Some cautions:
- Referential integrity by DBMS is not possible since there is not a unique key to create the relationship.
- If relationship is made with surrogate to solve problem above then one ends with entity tied to a specific time slice.
- If the join query is not written correctly, it may return duplicate rows and/or give incorrect answers.
- The date comparison might not perform well.
- Some Business Intelligence tools do not handle generating complex joins well.
- The ETL processes needed to create the dimension table needs to be carefully designed to ensure that there are no overlaps in the time periods for each distinct item of reference data.
Combining types[edit]
Scd model example
Different SCD Types can be applied to different columns of a table. For example, we can apply Type 1 to the Supplier_Name column and Type 2 to the Supplier_State column of the same table.
See also[edit]
- Entity–attribute–value model - Vertical
Notes[edit]
- ^ abcdefgKimball, Ralph; Ross, Margy. The Data Warehouse Toolkit: The Complete Guide to Dimensional Modeling.
- ^http://www.kimballgroup.com/2013/02/design-tip-152-slowly-changing-dimension-types-0-4-5-6-7/
- ^https://www.kimballgroup.com/2013/02/design-tip-152-slowly-changing-dimension-types-0-4-5-6-7/
- ^Ross, Margy; Kimball, Ralph (March 1, 2005). 'Slowly Changing Dimensions Are Not Always as Easy as 1, 2, 3'. Intelligent Enterprise.
References[edit]
X 0.1 1 3
- Bruce Ottmann, Chris Angus: Data processing system, US Patent Office, Patent Number 7,003,504. February 21, 2006
- Ralph Kimball:Kimball University: Handling Arbitrary Restatements of History[1]. December 9, 2007
Midi Type 0 Type 1
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Slowly_changing_dimension&oldid=978412623'