A Header Row consists of the column names. Data Rows consist of the records related to the columns. Here some special symbols are used as delimiters.
Symbols
├: Header Row Begining
┤: Header Row End
└: Data Row Begining
┘: Data Row End
│: Column Separator
Figure: Overview of System
Querying
The system supports 15 or more SQL Type Queries to query the database. The following queries are used in this system.
1) CREATE DATABASE StudentDB
This is the query for creating the database named "StudendDB".
2) LIST DATABASES
This query shows a list of databases in the system.
3) DROP DATABASE StudentDB
This query deletes the database StudentDB.
4) USE StudentDB
This query holds the StudentDB database name for further database manipulation quries such as INSERT, DELETE, UPDATE, SELECT and so on.
5) LIST TABLES
This query shows the tables in the database that are currenlty held for manipulation.
6) DROP TABLE tblMarkSheet
This query deletes the table from the database.
7) CREATE TABLE tblMarkSheet (RollNo,StudentName,ClassStd,Mark1,Mark2,Mark3,Total,Avg)
This query crates a tblMarkSheet table with the columns RollNo, StudentName, ClassStd, Mark1, Mark2, Mark3, Total and Avg. In the background it creates a file named "tblMarkSheet.fdb" in the "StudentDB" folder.
8) 1. INSERT INTO tblMarkSheet
(RollNo,StudentName,ClassStd,Mark1,Mark2,Mark3,Total,Avg) VALUES (1, ANAND,10TH,85,48,59,192,64)
This query inserts a record into the tblMarkSheet table.
2. INSERT INTO tblMarkSheet VALUES (1, ANAND,10TH,85,48,59,192,64)
This query is the same as the previous insert query. The difference is we don't need to provide the column names.
9) 1. DELETE FROM tblMarkSheet WHERE RollNo=10
This query deletes the records with record column values equal to 10 in the tblMarkSheet table.
2. DELETE FROM tblMarkSheet
This query deletes all the records from the tblMarkSheet Table.
10) 1. UPDATE tblMarkSheet SET (ClassStd) VALUES (11TH) WHERE RollNo=1
This query modifies the ClassStd field of the record that holds RollNo as 1.
1.1. UPDATE tblMarkSheet SET (ClassStd) VALUES (11TH)
2. UPDATE tblMarkSheet SET VALUES (1, XXX,5TH,40) WHERE RollNo=1
This query sequentiay updates the record that holds the RollNo as 1. Here we don't need to specify the columns to update, it automatically updates from the sequence and missed column values remain the same.
2.1. UPDATE tblMarkSheet SET VALUES (1, XXX,5TH,40)
Note: The queries 11 of 1.1 and 2.1 are executed without condition.
11) 1. SELECT * FROM tblMarkSheet
2. SELECT * FROM tblMarkSheet WHERE RollNo=1
3. SELECT RollNo,StudentName,Total FROM tblMarkSheet WHERE RollNo>5
4. SELECT RollNo,StudentName,Avg FROM tblMarkSheet WHERE Avg>=60
This query is for viewing the records of the table. Here we can filter the records using relational operators.
Bugs and Flaws in Queries
In the future it will be portable for more security and a fully enhanced database structure. It could support JOIN queries.
Demo Form Design
The demo form has been designed to examine the flat file database operation. It has database creation, table creation, record insertion, record deletion, record updation, loading records and custom query execution. In addition it has IntelliSense TextBox for easy query writing. The form layout is fluid and exactly fit for all screens.