Coder Social home page Coder Social logo

database's Introduction

Update 11/20/2019: 这个项目源自一次仓促的课程设计. 实现的思路质量并不怎么样. 仅供参考.

C++ 实现关系型数据库

基于 C++11从底层实现了DBMS的部分功能,底层存储结构位0x3f版本的dbf文件。

编译

IDE:Visual Studio 2015及以上   OS:win10 Complier:MSVC++11.0 或更高,必需在64位环境下进行编译

查询语句

 

Create

多字段,多数据类型。 支持int, varchar, char, date, double数据类型 示例:  
create table stu (
id int,
name varchar(20),
sex char,
weight double,
birtyday date
);

Insert

支持单记录,多记录insert 示例:
insert into stu values (1, 'zhangsan', 'M', 90.0, '1996-10-10');
insert into stu values (2, 'lisi', 'M', 100.1, '1996-10-10');
insert into stu values (3, 'tom', 'M', 101.0, '1996-10-11');

Select

 

单条件,多条件,聚合函数,嵌套查询,对查询结果排序  

示例1多条件查询:

select id, name from stu where id>=2&&id<=5

示例2嵌套查询:

select ID, Firstname from
(select ID, Firstname from
test where date=='2016-10-10') where id==1;

示例3聚合函数:  

select max(weight), sex from stu group by sex having max(weight)>=100;

示例4排序:

select ave(weight), birtyday from stu group by birtyday order by weight;

database's People

Contributors

donglinz 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

Watchers

 avatar  avatar

database's Issues

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.