Minirel_2 - EECS 484 Winter 2011 Project 4 Minirel 2K Query...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
EECS 484: Winter 2011 Minirel2K: Utilities and Queries Page 1 EECS 484, Winter 2011 Project 4: Minirel 2K Query Processor Due: April 13 at 10:30AM Introduction In this project, you will implement a query processor and some basic utilities for the Minirel2K system. When your query processor is complete, you will have a simple single-user DBMS that accepts a (small) subset of SQL. Basics Once complete, your DBMS will include three executable programs, which you will be able to run from the command line: 1. dbcreate <dbname> This executable creates the database dbname . 2. minirel <dbname> [SQL-file] This executable allows you to interact with the database named dbname by writing (simple) SQL commands. If the optional SQL-file is specified, then the program reads SQL from that file. While industrial-strength DBMSs support concurrent access to data, for the purposes of this assignment, we will assume that there will be at most one minirel process running at a time, so we do not need to worry about concurrency control. 3. dbdestroy <dbname> This program deletes the database dbname. Framework Overview To get your started, we provide a skeleton framework, which consists of a significant quantity of source code, as well as some libraries. Figure 1 gives an overview of the framework. The following is a brief description of each of the main components. Parser: The minirel executable accepts SQL queries and other utility commands. (See the next section for a full description of the supported SQL commands.) We provide a parser, which first parses the input SQL, and then consults the system catalogs to make sure the commands are valid (i.e., the relations and attributes mentioned by the command actually exist in the database.) If the SQL is valid, the parser calls the appropriate query operators and utilities. The parser is implemented for you. Query Optimizer, Operators, and Utilities: This is where you will do most of your work. If the incoming SQL command is valid, the parser calls the appropriate function to process the command: If the command is a utility, the parser calls the appropriate function to process the utility. For this project, you will only be implementing one utility (insert). The function header (Updates::Insert) can be found in the file query.h, and the actual implementation of this function will go in insert.cpp. If the command is a query, the parser first determines if the query is a select query (referencing just one table) or a join query. To execute a select query, the parser calls Operators::Select (in select.cpp). To execute a join query, it calls Operators::Join (in join.cpp). The Operator class definition can be found in query.h. For this assignment, you will implement the insert, select, and join operators.
Image of page 1

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

View Full Document Right Arrow Icon
EECS 484: Winter 2011 Minirel2K: Utilities and Queries Page 2 Storage Manager: Beneath the query processor, there are two main access methods for data: indexes and heapfiles. From the query processor, you will need to appropriate public methods. To understand these classes and methods, it should be sufficient to look at the header files (heapfile.h and index.h).
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern