CS245 Notes1

CS245 Notes1 - Isnt Implementing a Database System Simple?...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CS 245 Notes 1 1 CS 245: Database System Principles Notes 01: Introduction Hector Garcia-Molina CS 245 Notes 1 2 Isn’t Implementing a Database System Simple? Relations Statements Results CS 245 Notes 1 3 Introducing the Database Management System • The latest from Megatron Labs • Incorporates latest relational technology • UNIX compatible CS 245 Notes 1 4 Megatron 3000 Implementation Details First sign non-disclosure agreement CS 245 Notes 1 5 Megatron 3000 Implementation Details • Relations stored in files (ASCII) e.g., relation R is in /usr/db/R Smith # 123 # CS Jones # 522 # EE . . . CS 245 Notes 1 6 Megatron 3000 Implementation Details • Directory file (ASCII) in /usr/db/directory R1 # A # INT # B # STR … R2 # C # STR # A # INT … . . .
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 CS 245 Notes 1 7 Megatron 3000 Sample Sessions % MEGATRON3000 Welcome to MEGATRON 3000! & & quit % . . . CS 245 Notes 1 8 Megatron 3000 Sample Sessions & select * from R # Relation R AB C SMITH 123 CS & CS 245 Notes 1 9 Megatron 3000 Sample Sessions & select A,B from R,S where R.A = S.A and S.C > 100 # 123 CAR 522 CAT & CS 245 Notes 1 10 Megatron 3000 Sample Sessions & select * from R | LPR # & Result sent to LPR (printer). CS 245 Notes 1 11 Megatron 3000 Sample Sessions & select * from R where R.A < 100 | T # & New relation T created. CS 245 Notes 1 12 Megatron 3000 • To execute “ select * from R where condition ”: (1) Read dictionary to get R attributes (2) Read R file, for each line: (a) Check condition (b) If OK, display
Background image of page 2
3 CS 245 Notes 1 13 Megatron 3000 • To execute “ select * from R where condition | T ”: (1) Process select as before (2) Write results to new file T (3) Append new line to dictionary CS 245 Notes 1 14 Megatron 3000 • To execute “ select A,B from R,S where condition ”: (1) Read dictionary to get R,S attributes (2) Read R file, for each line: (a) Read S file, for each line: (i) Create join tuple (ii) Check condition (iii) Display if OK CS 245 Notes 1 15 What’s wrong with the Megatron 3000 DBMS?
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

CS245 Notes1 - Isnt Implementing a Database System Simple?...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online