Teaching Kids Programming – Week One

Teaching Kids Tech

I started using Lynn Langit (Blog | Twitter) and crews’ material to teach programming to the local home schooling co-op. Wrapped up week one, the simple square, with 14 students in attendance. The material all came from Teaching Kids Tech and I love how easy they have made it. The program they use is Small Basic which runs off a USB drive that I unzipped from a package provided on the website.

Positives:

  1. Hearing the kids giggle, cheer and say “that was so cool”!
  2. Homework sheet I made with a how-to open the program at home.
  3. Free USBs from IHG – InterContinental Hotels Group.

Changes for Next Time:

  1. My time slot was 50 minutes. Definitely will tell them to make it a double session. I basically made it through the basic recipe, but there wasn’t any time to try many variations or do the quiz with them.
  2. Add to the Homework sheet a copy of the finished code from the class (or make it available online). The kids whose machines we were not using had to try to remember everything.
  3. Add to the Homework a simple explanation of different concepts – loop structures, variable assignments.
  4. I also want to look into creating a forum for them to chat with each other and share comments between classes.
Posted in TKP - Teaching Kids Programming, WIT | 2 Comments

Santa’s Knee

I FORGOT the best part of my SQL Saturday 61 experience!  John Welch asking Santa (aka SQLRockstar) for his Christmas present!

Santa's Knee

Posted in SQL Saturday | Leave a comment

Data Files and Transaction Logs Answers

I presented a session at SQL Saturday 61 on Data Files and Transaction Logs (Beyond the GUIs) in Washington DC, 4 Dec 2010. The files from the presentation can be found here.

Database Options Script

Some information that was discussed but not in the slides included a script I mentioned written by Buck Woody (Blog | Twitter) that he uses after database creation to set certain options. This article is in his SQL Server Reference Guide series posted on informIT. The article title is Database Design: Creating the Physical Database (a perfect tie to our discussion).

Online Resources

Shameless plugs were made to my local PASS chapter’s website – http://www.tripassBI.org. The events are listed on the main page with links to details. Opportunities are non-stop to access continuing learning. K. Brian Kelley (Blog | Twitter) also releases a Friday blog with the weeks upcoming activities.

LOBs and Table Scans

During the session we touched on the fact that LOB data is stored out of row and the advantages/disadvantages to storing that data in row. Someone asked the question “If the LOB column is not referenced in the SELECT query is it scanned and pulled into memory during a table scan operation.” I did some research on this using AdventureWorks database.

To find a LOB column first I ran this code (courtesy of stackoverflow):

Using this information I used the Production.ProductPhoto table to run my tests. Turning on statistics I was able to see the lob logical and physical reads.

On the Messages tab the results of the statistics display:

Obviously we have LOB data being read from the pages it resides on. The last query included the LOB data in the query so the next test was to query the data, causing a table scan (meaning I could not select just an index column). Since ModifiedDate is not indexed on the default table configuration I used this column to cause a table scan.

Resulting in statistics like:

There is a gotcha here. Notice that these results show no physical reads. This tells me that the table pages are still loaded in memory. SQL Server will keep those pages in memory until something else pushes them out. To ensure that the pages are flushed from memory we can use DBCC statements to flush the memory. Execute a CHECKPOINT to produce a cold bugger cache.

Notice this time we have physical reads of the table, but no LOB physical reads.

When I was researching this answer, Paul White (Blog | Twitter) also pointed out to me that the output list of the scan operator in the query plan can also be used, but this assumes you know by column name what you are LOB columns. I like the statistics process better, but this could help if a query needs the LOB field for another portion of the query.

Paul also developed a blog post that looks at a different scenario then I do in this post. I limited my answer to the question in the session concerning SELECTs and data pages. He brings up some other examples where updates containing LOBs in indexes would cause a lookup. Please read his post continuing this topic for more information!

Posted in DBA, SQL Saturday | Leave a comment

T-SQL Tuesday #13 – What the Business Says Is … Not Enough

