Skip navigation

Monthly Archives: August 2011

Alright, so lately at work I’ve been up to my eyeballs in SQL.  More specifically MSSQL, but SQL none the less.  So, I wanted to take some time to discuss it and some basic stuff that, even home users, might find useful.  Considering this is a wordpress blog and it uses mysql to store it’s post and configuration data, I’ll use mySQL examples for my code snippets.  Now let’s get started by creating our database.

create database temp;

 

Now let’s create a table for users.

create table temp.test_users
(User_ID0 char(50),
last_name char(50),
first_name char(50),
location char(50));

 

Let’s stop and break this down for a second.  We just created our first database and named it temp.  Now inside of that database we’ve just created a table with 4 columns with a limit of 50 chars per entry.

So what is that exactly? 

Well, a database is just a logical grouping of data.  One easy way to think of a database is to think of a spreadsheet.  We’ll use excel as our example.

The database is your workbook, and a table is a worksheet.

So we’ve got a table now, lets insert some data to play with in there.

insert into temp.test_users
(User_id0,last_name,first_name,location)
VALUES
('dbel','Belcher','Daniel','Birmingham, AL');
insert into temp.test_users
(User_id0,last_name,first_name,location)
VALUES
('drich','Rich','Derrek','Tampa, FL');
insert into temp.test_users
(User_id0,last_name,first_name,location)
VALUES
('ageo','George','Amanda','Birmingham, AL');

 

Lets see how that data looks?

select * from temp.test_users;

 

+----------+-----------+------------+----------------+

| User_ID0 | last_name | first_name | location       |

+----------+-----------+------------+----------------+

| dbel     | belcher   | daniel     | birmingham, al |

| drich    | rich      | derrek     | tampa, fl      |

| ageo     | george    | amanda     | birmingham, al |

+----------+-----------+------------+----------------+

 

Hmm, it would be great if we had a date stamp along with this data for a creation data footer.

alter table temp.test_users
add date0 char(50);

 

Now, how are we going to update these entries?  I mean we could

delete from temp.test_users;

 

And recreate all those previous insertions with a new date column.  But that just isn’t efficient, especially if we had an even larger table than this.  It would be nice if we could look through our selects and just append that data.  But wait, we can…

update temp.test_users
SET date0 = CURDATE()
where date0 is null;

 

Pretty neat huh?  Well, maybe, let’s see how our data looks now.

select * from temp.test_users;

 

+----------+-----------+------------+----------------+------------+

| User_ID0 | last_name | first_name | location       | date0      |

+----------+-----------+------------+----------------+------------+

| dbel     | belcher   | daniel     | birmingham, al | 2011-08-31 |

| drich    | rich      | derrek     | tampa, fl      | 2011-08-31 |

| ageo     | george    | amanda     | birmingham, al | 2011-08-31 |

+----------+-----------+------------+----------------+------------+

Alright, now there goes the basics of building, updating, and viewing a (my)SQL database and table.  Really simple huh?  I’ll try and post some slightly more advanced stuff in the next week.  Like joining tables, and creating subqueries.

I guess until then you can RTFM (read the flippin manual).

I’ve officially migrated this wordpress blog to it’s own domain.

https://lotekness.net

That is all.

thumbs-up-haruhi

As is the case with everything it starts with God.

I’m speaking to believers here of course, but take the time to really reflect on God and who he is.  Infinite, immutable, omnipotent, righteous, perfect in every way.

Really get in there, think about this.  Sovereign, in control of everything.  Knowing the end from the beginning, working all things to his glory and to the good of those who love him.  The only thing in existence worthy of praise, because through him all things are made.

Now, stop and look at yourself.

Whoring ourselves out to anything that can offer you a quick fix to your immediate pleasure.  Even in our most righteous state, we are still unimaginably self centered and dirty.

Really get in there, into the darkest recesses of your mind where no one but you can hear the most intimate desires of your heart.  Really focus on that for a second, is that desire for God?  Is that desire wholesome?  Is that desire a desire you honestly believe God looks favorably upon?  Sin, is in the heart, not the act.  By sheer desire for a thing, apart from God, we have committed idolatry.  Like disobedient children, we choose our own way, completely defiant and ignorant to the right punishment we deserve.

The wages of sin is death.  There is no other way to look at that.  Now hold that thought for a moment.

Perfect God, compared to fallen man.

Focus on this now for a moment.

We deserve nothing, nothing but wrath.

Really stop and be honest with yourself, innocence vs. guilt.  The guilty should die no?

Yes, by all rights we should die.  Yet, instead of wrath, instead of death, instead of destruction, we receive mercy?

Not only mercy, but we receive God himself, as a living sacrifice to atone for our sins.  To not only die for us, but to live the life we couldn’t possibly live.  One of perfection, of righteousness, then obediently take death on a cross, and separation from the perfect communion with the God head.

We not only received this INCREDIBLE salvation, but we also received a place alongside God as co-heirs to the throne.

We are not worthy.

We will never be worthy.

We owe our everything to God, for his mercy, for his steadfast love, for his promise, for his good nature, for himself.

So how do you love your neighbor?  The same way it began with God, and ends with God.  You love them the way God loves you.

Unendingly, sacrificially, mercifully.


On a more regular basis I’d like to keep a stream of technical write ups, gaming news, theological thoughts, and or general “what’s going ons” with me and my family.  However with a work trip to Houston last week and general slap busy nature of my work since returning home; I’ve not had any time to collect some thoughts and formulate them into a blog post.  I want to hit some high points, and perhaps elaborate on them more in future posts.

High point #1 Samba DC

