Razorpay || system design || Help
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2022-07-01Added By Anonymous
Source: Link
Razorpay || system design || Help
**Anyone can suggest any solution ?**
The purpose of the problem is to implemente an in-memory SQL-like database with the following set of operations / functionality:
It should be possible to create or delete tables in a database given their name
A table definition comprises columns which have types. You must check for these types in the operations below.
It should be possible to insert records in a table and the records should be validated:
The string type can have a maximum length of 20 characters and the int type can have a minimum value of -1024 and a maximum value of 1023.
It should be possible to print all records in a table.
It should be possible to filter and display records whose column values match a given value (equality)
If you have time:
Support for mandatory fields (tagging a column as required)
Queries for multiple fields at the same time.
Rules:
Speak your mind
Google if you need to, just let me know
The purpose of the problem is not to write SQL, or to create an actual database, just an in-memory database, with the data structures the programming language you choose provides you.