Click here to Skip to main content
15,891,136 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Thought of the Day Pin
Kschuler27-Aug-21 5:01
Kschuler27-Aug-21 5:01 
GeneralRe: Thought of the Day Pin
User 991608027-Aug-21 5:10
professionalUser 991608027-Aug-21 5:10 
GeneralRe: Thought of the Day Pin
jeron127-Aug-21 5:26
jeron127-Aug-21 5:26 
GeneralRe: Thought of the Day Pin
Slacker00727-Aug-21 6:02
professionalSlacker00727-Aug-21 6:02 
GeneralRe: Thought of the Day Pin
Member 1532961327-Aug-21 6:24
Member 1532961327-Aug-21 6:24 
GeneralRe: Thought of the Day Pin
DRHuff27-Aug-21 8:04
DRHuff27-Aug-21 8:04 
GeneralRe: Thought of the Day Pin
Eddy Vluggen27-Aug-21 16:07
professionalEddy Vluggen27-Aug-21 16:07 
GeneralImposing data type and length restrictions at the database level is stupid! Pin
5teveH27-Aug-21 2:26
5teveH27-Aug-21 2:26 
There - I said it! WTF | :WTF:

For almost 40 years, (apart from the odd dalliance with MySQL, SQL Server & Oracle), I have worked with databases that impose no such restrictions. So maybe I'm biased.

Here's my argument for removing the database schema 'straight-jacket':

- ASAP Data Validation. It puts the sole responsibility for data validation exactly where it should be: with the developer. The best place to catch bad data, is at the point of entry - before it gets anywhere near a database. That applies to user input and data feeds. If you are going to validate early, (and properly), there's no need to have a rigid database schema.

- Flexibility. It provides flexibility at no cost. A traditional RDBMS has a fixed data model, (defined by the schema), and will need effort every time it needs changing - and, these days, that responsibility is quite probably with another team: DBA's. If nothing else, this will cost time.

- Disk space. Defining a column size to accommodate the maximum possible length is a huge waste of space in a large table - particularly when there are probably dozens of those columns. For instance: a simple postal address table will need, at least, 5 x CHAR(50) address fields, plus a post/zip code field. And how many addresses actually use all of that space? Zero!

P.S. I'm now going out until the flames die down! Smile | :)
GeneralRe: Imposing data type and length restrictions at the database level is stupid! PinPopular
Richard Deeming27-Aug-21 2:36
mveRichard Deeming27-Aug-21 2:36 
GeneralRe: Imposing data type and length restrictions at the database level is stupid! Pin
5teveH27-Aug-21 3:02
5teveH27-Aug-21 3:02 
GeneralRe: Imposing data type and length restrictions at the database level is stupid! Pin
obermd27-Aug-21 3:39
obermd27-Aug-21 3:39 
GeneralRe: Imposing data type and length restrictions at the database level is stupid! Pin
RickZeeland27-Aug-21 2:43
mveRickZeeland27-Aug-21 2:43 
GeneralRe: Imposing data type and length restrictions at the database level is stupid! Pin
raddevus27-Aug-21 3:09
mvaraddevus27-Aug-21 3:09 
GeneralRe: Imposing data type and length restrictions at the database level is stupid! Pin
User 991608027-Aug-21 4:29
professionalUser 991608027-Aug-21 4:29 
GeneralRe: Imposing data type and length restrictions at the database level is stupid! Pin
raddevus27-Aug-21 4:44
mvaraddevus27-Aug-21 4:44 
GeneralRe: Imposing data type and length restrictions at the database level is stupid! Pin
User 991608027-Aug-21 4:47
professionalUser 991608027-Aug-21 4:47 
GeneralRe: Imposing data type and length restrictions at the database level is stupid! Pin
Mircea Neacsu27-Aug-21 7:11
Mircea Neacsu27-Aug-21 7:11 
GeneralRe: Imposing data type and length restrictions at the database level is stupid! Pin
User 991608027-Aug-21 7:18
professionalUser 991608027-Aug-21 7:18 
GeneralRe: Imposing data type and length restrictions at the database level is stupid! Pin
Jörgen Andersson27-Aug-21 9:07
professionalJörgen Andersson27-Aug-21 9:07 
GeneralRe: Imposing data type and length restrictions at the database level is stupid! Pin
raddevus27-Aug-21 9:37
mvaraddevus27-Aug-21 9:37 
GeneralRe: Imposing data type and length restrictions at the database level is stupid! Pin
Jörgen Andersson27-Aug-21 9:40
professionalJörgen Andersson27-Aug-21 9:40 
GeneralRe: Imposing data type and length restrictions at the database level is stupid! Pin
den2k8827-Aug-21 3:22
professionalden2k8827-Aug-21 3:22 
GeneralRe: Imposing data type and length restrictions at the database level is stupid! Pin
Jörgen Andersson27-Aug-21 9:13
professionalJörgen Andersson27-Aug-21 9:13 
GeneralRe: Imposing data type and length restrictions at the database level is stupid! Pin
dandy7227-Aug-21 3:29
dandy7227-Aug-21 3:29 
GeneralRe: Imposing data type and length restrictions at the database level is stupid! Pin
obermd27-Aug-21 3:38
obermd27-Aug-21 3:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.