An Image/Link below is provided (as is) to download presentation
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.Content is provided to you AS IS for your information and personal use only.Download presentation by click this link.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.During download, if you can't get a presentation, the file might be deleted by the publisher.
Star Schema Kunde Lieferanten Verkaufs- transaktionen Ort Produkte Zeit Fakten Dimensionsdaten
Snowflake Schema Fakten Snowflake Dimensionsdaten Verkaufs- transaktionen Ort Produkte Art Zeit Region Woche Farbe Oster- verkauf SSV Monat
Starflake Schema Fakten Dimensionsdaten Snowflake Dimensionsdaten Lieferanten Kunde Verkaufs- transaktionen Ort Produkte Ort Art Zeit Region Produkte Zeit Farbe Woche Oster- verkauf SSV Monat
Oracle Data Mining Architektur OWB Client Darwin Client Data Warehouse Oracle Intelligent WebHouse Datenbank z.B. Oracle 8.0.5 OCI Net8 Oracle Warehouse Builder ODBC Darwin 8i 8.1.6 Repository Sun Solaris HP UX
BeispielMathetest • Wie sehen die zeitlichen Verläufe aus • Wie lange braucht der einzelnen Probant pro Frage • Welche Einträge sind plausibel • Welche Daten der Eltern sind plausibel? • Wie korrelieren die Antworten auf die Testfragen?
Faktentabelle drop table ta_zeitreihe; create table ta_zeitreihe( schluessel number(6) not null, probant char(24) not null, aufgaben_nr number(3) not null, ergebnis_1 number(1) null, ergebnis_2 number(2) null, ergebnis_3 number(1) null, ergebnis_4 number(4) null, richtig char(1) not null, datum date null, ip_adresse char(15) null, jahrestag char(7) null );
select - insertFaktentabelle select "insert into ta_zeitreihe values (sq_zeitreihe.nextval,"+"'" +probant+"',"+convert(char(2),aufgaben_nr)+"," +convert(char(1),isnull(ergebnis_1,0))+"," +convert(char(1),isnull(ergebnis_2,0))+"," +convert(char(1),isnull(ergebnis_3,0))+"," +convert(char(1),isnull(ergebnis_4,0))+",'"+richtig +"',to_date('"+convert(char(12),datum,104)+convert(char(8),datum,108) +"','dd.mm.yyyy hh24:mi:ss')" +",'"+ip_adresse+"');" from ta_probant
Daten bank SQL*LoaderÜbersicht Loader Control File Input Datenfiles SQL*Loader Log File Bad File Discard File
Funktionen von SQL*Loader • Mehrere Eingabedateien gleichzeitig • SQL-Funktionen für die Eingabefelder • Laden mehrerer Tabellen in einem Lauf • Zusammenfassen mehrerer Zeilen zu einem logischen Datensatz • Generierung von Schlüsseln • Eingabe von Platte, Band, named pipes
Control file • Enthält • Pfade für Eingabe, Log, fehlerhafte Datensätze, verworfene Datensätze • Struktur der Eingabedaten • Feldprüfungen • Zieltabellen • Vorschriften zur Fehlerbehandlung • wird beim Aufruf übergeben
Control fileBeispiel LOAD DATA INFILE 'example.dat' INTO TABLE emp (empno POSITION(01:04) INTEGER EXTERNAL, ename POSITION(06:15) CHAR, job POSITION(17:25) CHAR, mgr POSITION(27:30) INTEGER EXTERNAL, sal POSITION(32:39) DECIMAL EXTERNAL, comm POSITION(41:48) DECIMAL EXTERNAL, ...
Control fileBeispiel LOAD DATA INFILE * INTO TABLE DEPT FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' (DEPTNO, DNAME, LOC) BEGINDATA 12,RESEARCH,"SARATOGA" 10,"ACCOUNTING",CLEVELAND 11,"ART",SALEM 21,"SALES",PHILA. 22,"SALES",ROCHESTER 42,"INT'L","SAN FRAN"
Control fileBeispiel load data infile 'example.dat' "fix 11" badfile 'example.bad' discardfile 'example.dsc' discardmax 999 truncate into table example (rown position(1-5), cmnt position(6-10))
Daten bank Filtern der Datensätze Eingabe SQL*Loader Feldprüfung Discard File Bad File SQL*Loader Auswahl DBMS
Syntax control file -- comment OPTIONS (options) LOAD CONTINUE_LOAD DATA READBUFFERS n infile_clause INSERT APPEND Concatenation_clause REPLACE into_table_clause PRESERVE BLANKS BEGINDATA
Syntax control file infile_clause::= INFILE input_filename * BADFILE bad_file_name DISCARDFILE discard_file_name DISCARDS n DISCARDMAX
Syntax control file concatenation_clause::= n CONCATENATE (n) COTINUEIF pos_spec_operator ‘ char_string‘ THIS ( ) NEXT
Syntax control file into_table_clause::= INTO TABLE tablename INSERT APPEND REPLACE AND FIELDS delimiter_spec WHEN field_condition , ( column_name column_spec )
Syntax control file delimiter_spec::= termination_spec enclosure_spec termination_spec enclosure_spec OPTIONALLY WHITESPACE TERMINATED by ‘ char‘ ‘ char‘ ENCLOSED by AND ‘ char‘
Syntax control file column_spec::= POSITION pos_spec datatype_spec ( * ) +n NULLIF field_condition DEFAULTIF field_condition “ sql_string“
Mathetest Auswertung pro Stunde select to_char(datum,'hh24'), count(*) from ta_zeitreihe group by to_char(datum,'hh24') order by to_char(datum,'hh24');
Mathetest Auswertung pro Wochentag select to_char(datum,'day'), count(*), to_char(datum,'d') from ta_zeitreihe group by to_char(datum,'day'), to_char(datum,'d') order by to_char(datum,'d');