Davisdb welcome to the davisdb command line shell

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: catalog tables themselves! •  So, even if database has no other tables: –  relations table should have two tuples (one for relations, one for attributes) –  attributes table should have rows for the a[ributes in catalog tables The Command ­Line Shell quatchi:src green$ ./DavisDB Welcome to the DavisDB command-line shell. Type "help;" for help. The Command ­Line Shell: Commands create database <dbName> ; drop database <dbName> ; open database <dbName> ; close database ; create table <tableName> (<attrName> <attrType>, ..., <attrName> <attrType>) ; where <attrType> is either float, int, or char(<length>) drop table <tableName> ; create index <tableName> (<attrName>) ; drop index <tableName (<attrName>) ; load <tableName> <fileName> ; info ; (implemented by corresponding info <tableName> ; SystemManager methods) print <tableName> ; io print ; io reset ; help ; quit ; (built ­in shell commands) print or reset page I/O sta6s6cs create database <dbName> SystemManager::createDb •  Database should be created in a new subdirectory dbName 1.  mkdir(dbName) 2. chdir(dbName) 3.  create system catalogs 4.  chdir("..") •  Useful Linux library commands: mkdir, chdir –  #include <sys/stat.h> open database <dbName> SystemManager::openDb 1.  chdir(dbName) 2.  Open sys...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online