Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Activity for Charlie Brumbaugh‭

Type On... Excerpt Status Date
Edit Post #277455 Initial revision over 4 years ago
Question What are the pros and cons of a composite primary key versus a unique constraint?
Let's say we have two tables A and B and a join table C that has foreign keys to both A and B and the combination of those foreign keys is unique. One could either do a unique constraint or a composite primary key on those columns. What would the pros and cons of either solution to this be?
(more)
over 4 years ago
Comment Post #277373 @meriton that page is useful for calculating how much space adding other int column with all rows filled will take, less useful for how much space a varchar column where the length of the strings is not constant
(more)
over 4 years ago
Comment Post #277373 @jcsahn InnoDB, yes
(more)
over 4 years ago
Edit Post #277375 Initial revision over 4 years ago
Question Would a MySQL database run more efficiently with smaller varchar lengths?
I have a database with quite a few VARCHAR fields. When the database was first built the lengths of the columns were set a bit larger than absolutely necessary. Now after, having used the DB for a while and run a lot of data through it, I have a better idea of how long the fields need to be and am...
(more)
over 4 years ago
Edit Post #277373 Initial revision over 4 years ago
Question How to calculate how much data is stored in a MySQL column?
I am considering either removing some columns or changing the datatypes if I could significantly reduce the amount of storage that is currently used by those columns. Some of the columns are ints and some are varchar. How do I calculate (preferably in megabytes) the amount of storage a column uses...
(more)
over 4 years ago
Edit Post #277367 Initial revision over 4 years ago
Question How to store credentials for PHP scripts on a Windows machine?
I have a number of command line PHP scripts that are either run by a user or by Windows Task Scheduler. These scripts use DB and API credentials and I am wondering if there is a better way of storing said credentials than configuration files outside of the Git repository?
(more)
over 4 years ago
Edit Post #277303 Initial revision over 4 years ago
Question Is there a naming convention for table aliases?
Sometimes, either to reduce the amount of typing big table names or when joining a table to itself one will need to alias a table. Personally I find SQL statements with aliases harder to read and avoid using them if possible. Is there a naming convention for choosing the alias names for ease of co...
(more)
over 4 years ago
Edit Post #277148 Post edited:
over 4 years ago
Comment Post #277148 @ArtofCode sometimes when doing sub queries like this it has to have a unique alias and it's easier to just always do the double select and copy paste that
(more)
over 4 years ago
Comment Post #277148 @manassehkatz The query cost is slightly different but the results are not
(more)
over 4 years ago
Edit Post #277148 Post edited:
over 4 years ago
Edit Post #277148 Initial revision over 4 years ago
Question Why would excluding records by creating a temporary table of their primary keys be faster than simply excluding by value?
I have two tables with millions of records. Every so often I need to join them and exclude just a handful of records where a bit(1) column is set to 1 instead of 0. I can do it with either, ```sql WHERE isexcluded !=1 ``` or ```sql WHERE exampletable.pk NOT IN ( SELECT pk FROM( ...
(more)
over 4 years ago