Ok, so people who have known me for any extended amount of time (from the age of 16 to 30) knows that I’m a Linux fan.  My work and lively hood mind you thrive around a Microsoft world, but I will never sell Linux short, nor fail to marvel at the amazing things that a thriving community of passionate individuals can create.  I also maintain a Linux server out of my home to manage DNS, DHCP, VOIP (TeamSpeak) and File sharing (NFS, iSCSI, and SMB).  I will also, on occasion, bring up outward facing game servers.  Just recently I decided to convert that server into a SAMBA DC for my, primarily, Windows 7 environment at home.

I run CentOS as my server distribution, which is a downstream of RHEL.  I’m running Samba version 3.5.4, at the time of this writing 3.6 is the latest stable release but didn’t offer enough improvements for me to go outside of my natively distributed yum version.

Also, aside from a few changes to the registry and local security policy that had to be made on the client side of the machines, the migration was fairly painless.

The first change resolves the issue of Windows 7 being able to find the domain for insertion, and the security policy solves the issue of Domain Trust at login.  It’s also wise to disable the password reset of the machine to DC to avoid potential relationship issues.  I’d not seen this issue myself, but until I see a confirmation it’s resolved (supposedly coming in samba 4) I’ll err to the side of caution.

My next step will be to integrate Open LDAP functionality into the DC, and an Apache http server.  I assume these will be fairly painless projects, but for risk of breaking my current domain environment I’ll need to wait till I have the time to deal with a potential ldap migration failure.  I also don’t have a strong enough list of pros for it since this is just a home network.  Mind you it’s more sophisticated than the average home network, it just seems a bit over engineered.  As for the Apache server, I really want to get back into some web development so I’d like the internal server for development purposes….

 

service httpd start

Ok, so now I’m running an Apache server off my server as well.  Linux is so hard.

 


 

High point #2 Admin Studio 10

So I was in Houston last week.  I’m now “officially” trained to use Admin Studio 10 for package (msi, app-v, xenapp, and thinapp) development, repackaging, and migration.

So what does that mean?

Well as most of you know I work with a product from Microsoft called SCCM.  One of the primary features of SCCM is application deployment.

So what is application deployment?

Simply put, it’s installing applications to multiple machines over a network.

Ok, I think I see.  So why would you need to do package development to deploy packages?

Well, you don’t have to.  One could feasibly shoehorn an installer given by a vendor, but ideally you want to build out a standardized installer or load for your company.  For us that means I’ll be building MSIs, MSTs, and App-v packages.  As well as isolating application installs that might otherwise break functionality of OTHER applications they share hard drive space with.

Wait, what?  Isolate, break, huh?

Almost all applications rely on libraries.  Think of them as a set of shared instructions that applications go to when asked what to do.  Well in most cases these libraries are shared by multiple applications.  And, sometimes one application wants a vanilla library, and another wants a chocolate.  Well these apps will fight, and one of them will win and another one will lose.  By isolating them I can give them what they want so they don’t break the system, or each other.

Our company will also leverage App-v packages which are essentially virtualized installs of these applications that, although they run locally on the machine, they are actually virtualized (or encapsulated) and are separate from the actual operating system.  Xenapp and Thinapp do the same thing.  I’m particularly excited about application virtualization, it can come with a bit of overhead, but it’s nice and contained.

Ok, I stopped caring somewhere around chocolate and vanilla.

Yea I figured as much.  Either way, it is a tangible notch to my hard skill set and I’m glad that I was able to get it done.

 


 

 High point #3 Gospel in Life

What does a Gospel centered life look like?

What does it mean to be in the world but not of the world?

Is the Gospel as narrow minded to culture as people often proclaim it to be?

What does a Gospel centered community look like?

These are part of the current bible study I’m involved in with my brothers and sisters in Christ called Gospel in Life by Timothy Keller. It’s a great study that forces you to take a look at your heart, your life, and your community and compare it to what and how it is defined in the Gospel. I would recommend this study to anyone who is a believer. Even if the information isn’t new to you, as most of it hasn’t been for me, it’s still food for the soul. A reminder of the higher purpose we are called to as Christians.

Truthfully, I’d encourage non-believers as well to read this study. If for nothing else, than to hold Christians accountable to the teachings that we claim to believe.

 


 

High Point #4 Ignoring my Family

I’ve taken way to long to blog this, and my wife has informed me that I should blog about how I’ve ignored my family, to blog.

When she’s right she’s right.  Thank God for her gentle reminders.

 


/begin spill

I’m not really sure where to start on this, but I feel compelled to talk about how incredible my wife is. 

She consistently supports me when I feel like I’m in over my head.  She allows me to lead, and remains respectful in her dissent.  She maintains and controls what would other wise be anarchy in the home.  She’s an amazing mother, nurturing, and disciplining in equal and proper proportion.  Selfless in her service to her family.  She seeks to find what it is that brings myself and her children the most joy, and works towards those ends.  Her love is a beautiful and humbling thing to behold. 

My wife has a bead on me, and is truly my best friend.  She challenges me to push beyond what I would normally settle for, and is continually used to temper and humble me.  She’s the one person I want to go to bed with, and the one person I want to wake up next to.  I can’t imagine being apart from her, or trying to face this world without her.

Do we fight?  Yes.  Do we always agree?  No.  Do we both love God and trust him to lead us?  Yes.  Do we face trials? Yes.  Does that matter?  Yes. 

God knows what he is doing, and he knew what he was doing when he brought us together.  It pains me greatly that knowing joy through my wife, and my children, I would so quickly have (and did at times) settled for less growing up.  It also makes me realize, this joy pails in comparison to that which I will feel when in the presence of our father.

/end spill