Skip to content

UCSD ECE141 SP20 Software Engineering project -- SQL-Database-Management-System

License

Notifications You must be signed in to change notification settings

BoscoSuen/SQL-Database-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL-Database-Management-System

MIT License

It is a SQL database management system based on C++ 17 and we have created the command parser, low-level storage and database system, and complete many basic SQL commands. More over, we also improved the database management system performance using Index data blocks to index some table fields indexing the data blocks, and also add LRU cache to improve the data block reading preformance.

Process Diagram

The architecture for this SQL database management system is based on MVC design pattern After user input the command, the Tokenizer and Statement class parse the command and construct the Attribute, Schema and Row object, then send them to Database to deal with the SQL command, and also deal with the data with the low-level storage class. After the database controller complete the job, send it to the View object and user can get their SQL command output.

Usage

You can make the project by

make

You can find some related help with the SQL database management system:

help

and you can get following helps:

help -- the available list of commands shown below:
	 -- describe database <name>  -- show the description of the database named as name <name>
	 -- use database <name>   -- switch to the database named as name <name>
	 -- drop database <name>   -- delete the database with specific name <name>
	 -- create database <name>  -- create a new database names as input <name>
	 -- quit  -- terminates the execution of this DB application
	 -- show databases  -- shows the list of databases available
	 -- version  -- shows the current version of this application
	 -- help  - shows this list of commands

If you are using the system, you can input the SQL commands you want such as:

create database db
use database db
CREATE TABLE Students (Pid INT PRIMARY KEY, Studentname VARCHAR(100), ZIPCODE INT)
insert into Students (Pid,Studentname,ZIPCODE) values (1,'foo',90091), (3,'bar',90083)
select * from Students

When you finish all input, you can input

quit

to quit the system.

RoadMap

  • Built basic command processor
  • Built low-level storage system and Database class
  • Built Schema and Attribute to deal with input data
  • Built Row and Filter class
  • Completed select related SQL commands
  • Completed table update and delete functions
  • Add Index data block to improve performance
  • Completed join related functions
  • Add LRU cache for storage system to improve performance

About

UCSD ECE141 SP20 Software Engineering project -- SQL-Database-Management-System

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages