In Memory DB
In Memory DB
1. Requirements
Project Requirements: Low-Level Design for an In-Memory
Database
1. Database Creation:
2. Database Security:
Users must have the ability to create tables within the database. The
system should allow the definition of schemas, specifying column
names and their respective data types.
1. addDatabase(user, databaseName)
Creates a new database for the specified user.
Parameters:
deleteDatabase(user, databaseName)
Deletes an existing database associated with the specified user.
Parameters:
3. getDatabase(user, databaseName)
Retrieves all the databases associated with the specified user.
Parameters:
1. initializeTable(String tableName)
a. Parameters:
i. tableName: The name of the table to be created.
a. Parameters:
i. tableName: The name of the table where data will be
inserted.
ii. colname: The column in which the value will be added.
iii. val: The value to be inserted.
a. Parameters:
i. tableName: The name of the table from which data will be
removed.
ii. colname: The column where the value will be searched.
iii. val: The value to be removed.
a. Parameters:
i. tableName: The name of the table where the data will be
updated.
ii. colname: The column to be updated.
iii. val: The new value to replace the existing one.
6. displayData(String tableName)
a. Parameters:
i. tableName: The name of the table to display data from.
1. initializeTableList(String dbname)
a. Parameters:
i. dbname: The name of the database for which the table list
will be initialized.
a. Parameters:
i. dbname: The name of the database where the table will be
added.
ii. tableName: The name of the table to be added.
Deletes a table from the specified database. Returns true if the table is
successfully deleted, and false otherwise.
a. Parameters:
i. dbname: The name of the database from which the table
will be deleted.
ii. tableName: The name of the table to be deleted.
5. getTableNames(String dbname)
a. Parameters:
i. dbname: The name of the database whose table names will
be retrieved.
Before interacting with the database system, the user must authenticate
themselves:
2. Creating a Database
4. Creating a Table
9. Deleting a Table