Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Umm...errr...well... That is how I did all my sqlite databases... Because it doesn't enforce data types...
-
My boss actually tried to convince me it's OK to put a column of "extra fields" as json in mssql. We didn't even work with json at the time
-
@hubiruchi I thought "extra fields" were done with a new table with a foreign key...
-
@Demolishun Extra fields are done by properly redoing the schema with a migration plan... or by simply using the functions all major DBMSs provide to add fields...
-
donuts238485yNo poorly designed database is when your team takes NoSql literally so the "schema" is always changing and you never know whether a field is expected or not or how to search for things...
-
xalys18825yadd = {‘name’: ‘Xalys’, ‘creditcard’: ‘’}
with rev(open(file, ‘w+’)) as f:
for line in f:
if f != add:
continue
else:
f.write(‘%s\n’ % add)
I made a banking system -
Wack63115y@hubiruchi I do have an `additionalData` field, which is JSON in one table, but just because every entry in that field can Gold about 4 known keys and as much other key value pairs as the user deams appropriate.
Since you can't search by that data or anything and it's only used to display whatever crap they put in, plus there's no index on that field, I don't really care.
Sure I could have an additional data table and a foreign key field pointing to it. Having the 4 known keys as Volumens and then either another table with key value and a foreign key to the extra data table or just the JSON fuckery in there, but I don't really see the point.
How would you solve this? Additional info: as we remove old entries after a certain period of time, the table has at most 6'000 entries of which maybe halbe have the sadditional data stuff set. They get retrived by two other fields in that row (for which we have an Index)
Poorly designed databases be like
VARCHAR VARCHAR VARCHAR VARCHAR VARCHAR
rant