Thursday 9 July 2020

Data Type Declaration, Usage, Query

In Software Engineering the usage of fields or variables are declared with datatypes.  The datatypes usually are categorized based on types like numbers, strings, text, image, graph, document, node, vertex, Media, tree, and so on.
The primitive datatypes used are Integers, bit, bytes, decimals, string, text, Blob, image, Media and so on..

In today's context the programming world have to now include the above datatypes with the past generation datatypes,

For e.g to define a Custom data type of CompleteName, 

The CompleteName constitutes. 
Name (FirstName MiddleName LastNameFatherName LastNameMother  FatherCasteName  MotherCasteName)
Or
Name (FirstName MiddleName LastNameFatherName LastNameMotherName  LastNameSpouseName SelfCasteName SpouseCasteName)

Each of the sub names are allocated 50 characters maximum along with space between them,

The Declaration for the same could be, 

CompleteName(365)=
String(50)+string (1)+String(50)+string (1)+String(50)+string (1)+String(50)+string (1)+String(50)+string (1)+String(50)+string (1)+String(50)=FirstName(50) + Space (1)+MiddleName(50)+ Space (1)+LastNameFatherName (50)+space (1)+LastNameMotherName (50)+space (1))+LastNameSpouseName (50)+space (1)+SelfCasteName(50)+space (1)+ SpouseCasteName(50)

The Declaration further could be thought off as base based Declaration
BinaryString(2^5+2^3+2^3+2^0) or as DecimalString(10×5) and so on... 

In this case the memory representation or storage could be allocated based on the Declaration and based on the input string to save memory and disk space. 

This would also help the users to access the individual sub names like a struct. 

CompleteName.FirstName 
CompleteName.MiddleName
And so on. 

Similarly,  Address can be
Address.BuildingName
Address.DoorNumber

Hope the language version in the future could provide these features as part of their specifications.

Is it time to define a Common standard for languages particularly for data types neutral or common syntax that can be used in various application contexts or to develop various application? 

For example the same language could be used right from front end, service, Database, Data store's, social media, working with office document types , media's, images, maps, weather's, geography and so on...

What do we think or say about this idea? 

No comments:

Post a Comment