Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component ESQ One of three components of the E-kernel Subsystem June 2004.

Slides:



Advertisements
Similar presentations
Introduction to the BinX Library eDIKT project team Ted Wen Robert Carroll
Advertisements

Chapter 10: Designing Databases
Creating Tables. 2 home back first prev next last What Will I Learn? List and provide an example of each of the number, character, and date data types.
SYSTEM PROGRAMMING & SYSTEM ADMINISTRATION
Let’s try Oracle. Accessing Oracle The Oracle system, like the SQL Server system, is client / server. For SQL Server, –the client is the Query Analyser.
Fundamentals, Design, and Implementation, 9/e Chapter 12 ODBC, OLE DB, ADO, and ASP.
Introduction to Structured Query Language (SQL)
A Guide to SQL, Seventh Edition. Objectives Understand the concepts and terminology associated with relational databases Create and run SQL commands in.
Physical design. Stage 6 - Physical Design Retrieve the target physical environment Create physical data design Create function component implementation.
A Guide to SQL, Seventh Edition. Objectives Embed SQL commands in PL/SQL programs Retrieve single rows using embedded SQL Update a table using embedded.
Introduction to Structured Query Language (SQL)
Information systems and databases Database information systems Read the textbook: Chapter 2: Information systems and databases FOR MORE INFO...
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
Advance Computer Programming Java Database Connectivity (JDBC) – In order to connect a Java application to a database, you need to use a JDBC driver. –
Navigation and Ancillary Information Facility NIF Leapseconds and Spacecraft Clock Kernels LSK and SCLK November 2014.
Overview of SQL Server Alka Arora.
ASP.NET Programming with C# and SQL Server First Edition
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 7 INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) Instructor Ms. Arwa.
Database Technical Session By: Prof. Adarsh Patel.
CSE 781 – DATABASE MANAGEMENT SYSTEMS Introduction To Oracle 10g Rajika Tandon.
CHAPTER:14 Simple Queries in SQL Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
Relational Database CISC/QCSE 810 some materials from Software Carpentry.
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
IS 325 Notes for Wednesday August 28, Data is the Core of the Enterprise.
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Guide to Oracle 10g ITBIS373 Database Development Lecture 4a - Chapter 4: Using SQL Queries to Insert, Update, Delete, and View Data.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
Introduction to Oracle In June 1970,Dr E.F.Codd’s a published A paper entitled A relational model of Data for large shared data banks. This relational.
Data resource management
Presented by Scientific Annotation Middleware Software infrastructure to support rich scientific records and the processes that produce them Jens Schwidder.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 7 (Part II) INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) Instructor.
Navigation and Ancillary Information Facility NIF SPICE System Development Plans March 2006.
Benjamin Post Cole Kelleher.  Availability  Data must maintain a specified level of availability to the users  Performance  Database requests must.
A Guide to SQL, Eighth Edition Chapter Eight SQL Functions and Procedures.
Navigation and Ancillary Information Facility NIF Overview of the Events Kernel EK November 2014 Note: the EK is infrequently used by NASA flight projects.
August 2003 At A Glance The IRC is a platform independent, extensible, and adaptive framework that provides robust, interactive, and distributed control.
Navigation and Ancillary Information Facility NIF Introduction to the Events Kernel EK June 2004.
Session 1 Module 1: Introduction to Data Integrity
Copyright (c) 2014 Pearson Education, Inc. Introduction to DBMS.
Starting with Oracle SQL Plus. Today in the lab… Connect to SQL Plus – your schema. Set up two tables. Find the tables in the catalog. Insert four rows.
11-1 © Prentice Hall, 2004 Chapter 11: Physical Database Design Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
Presentation on Database management Submitted To: Prof: Rutvi Sarang Submitted By: Dharmishtha A. Baria Roll:No:1(sem-3)
Unit-8 Introduction Of MySql. Types of table in PHP MySQL supports various of table types or storage engines to allow you to optimize your database. The.
Navigation and Ancillary Information Facility NIF “Metadata” In SPICE Kernels Also known as “comments” January 2009.
CSC314 DAY 8 Introduction to SQL 1. Chapter 6 © 2013 Pearson Education, Inc. Publishing as Prentice Hall SQL OVERVIEW  Structured Query Language  The.
 CONACT UC:  Magnific training   
