Skip to content

imehrdadmahdavi/simple-dbms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Simple Database Management System

This is a small program written in C to manage a database. It is intended to show C's low level programming capabilities such as direct memory access and memory allocation. As a result of simplicity, this program is not very efficient and doesn’t store very much.

Demo

# build program
$ make dbms
cc -Wall -g    dbms.c   -o dbms

# create a database
$ ./dbms db.dat c

# add records into the database (set)
$ ./dbms db.dat s 0 mehrdad [email protected]
$ ./dbms db.dat s 1 pedram [email protected]
$ ./dbms db.dat s 2 ashkan [email protected]

# get individual records by id
$ ./dbms db.dat g 1
1 pedram [email protected]

# list all the records in the database
$ ./dbms db.dat l
0 mehrdad [email protected]
1 pedram [email protected]
2 ashkan [email protected]

# remove one record from the database and list again
$ ./dbms db.dat d 1
$ ./dbms db.dat l
0 mehrdad [email protected]
2 ashkan [email protected]

Releases

No releases published

Packages

No packages published