This question involves developing your own simple Demo of Oracle table partition
ID: 3812902 • Letter: T
Question
This question involves developing your own simple Demo of Oracle table partitioning and sub-partitioning. Do the following steps in order.
1. Create table T (you can use any identifier) with schema T(c, d, e) where c and d are type number and e is type varchar2(10 or more). c is the PK, d is a range partition key, and e is a list subpartition key.
2. Create 2 partitions on d; at least one of the partitions must have more than one subpartition; in addition, at least one subpartition (in your code, name it “SP2”) must have >=2 (list item) values.
3. INSERT and commit a small number of rows that are sufficient to demonstrate the behaviors in the steps specified next.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4. INSERT at least two rows into the subpartition SP2, and INSERT one row into the other partition.
5. INSERT a row for which the d value is out of range of T’s partition ranges (such an INSERT should fail); ==>
Review point about tp: although the INSERT statements in this specification are followed by only one commit statement, a failed SQL statement does NOT terminate/finalize the ongoing transaction consisting of these INSERTs
6. Do commit, then, select * from T (ensures the rowCount requirement is satisfied)
7. Execute query “Q1” = select * on a (non-empty) partition using the table name followed by: partition(partitionName) and a condition on column e in the WHERE clause
(The table name followed by partition(…) etc. is required to avoid ambiguity of different tables having the same partition name)
Explanation / Answer
sbit DB7 = P1^7;
sbit DB6 = P1^6;
sbit DB5 = P1^5;
sbit DB4 = P1^4;
sbit RS = P1^3;
sbit E = P1^2;
sbit clear = P2^4;
sbit souse = P2^5;
sbit left = P2^6;
sbit right = P2^7;
void returnHome(void);
void entryModeSet(bit id, bit s);
void showOnOffControl(bit display, bit cursor, bit blinking);
void cursorOrDisplayShift(bit sc, bit rl);
void functionSet(void);
void setDdRamAddress(char address);
void sendChar(char c);
void sendString(char* str);
bit getBit(char c, char bitNumber);
void delay(void);
void main(void) {
functionSet();
entryModeSet(1, 0); // increment and no shift
displayOnOffControl(1, 1, 1); // show on, pointer on and blinking on
sendString("EdSim51 LCD Module Simulation");
setDdRamAddress(0x40); // set address to start out of second line
sendString("Based on Hitachi HD44780");
// The program will be controlled via a number of the switches on port a pair of.
// If switch five is closed the pointer returns home (address 0).
// Otherwise, switches six and seven ar scan - if each switches ar open or each switches
// ar closed, the show doesn't shift.
// If switch seven is closed, unceasingly shift left.
// If switch six is closed, unceasingly shift right.
whereas (1)
else zero && right == 1) {
cursorOrDisplayShift(1, 0); // shift show left
}
else if (left == one && right == 0) {
cursorOrDisplayShift(1, 1); // shift show right
}
}
}
}
// LCD Module directions -------------------------------------------
// to grasp why the pins ar being set to the actual values within the functions
// below, see the instruction set.
// A full rationalization of the LCD Module: HD44780.pdf
void returnHome(void)
void entryModeSet(bit id, bit s)
void showOnOffControl(bit display, bit cursor, bit blinking)
void cursorOrDisplayShift(bit sc, bit rl)
void functionSet(void) operate set is really sent double. Why? See 4-bit operation
// on pages thirty-nine and forty two of HD44780.pdf.
DB7 = 0;
DB6 = 0;
DB5 = 1;
DB4 = 0;
RS = 0;
E = 1;
E = 0;
delay();
E = 1;
E = 0;
DB7 = 1;
E = 1;
E = 0;
delay();
}
void setDdRamAddress(char address)
void sendChar(char c)
// -- finish of LCD Module directions
// --------------------------------------------------------------------
void sendString(char* str) {
int index = 0;
whereas (str[index] != 0)
}
bit getBit(char c, char bitNumber) come back (c >> bitNumber) & 1;
}
void delay(void)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.