CHAPTER 9 File Storage Shared Preferences SQLite.
Concepts of Database Management, Fifth Edition Chapter 3: The Relational Model 2: SQL.
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
Navigation and Ancillary Information Facility NIF “Metadata” In SPICE Kernels Also known as “comments” October 2007.
Understanding Core Database Concepts Lesson 1. Objectives.
Web Database Programming Using PHP
A Guide to SQL, Seventh Edition
Module 11: File Structure
SQL and SQL*Plus Interaction
ATS Application Programming: Java Programming
Web Database Programming Using PHP
Appendix D: Network Model
Datamining : Refers to extracting or mining knowledge from large amounts of data Applications : Market Analysis Fraud Detection Customer Retention Production.
ORACLE SQL Developer & SQLPLUS Statements
DATABASE MANAGEMENT SYSTEM
CIS16 Application Programming with Visual Basic
Chapter 2 Handling Data in PL/SQL Blocks Oracle9i Developer:
Contents Preface I Introduction Lesson Objectives I-2
Understanding Core Database Concepts
Presentation transcript:

Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component ESQ One of three components of the E-kernel Subsystem June 2004

Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component (ESQ) 2 The SPICE E-kernel’s sequence component (ESQ) is concerned with mission event data Which events? –Events relevant to current mission operations activities –Events relevant to providing scientists a complete understanding of science data returned from the spacecraft, both during the mission and years later Events could be predicted or actual The EK/ESQ subsystem provides standards and mechanisms for: –browsing event data interactively –conveniently accessing event data within application software –documenting event data –transmitting event data –archiving event data EK/ESQ Purpose

Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component (ESQ) 3 The ESQ component uses a SPICE database mechanism, called DBK (“Database Kernel”), for storing “events” and related data –Suitable for recording sequences of commands, spacecraft configuration, state, or other highly structured, high-volume data –Examples: »Galileo, MGS, or Stardust sequences of events »Galileo observation plans »Clementine image catalog DBK is a simple, stand-alone relational database system developed by NAIF References to DBK in the remainder of this tutorial are applicable to the EK/ESQ EK/ESQ Implementation

Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component (ESQ) 4 DBK characteristics –All DBK software is provided in the SPICE Toolkit »No licenses or third-party software involved –Data are stored in binary files –Direct access (fast compared to sequential text file access) –Portable to all platforms supported by NAIF –Provides room for metadata (comments), as in other binary kernels –Utilizes operating-system-independent buffered access –Read and write access is provided by SPICE subroutines SPICE Utilities/Apps that work with DBK files: –Use INSPEKT to browse DBKs interactively –Use COMMNT for comment area access DBK Subsystem Features

Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component (ESQ) 5 Relational Model –A DBK database is a set of tables »Each table is made up of rows and columns »Tables are “rectangular”: same number of rows in each column –Column Attributes »Data type Character (fixed or variable length) Integer Double Precision Time (similar to “DATE” type in SQL) »Dimension (not supported in standard relational model) Fixed or variable »Null values are allowed »Data values may be indexed DBK Database Organization - 1

Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component (ESQ) 6 Tables and files –A single table can be spread across multiple DBK files –A single DBK file can contain multiple tables –A single DBK file can contain pieces of multiple tables –SPICE DBK software can load (access) multiple DBK files at one time »If a table is spread across multiple loaded files, this is transparent to INSPEKT and to the high-level API routines DBK Database Organization - 2

Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component (ESQ) 7 The DBK query language is used to select data from DBK tables –A query selects entries in specified columns belonging to rows that satisfy the query’s “constraints.” –DBKs may be queried via the DBK API or INSPEKT The DBK query language is closely related to the widely used SQL language –Restrictions »Read access only Use API calls to write or update a DBK »Subqueries are not supported »Arithmetic operations in queries are not supported –Extensions »Recognizes SPICE time formats »May retrieve data from array-valued columns DBK Query Language - 1

Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component (ESQ) 8 Query syntax SELECT FROM WHERE ORDER BY Example SELECT event_time, command_name, parameter_name, parameter_value FROM sequence WHERE command_name like “36*” and ((event_time between “1985 Jan 1” and “January 1, 2000”) or ( event_time > “Jan 1, 2002)) ORDER BY event_time DESCENDING, command_name DBK Query Language - 2

Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component (ESQ) 9 DBK API - 1 DBK API Components –DBK query interface »Principal interface is a suite of routines supporting query- and-fetch operations. These are: EKFIND --- issue a query EKGC, EKGD, EKGI --- fetch character, double precision, and integer data, respectively. EKGD is also used to fetch data of type TIME. EKNELT --- return the number of elements in a specified column entry –Needed because DBK columns may be array-valued. EKPSEL --- parse the SELECT clause of a query –Returns, attributes of columns in SELECT clause. –Needed to handle arbitrary queries at run time: enables calling application to determine on the fly which fetch routines to call. To make DBK data visible to the query interface, one “loads” DBK files of interest via FURNSH. DBK files can be removed from the system by calling UNLOAD. - continues-

Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component (ESQ) 10 DBK API - 2 –Low-level DBK reader interface »Supports reading specified column entries from DBK files Routines EKRCEC, EKRCED and EKRCEI are used to read column entries from character, double precision, and integer columns, respectively. EKRCED reads data from columns of type TIME as well. The column entry readers are file-oriented and record-oriented: the caller reads an entry from a record specified by its ordinal position in a specified DBK file. –This capability is an extension of the relational model. »Supports retrieval of schema descriptions from DBK files Routines EKNSEG and EKSSUM are used to retrieve these data. Routine EKOPR is used to “open” a DBK file for access by the low-level interface. EKCLS is used to close a DBK opened by EKOPR. - continues-

Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component (ESQ) 11 –DBK record-oriented writer interface »Supports creation of tables record-by-record. Records may be added in random order. Data may be taken from an input stream; no need to stage large amounts of data. File creation is relatively slow. »To create a DBK using the record-oriented writers Open a new DBK for write access using EKOPN. Use EKBSEG to start a new “segment.” –DBKs consist of one or more collections of data called “segments.” Each segment contains data belonging to only one table. Add new, empty records to a segment using EKINSR (“insert record”) or EKAPPR (“append record”). Add column entries to records using EKACEC, EKACED, and EKACEI for character, double precision, and integer data, respectively. EKACED is also used to write TIME values to records. –Normally, each new record is filled in with data before a new record is started, but this is not required. When all segments are done, complete the DBK by calling EKCLS. DBK API continues-

Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component (ESQ) 12 DBK API - 4 –DBK “fast load” writer interface »Much faster ( roughly 100x) than the record-oriented interface. »Typically requires calling application to buffer large quantities of data in memory. Builds one segment at a time. Builds segments by writing the data for each column in one shot. »To use the “fast loader” routines Prepare a new segment for the fast load routines by calling EKIFLD. Call EKACLC, EKACLD, EKACLI to add character, double precision, or integer columns to the segment. Use EKACLD to add TIME columns. Finish fast load by calling EKFFLD. When all segments are done, complete the DBK by calling EKCLS. - continues-

Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component (ESQ) 13 DBK API - 5 –DBK update interface »Allows updating of individual column entries. Use EKUCEC, EKUCED, or EKUCEI to update character, double precision, or integer column entries. EKUCED updates TIME entries as well. »Allows deletion of records. Delete records using EKDELR.

Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component (ESQ) 14 DBK API - 6 Example: query-and-fetch with SELECT clause and DBK schema known in advance. –Use EKFIND to issue a query. EKFIND returns the number of matching rows, an error flag, and an error message. –Loop over the matching rows, using EKGC, EKGD, and EKGI to fetch data from each column. All entries are assumed scalar and non-null. QUERY = ‘SELECT CHR_COL, INT_COL, DP_COL, TIME_COL FROM TABLE1’ CALL EKFIND ( QUERY, NROWS, ERROR, ERRMSG ) DO ROW = 1, NMROWS CALL EKGC ( 1, ROW, 1, CDATA(ROW), NULL, FOUND ) CALL EKGI ( 2, ROW, 1, IDATA(ROW), NULL, FOUND ) CALL EKGD ( 3, ROW, 1, DDATA(ROW), NULL, FOUND ) CALL EKGD ( 4, ROW, 1, TDATA(ROW), NULL, FOUND ) END DO

Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component (ESQ) 15 INSPEKT is an interactive browsing program for DBK files –Command line interface –Command files –Symbols –Command editing –Extensive formatting options –Log files –Create customized reports –Uses DBK query language, plus various extensions –Read access only There is currently no generic DBK writing program –(NAIF re-uses a modestly flexible ESQ writing program designed to work with JPL sequence products - PEF2EK) DBK Data Access Using Inspekt

Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component (ESQ) 16 The DBK subsystem does not support concurrent file access by multithreaded or multitasking applications. –Multiple users may read a DBK file simultaneously, but there is no built-in mechanism to ensure data integrity when a file is read and written asynchronously. Various SQL features are not supported: –Commands providing “write access” to DBKs. –Subqueries –Expressions in SELECT clauses –Views DBK Limitations