Pratik Patil
Pratik Patil

Reputation: 11

How to create mysql database table for dynamic fields

I want to create database table using mysql for transport application. Here I want to add columns which are not fixed for every record. They are added dynamically for every record. For example, record 1 contains PoliceFees & StateBoundry whereas record 2 does not have these fields. record 3 might have some others fields and so on. So how to design table for such data??

Upvotes: 0

Views: 133

Answers (1)

Thiago Martins
Thiago Martins

Reputation: 119

Dynamic fields and MySQL (relational database)? I think no-SQL is a better solution to your problem.

But if that fields is all known you can create a table with all of them and set as nullable. So you only insert needed data.

Upvotes: 1

Related Questions