Git Product home page Git Product logo

minisql's Introduction

MiniSQL

author: 黄雨生 宋融 薛伟

date: 2017.6

1、编译

  • Linux、Mac以及unix平台下,直接使用提供的makefile编译即可
  • windows平台请通过VS自行搭建工程并编译运行,各文件之间的依赖关系请参照makefile

2、使用

成功编译后在终端中输入:

./main

即可运行程序。(需在工程目录下,如果不在需要更改路径)

本MiniSQL支持标准的SQL语法,基本操作如下:

创建表

create table 表名 (
	列名 类型 ,
	列名 类型 ,
	列名 类型 ,
	primary key (列名)
);

删除表

drop table 表名;

创建索引

create index 索引名 on 表名 (列名);

删除索引

drop index 索引名;

选择语句

drop table 表名; 或者 select * from 表名 where 条件 ;

插入语句

insert into 表名 values ( 值1 , 值2 , … , 值n );

删除记录

delete from 表名; 或者 delete from 表名 where 条件;

执行文件

execfile 文件名;

退出

exit;

3、测试文件

我们也提供了一些测试文件供用户参考。工程**包含两个sql文件:

  • test_file文件包含1万条记录,插入时间较长
  • test_file1文件包含1千条记录,插入速度较快

两个测试文件均会建立一个test表,并向其中插入数据(无主键冲突)。用户可根据自己的需求自由选择。

minisql's People

Contributors

icedlattesuki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

minisql's Issues

代码运行不了

I have created a new project via VS, but it couldn't work!!
Have you ever checked the correctness of code?!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.