This is my first jump into a T-SQL Tuesday post. The concept is a brain child of Adam Machanic (Blog | Twitter) that has taken the community by storm. This month Steve Jones (Blog | Twitter) is hosting the topic and he picked one we all fight with every day. “What issues have you had in interacting with the business to get your job done.” (original post)

I was hired by a company to implement Business Intelligence (BI) because BI is the future. It is the platform that they will use to analyze vendor performance. It is what they will use to analyze sales of product A over product B. So my job – implement BI. My non-stop question to them is WHAT? I know what BI is but getting them to give me specific processes to improve has been a challenge. Once I have them focused on a single process the next challenge is getting on the team. This one amazes me. I actually have been fighting to get into meetings. Crazy right?

Business Intelligence work is unique to me because I must, more than any other database arena, understand the business process. Not just the business process but the company’s specific terminology for the process elements. What is a vendor versus a sub-vendor? What is a customer and if they change addresses do we care to keep old and new? To know the answers to these questions you must understand the business process. Addresses changing, well it depends on which of the address changes – because ship-to is unique for every order. How did I learn that – going on deliveries with a truck driver and asking him lots of questions.

So my issue interacting with the business is to get in the meetings the business analysts have to define the processes. They think they are helping me, by doing the leg-work themselves and allowing me to keep developing the backend. The problem is that as a system implementer I have different questions about the data (like is it a slow changing dimension) or what values are acceptable for unit type. I am consistently seeking answers to define what they meant versus what they have. When I am not in the meetings I also cannot see what technology will fill a need. By not being in the meetings, I miss the opportunities to let the technology I love shine thru because I don’t know their expectations, just bullet lists of must haves.

Since Christmas is approaching and my neighbor’s son is asking for a car, I thought I would use him as a demonstration of communication failure between business and IT. (Hey someone already used the tire swing analogy!)

As an unrealistic 16 year old he dreams of something beautiful and shiny.

His father’s concept of what a teenage boy would want means what he gets will be something far lower than his expectations.

Now if only he had been in on the meetings – he might have negotiated something in the middle!

It is my job to fight for the chances to educate the business users on what I can do for them. For me to succeed I must continue to break down the walls that exist between IT and the business. Eventually my goal is for them to see IT as an integral voice in the process not an end game used to implement a final decision.

Interested in future T-SQL Tuesdays? Please read Adam Machanic’s blog on upcoming topics.

Posted in T-SQL Tuesday | Leave a comment

#SQLSat 61 in the Rear View Mirror

It’s Not About Me

This glance back is sorted in descending order because a piece grabbed at the end had the most impact on me personally. During the after lunch sessions I headed for the speaker room to see if the snow down south would affect my return home. The room was full of great people talking and I hung around listening while looking at the weather. After a few moments I realized that I still had a question to ask Andy Leonard (Blog | Twitter), but hadn’t seen him. I found him deep in conversation in the hall. After talking with me, he headed off to get ready for his session and before I could head back to the speaker room someone came up to me and asked a question. I spent quite a while offering advice and helping someone trying to transition into Business Intelligence, linking him to resources available and ideas on how to develop experience. Earlier in the day, after my session I was standing in the hall talking to some volunteers guarding the lunches when another attendee asked a question that started a conversation. And then there was this woman in the bathroom asking about performance tuning and if she should take a job even though that was a requirement she barely met.

Driving home it hit me. It is not about me. The best thing for me would be to sit in the speaker room and absorb as much as I could from some phenomenal people. The best thing I can do for the community and for those that attended is to stand in the hallways and be accessible.

Our Time

The speaker dinner was hosted by Confio and was a huge success. We ate at Big Bowl, which is not a bowling alley but an Asian and Thai restaurant. The food and drink was sensational. The room was cozy, forcing us to get close, stay long and talk much. This is a not miss session to this speaker. It gives me time to build sustaining friendships with great people like John Welch (Blog | Twitter) and Allen White (Blog | Twitter). If during the event is attendee time, this is my time to learn and build. Who wouldn’t want to know that there is a brewery in North Carolina that according to Allen I can enter on a Saturday, be handed a mug and continue drinking until they kick me out!

Promoting SQL Saturday’s as a Networking Opportunity

Due to an unexpected Santa 5K, the day was put on an official 15 minute delay. Standing at the podium waiting for my session to start I realized that most of those faces in the seats were looking down at the schedule or their phone. So I sent this tweet (and read it to the non-twitters):

The PASS Summit is a great networking event. That said SQL Saturday’s are phenomenal networking events. It is about the scale. There is so much happening and so many people to meet at PASS everyone is pulled in multiple directions. At a SQL Saturday there are 15-ish other speakers, volunteers and two to three hundred attendees. This means my chances of standing and talking to Matthew Velic (Blog | Twitter) and Brian Garraty (Blog | Twitter) for an hour are so high, it happened. The regional networking options of a SQL Saturday are a marketing aspect promoters should be exposing. Why do many of us go to PASS? When we mention why others should go to PASS what do we mention? We promote the free training available at a SQL Saturday heavily, but the attendee community is hungry for networking too!

Women in Technology (WIT) Forum

The women in technology forum lead by Karen Lopez (Blog | Twitter) was to a full room with conversation spilling over the time available. We started out mostly female, but the guys came and they talked more than I did! Near the end Karen asked what PASS WIT (Twitter | #passWIT | Web) physically can do for the community. Please provide any thoughts on this question to Karen (or here and I will gladly forward).

The thought I shared with her in the hall after the forum was to set up some mentoring. No, not to girls, teens or college students – mentoring for people already in the community. I know that I can help women starting out, and I also know that I can be helped through the influence of other women. There are thoughts to share that a male mentor just doesn’t consider. Last week I discussed with my new manager about a Christmas gathering. My reasoning for this is that after 3 months working in a small shop with all male co-workers I need to meet the wives. This is something I learnt in the military – not to be the nameless face that their husbands spend all day with (or deploy to Columbia with), instead to be a friend who they know.

#SQLSat 62 Up Next

December is in full swing. Now is the time to focus on family and friends. It is the time to celebrate our savior’s birth. Before I blink though, it will be time to head to Tampa Bay for SQL Saturday 62. Look for me in a hallway, happily making conversation!

Posted in SQL Saturday, WIT | 4 Comments

SQL Sat 61 Session – Database Files and Transaction Logs (Beyond the GUIs)

Do you know the size of a data page? Do you care about the size of a data page? If you answered no to either of these questions – you need this session!

I like to ask this question: Which database server is better Oracle or SQL Server? Unless I am at a SQL Saturday or with a dedicated SQL Server audience, most think Oracle is better. Hopefully we are changing this paradigm but here is my reasoning on this false perception: Oracle is better than many SQL Servers, not because of the server ability but because of the training and understanding the Oracle team has of their internals. We have too many databases designed and maintained thru right clicks. Right click to create a new database, a new table, a maintenance plan. The problem is that SQL Server has depth under that surface that must be understood to obtain a well performing application.

When training, my favorite addition to the material is during the conversation about database creation and table designs. I inject enough to see beyond the tip of the iceberg, the properties exposed in the GUIs, into the massive amount of options beneath. My hope is that I expose enough so those using SQL Server will want to search out more. My first experience with the OMG factor was during a Kimberly Tripp (Blog | Twitter) webcast, years after I had already been training and working with SQL Server. The permanent OMG was reading the first version of Kalen Delaney’s (Blog| Twitter | Books) Inside book!

In this session, I try to blast you with some of those OMG fundamentals I have learned through the years about Database Design. Is auto-grow bad? Why shouldn’t files be auto-shrunk? Why keep that free space in the files? How table structure effects use of memory. Why is the log file larger than the database file? If I talk fast enough we can explore why simple recovery mode still using a log!

Posted in SQL Saturday | Leave a comment

Women In Technology @ SQL Sat 61 – Shift Your Paradigm

Alright, before you don’t read this because of the title – give me a two paragraph chance. I thought the entire concept of a women’s meeting was completely stupid and only raised attention that we are different when I just wanted to blend in. I joined the military in 1990, first career field was maintenance. There was one other female working in the Maintenance Flight of 190 people when I started. I was the first female in the radar maintenance shop. The guys were very unnatural around me, and because of that stiff behavior and having to “behave” they didn’t want me around. It was hard to learn or be part of the team with such awkwardness. So, I found the best way was to be one of the guys. I would be the first to make a joke, use crass language or drink a beer at the bar. After a while the awkwardness would go away, the exclusion stopped and I was part of the team.

Then some women’s group would come along and mess it all up. There would be an EEO mandatory sermon from some male officer to the squadron, or worse a video that everyone watched. I never understood the point because my life was more miserable after they tried to help, every single time. The guys would go back to the stiff formal behavior, stop talking when I entered a room or just not include me when anything happened after hours. Outcast again I would be the first to make a joke, use crass language or drink a beer at the bar. After a while the awkwardness would go away, the exclusion stopped and I was part of the team. Then some women’s group (yeah – I felt like things were repeating for me too, for years)…

The worst time was after a women’s only meeting. I refused to go and was finally escorted by a First Sergeant to the room late. Because it was forced on me I sat in a corner, arms crossed, teeth clenched, out of the room before they finished saying dismissed. Many of you have been to those touchy feely meetings like the women’s only meeting I went to. In hindsight it wasn’t even touchy feely, I just resented it because I knew the hell it would bring down on me for months to come. The guys didn’t even know what was being said so the jokes were endless. That time I actually spent an hour in a dark warehouse, crying. That those women made that happen made me even angrier for feeling weakness and desperation. The attention that people kept bringing that pointed out the differences was torture to me.

The years past, more women joined the tech career fields, well more girls joined. I left full time military service and started training technology. I had to learn to handle the arrogant guys in the class who would try to correct me or answer other students’ questions. I handled this situation differently by knowing more than them, and using attire to gain more control. I stayed in the Air National Guard and started mentoring those airmen that followed my first journey. Things were better for them, with more numbers things became more common place. A woman wasn’t so much an abnormality. I started seeing those meetings from another perspective, from the perspective of a mentor trying to help. I still abhor the mandatory military approach to demanding equality, and I find great humor in someone from Human Resources telling me how to handle a team of men as if they have ever had to break that barrier (don’t shoot me for the generality).

Women In Technology to me is about several things. First, it is awesome to hear from others that came before me, to hear that my battles were not unique. There is something liberating knowing that you are not alone. Second, it is awesome to give advice or listen to someone breaking into the barrier. I handle it differently now than I did then, I stay true to me and I advise others to do the same. Third, it opens my eyes to what is happening in the world. There are less women graduating from college with technology career fields today than before. That amazes me! Think of the role models that teenage girls are exposed thru the media. It is a different environment then I was raised in, for sure dude! Fourth, seeing the men in the room listening and remarking on their dreams for their daughters; made me see the importance of including them in the conversation.

So, I ask all of you to attend a Women In Technology event. Guys just come and hear. Don’t be those guys ignorant because they aren’t in the room who end up making jokes that aren’t funny. Ladies, if like me you have gone through those torture sessions of old, blaming men for everything or the fact that we are female for anything, give this new time a chance. If you have never attended an event because like me you wanted to keep the harmony by not making the guys think you were a woman’s right freak, then come and discover we are not that, and bring the guys with you. If you just never thought you needed special attention as a woman then think of that next young girl, and how your experience might help her and maybe like me you might breathe easier when you realize you are not alone.

At SQL Saturday 61 in Washington DC the PASS Women In Technology (twitter | #passWIT) are having an event during lunch. Shift your paradigm by giving the forum chance. That’s all I can ask, give it a try.

Posted in Personal, SQL Saturday, WIT | Tagged | 4 Comments

SQL PASS – Here I Come

Sitting on a flight to Seattle (Saturday Night), sleepless, restless, eager.

There is a certain nervous excitement about this week that has me restless. It is more than all the superwomen that I am going to meet. More than the knowledge I will receive – it is an excitement about being around people that love this product; the concepts; the core of SQL Server like I do; people that have dedicated themselves to diving into an aspect of the product and in result becoming an MVP, expert or insanely smart geek. I can’t wait! So often when training I was surrounded by programmers that also taught SQL Server; or Windows Administrators who also taught SQL Server. Rarely was I around someone, like me, that just wanted to dive into this product alone. My last year training I paid for that – traveling 47 out of the 52 weeks, just so I could train only what I loved.

What happens when you don’t surround yourself with smarter, more fanatical people than you are? You become complacent and stagnant. I hate to admit it but I have been resting on my knowledge too long; it is past time for me to kick up my game. I want to get infected by the excitement from this room of fanatical people and then push myself like I haven’t since first diving into Business Intelligence after 2005 was released.

That said – I do not have a free moment on my calendar which leaves me no room out of sessions to talk and get infected J I even have up to 7 sessions slated for the same time period that I will need to pick between. Concerning those topics (and my last post) I have made some compromises. I changed my pre-con to Brian Knight’s (Blog | Twitter) SSIS full day session. Maybe that will help me reduce the x factor in my SSIS math (SSIS math = time I think it will take to do something x 4 (where 4 is the x factor)). Most of my sessions are all BI, and in my heart that is 1000% my focus for 2011, specifically SSAS and SSRS. I will leave the SSIS expertise to Andy Leonard (Blog | Twitter) happily! I did stick with Kimberly Tripp (Blog | Twitter) and Paul Randall’s (Blog | Twitter) post-con which was the compromise.

Wish me luck getting infected!

Posted in PASS Summit | Leave a comment

7 days till PASS Summit – Responsibility Fights Superwomen

Well, I leave for the PASS Summit in 7 days. This will be my first one and I am excited. I have been to conferences before, typically MCT Summits or T-Preps. The MCT gatherings have always left me fired up to learn more, do more and be more active. My best guess – this will be that, plus 1000%. The posts I see from speakers practicing sessions and tweaking slides to make them perfect promises insane amounts of information. The blogs I read from attendees that have gone for years, but are almost giddy with excitement has infected me. The antics I hear about concerning after hours and off times put a fear in me – how can you sustain that much energy for that many days? North Carolina has lolled me into a mellower state, need to get my New Englander game face on!

I have been to SQL Saturday’s and come away from those all fired up, but I rarely get the opportunity to just submerse myself in the experience. My friends tend to know I hate to sit on the sidelines and just enjoy, I prefer paddling the kayak down the river by volunteering or speaking. So my number one priority this summit – to absorb as much as I can, wring that out each night so that I can saturate the next day. I feel an additional responsibility because for the first time in 13 years, a company is paying to send me somewhere, not just money from my pocket. I feel a responsibility to get the most for their money.

That responsibility is seriously affecting my session decisions. I want to go see people that I have admired for years like Kimberly Tripp (Blog | Twitter), who got me started on data design fundamentals and my move away from programming. Kalen Delaney (Blog) helped me endure so many London trips with just an internals book, reading and re-reading, notes upon notes. Lynn Langit (Blog | Twitter) who finally helped me understand so many BI concepts, enabling me to start my switch from application development in 2005. I know my first three were all women, and yes that played into the fact that I watched and read them more. There are others like Itzik Ben-Gan (site) who has given me so much information that I have passed on to others, the why of the language that I knew the syntax to. Brent Ozar (Blog | Twitter) only recently hit my radar but his blogging articles have definitely affected me and I find myself reading his blogs every morning (I have many to catch up on).

How does any of that contribute to my session decisions, my responsibility? None of them are speaking on BI and I am full time BI now. (Well Lynn is part of the BI Powerhour, which happens to be the ONLY session I have in pen on my schedule.) So the quandary is giving up this great chance to hear in person these people that I have only been able to learn from afar versus taking home immediate information to help my job on Monday. So, with 7 days to go, I know one session I am attending. When I know how the rest turns out, I will let you know!

What is interesting is there is a list of friends that are high on the “heroes” list for others, and I am disrespecting them all by knowing I won’t be at their session. I have been extremely fortunate to share a beer and meal with some great people from the Eastern Region. I can’t wait until those I have listed are moved to the friend category, or at least the approachable category and not my superwomen and men.

Posted in PASS Summit, Personal | Leave a comment

SSAS Data Sources

I have been trying to break the ice with a blog for weeks now and decided to post something on a bullet I read today, that my cube data source could be affecting my MDX query speed. Say What? I dove a little into the topic and actually uncovered a couple of items that I have taken for granted for years.

Data Provider

When creating a new Data Source one of the first items you must define is the Provider, that small drop down at the top that we rarely think about. Here is some advice: think about it! SSAS is implemented in native mode. If you choose a .NET provider then SSAS will have to translate the .NET types to native code types during processing of the data. This overhead caused from marshaling the types will cause slower processing, will require more resources and could even affect query response time (ROLAP Queries).

Credentials

The next area that I see misrepresented so often concerns the account the data source will use. The one I see with misleading information most often is concerning – “use the credentials of the current user.” I read an article published today that said the account would need to have access to the data. You can use a sys admin, domain admin, or anything more powerful and your cube will still not process.

The Impersonation Information tab contains account information for connections required from the Analysis Services engine. Interestingly there are 9 different needs for this information:

A. Processing
B. ROLAP Queries
C. Local Cubes
D. Out-of-Line Bindings
E. Mining Models
F. Remote Partitions
G. Linked Objects
H. Synchronization from target to source
I. DMX OPENQUERY statement

So credential information affects which of the needs?

Use a specific user name and password:

  • Supported for everything except one item.
  • Not Used for DMX OPENQUERY is the only need unaffected by this account. Everything else will use the account you enter (Doman\User Name) but when a DMX OPENQUERY statement is executed the current users credentials are used.

Use Service Account:

  • Supported for — the Analysis Services service account will be used for A. Processing, B. ROLAP Queries, F. Remote Partition, G. Linked Objects and H. Synchronization from target to source.
  • Not Used for –the current user credentials will be used instead of the service account when performing C. Local Cubes, E. Mining Models and I. DMX OPENQUERY statement.
  • No Support for — D. Out-of-Line Bindings cannot be used and attempts will cause failure.

Use credentials of the current user:

  • Supported for — the current user credentials will be used for C. Local Cubes, D. Out-of-Line Bindings, E. Mining Models and I. DMX OPENQUERY Statement. (Local cubes do not mean local to the machine, it was a term used by SQL 2000 and Excel 2000 when Excel had a local copy of cube data.)
  • No Support for — with this setting, even if the current user is a Domain Admin or a SQL Server SysAdmin the cube will not process. (How many times I have picked this in my lazy testing and demo’s!) In Addition to A. Processing, B. ROLAP Queries, F. Remote Partitions, G. Linked Objects and H. Synchronization from target to source will also fail.

Inherit (listed as Default in BOL help):

  • Each database has an account that can be set as the “default user account” thru the database property Data Source Impersonation. When choosing inherit you will use the account set in this property. This is done in SSMS by right clicking the database and selecting properties:

  • I personally find it ironic that Data Source Impersonation Info is referred to as the Default in BOL and when setting up the Data Source, but it has a Default setting itself. I’m open to correction but my testing shows that the Default setting here is to use the service account. Why not just eliminate default and make this property set to use the service account is circular logic that I need to move beyond.

Summary

Thus ends my first official blog! So basically there is a little more to the credentials than first appeared and more to creating a data source then most of us give credit.

Posted in Analysis Services, BI | Leave a comment