Posted in The Survey Project, SQL Server, data modeling

Rethinking & Redirecting

classic blunder memeI feel like I made the classic blunder. Well, one of the classic blunders at least. The good news is that I didn’t get involved in a land war in Asia or go against a Sicilian when death was on the line. But I did fall for one of the even lesser lesser known ones – I didn’t practice what I preach.

If I think about the main theme I’ve been talking about lately, it would be don’t just go through the motions of doing things but really think about why you’re doing what you’re doing. There are so many places where this applies in life and I really do think it’s important.

I feel like I’ve fallen down on that idea when it comes to this blog. Let me try to explain:

When I started, I gave myself a project based on a research paper I did in college. But I haven’t worked on it for a while now. It’s taken me some time but I think I figured out some of the road blocks I’ve been struggling with for a while. And I mean some of the problems that I was facing before I allowed the excuses of “I’ve been busy” or “I’m focusing more on speaking these days” to get in the way.

When I gave myself this project, I thought it would be good practice for building a database because I saw the potential of how it could be use. I wanted to use a database as a way to see the connections between the people who returned the survey: where they were from, what unit they served in, where they fought, who they served with, etc. The way I approached this was by taking each question, breaking it down, then building on what I came up with using the next question.

The biggest problem with this approach was that the questions aren’t written in a way to get standard answers. How do you extract the data for a relational database structure? Non-standard answers make it very hard to interpret the data points.

Another problem with the questions is that they were designed for the data to lean a certain way or left out information that a modern viewpoint needs. Unfortunately, some of that bias – especially in today’s world – makes it even harder. Some of the implications of these questions – even just having this as a subject in some cases – are beyond what I have the means to handle properly and to be honest, I’m still struggling a little about what to do with that.

By just using the questions alone dictate the database design allowed me to lose sight of what I was hoping to gain by doing this. I stopped focusing on why I was creating the database and I lost the direction I wanted to go with the project.

If I were to start over, I think I would take a different approach. Some ideas on how I might do this are:

  • I would clearly define the goals of the database:
    • As a historian, I want to see the statistics:
      • how many from the same regiment
      • how many from the same town
      • where did people enlist
    • As a genealogist, I want to be able to research family members –
      • find a particular person and find parent and grandparent information
      • find related members
      • be able to add known associations from outside sources or link these records to those 3rd party sources
  • I would divide the questions in a way to see which ones answer or partially fit into each of the goals listed above.
  • I would allow myself to modify questions in such a way that I could standardize the answers. Obviously, I can’t standardize the answers I have. But let’s face it – I’m taking something that was never designed for something like a standardized data model and forcing it into that. I have to make allowances. I’m not populating the data but creating logical models. If I had more time and more incentives, this may even be a case where using something like NoSQL databases could help create the standardization I don’t have. Plus AI may have option for interpreting the written responses and help interpret that and create data that would give us data for subjects such as literacy rates. But that’s much farther down the road than where I am; I’m just setting up the basic structure.
  • I would research other data sources where similar things have already been done to see if I can understand how those models have been set up. After one of my sessions where I mentioned this project, one of the attendees sent me a link to a similar project. Reading through that may give me some of the additional knowledge that I don’t have that can help me with this.

One of the reasons I started this project was so I could get better at database design. While I’m not working on this project directly, I have been doing sessions on database design, using first lines of a books or baseball as my examples. And I’ve enjoyed working on those.

However, I have a history of starting projects and not following through sometimes.(Would you like to see my “collection of craft supplies” or my poor neglected mandolin?) I’m not ready for this project to fall in that category. Even if I’m not working on it regularly, it is in the back of my mind and I am reminding myself to think about how I can make it better. It’s inspired me to do some of the sessions I’ve given. Maybe this just falls under one of those “Things don’t always go the way you expect them to.” But I’m not quite ready to give up but I’m not quite ready to start from scratch. It may take me a while, but I want to spend more time to figure it out what I want to do and where to take this. It’s hard work to do by yourself. Luckily, this project was for when I couldn’t find other projects to do or blog about and I definitely have found a lot of those.

So stay tuned… I’m using y’all to keep me accountable.

Advertisements
Posted in SQL Server, T-SQL Tuesday

Dear 20-Year-Old Me (T-SQL Tuesday #115)

Dear 20-Year-Old Deborah,

Hi there! Yep, you’re doing that thing – you’re writing that letter to your 20-year-old self. But you’re doing it as part of a good cause. There’s this thing called T-SQL Tuesday, which is a monthly blog party in the SQL Server community where someone brings up a topic and everyone blogs about it. This letter is in response to Mohammad Darab (b|t), who is hosting this month. (Thanks for hosting, Mohammad!) He’s the one who had the topic of writing your 20-year old self. You can read all about it on his blog if you want to know more.

So this means a couple of things. First, you have a blog! You don’t write posts as often as you want. But think about it – with your love of books and wanting to know more about editing and publishing, it’s kind of up your alley.

The second part is that you’ve taken an unexpected turn careerwise. You know how you want nothing to do with math and science right now? Surprise! You’re a techie working with databases – Microsoft SQL Server to be specific. You work with computers. Go math & science! The funnier thing is summer temp job you had last year pulling data into ACT! in order to create mail marketing campaigns actually was the start of what your career turns out to be. Who knew?

Before you panic that you are wasting your time studying English and History and try to remember where the COSI department is, just stop. What you love about bringing those two subjects together is the same thing that you love about working with databases and working with the programmers on their applications. You love understanding and seeing the history and how it affects the literature and your understanding of it. With databases, it’s understanding the context of data in the larger picture of what’s going on around it. And you still manage to find ways to bring your love of English and history into what you’re doing – from the idea of a project for your blog to how you pull together your presentations.

Mohammad asked that we give some advice or words of encouragement. So here’s what I have for you – not just in your career but in everything you decide to pursue:

  • First, trust yourself. You have really good instincts so listen to them.
  • Second, it’s OK to have ambitions. You’re very aware of wanting to give everyone a fair shake, which is a good thing. You will also invest yourself in the projects that you work on and take ownership and pride in your work. But you have things you want to do as well. Remember not to let being fair to everyone or your commitment to a project or two mean that you put yourself on hold or lock yourself in a position where you can’t move forward.
  • Third, you have permission to act on your instincts and ambitions. There are all sorts of articles that talk about how women wait for permission to move ahead or take risks or ask for projects, etc. So we end up holding ourselves back because someone else will come along and take them without asking or waiting. Looking back, I know that you will do this along the way in your life. So I want to give you permission not only to be trust your instincts and have ambition, but to use them and move yourself forward. Find your opportunities or make them yourself. Most importantly, don’t be scared to go after what you want.

Even as I give this advice, I can’t tell you that it’s still easier said than done. It’s still something I’m trying to do, which is why I think it’s worthwhile and why I want to pass it on.

At 20 years old, I don’t know if we ever really have an idea of how life will go or even where we want it to go. Some people knew they wanted to go to law school or med school or graduate school but that was never you. And that’s OK. This career as a database profession just finds you and it really suits you.

I don’t want to tell you too much of what’s happens between now and then. (You saw Back to the Future, you know what happens.) But you don’t have to worry because things fall into place. Enjoy the journey you’re on.

Love, Not 20-Year-Old Deborah

TSQL2SDAY-150x150

Posted in WIT

Thoughts for International Women’s Day 2019

20180922_083834I took the following picture of the Code of Conduct prominently displayed at the SQL Saturday Boston held in September. As I was clicking away, a woman passing by shouted over to me, “It’s a shame we need one of those things…” It stopped me in my tracks because it wasn’t what I expected to hear. It really has stuck with me ever since. I was taking the picture because some events get criticized for not having a code of conduct at all and here we were – prominently displaying ours. Which we thought was a good thing. But it made me think a little more about that whether the pride was misplaced.

It seems to me that one of the biggest reasons for code of conducts, especially at tech events, is because of the harassment of women who have attended the event in various forms. Anti-harassment policies apply to everyone but women seem to have traditionally borne the brunt of the problems which have made them necessary.

Organizers of events are left to make the decision on how to handle those who have been accused of harassing others at their events either as speakers or just attendees. But when so many of the events are decentralized, even when they are under a large umbrella organization, I think it’s hard for organizers – especially newer organizers – to know who these people are. There’s no central reporting system to cross check to see if someone has been kicked out of a similar event for violation of code of conducts. Organizers are left to rely on the “rumor mill” where you have to get the story in front of the right people and you have to trust that it’s getting around correctly. And because it’s people passing along these stories, it starts becoming harder and harder to guarantee. We all remember the childhood game of “telephone”, right?

Then there’s reconciling the stories with seeing these same people who violated code of conducts still being included as speakers or members of special programs by vendors or community, etc. Then you have to ask why are those people there? Is it because those stories were ignored or is it because those involved never heard them in the first place? Or do those in charge not have proper guidance in how to handle these situations?

A code of conduct gives us a place a start. Although let’s face it, we shouldn’t have to tell adults how to behave appropriately and respectfully at professional events. But the other problem with a code of conduct is that they often only apply to specific events. Or at least on the scale that most groups use. How do we handle issues that arise after events – the indecent proposals at an informal, after event dinner? The “mansplaining” emails? The harassing tweets? If you aren’t privy to those, how do you as an organizer decide what to do? And how can it be clear that those actions outside the events play into people’s decisions to attend them at all? There are some women who have publicly said they won’t go to events if they see people speaking or attending who have harassed them or others. How do we create events where everyone feels safe, comfortable, welcomed, and valued if we don’t know and don’t have the means to take the appropriate steps?

There has to be something better than word of mouth to share this information. I hope there is more about how this does get handled than I know. If that’s the case, we should have more transparency into how this gets handled on a larger scale.

I feel I have a lot more questions than answers around this, unfortunately. All I can do is to try and speak up when I can and to encourage others to do the same. Writing and editing this post right now, I wonder what missed opportunities I have had to bring these issues up and worked towards a solution. It’s not always an easy task and I’m not perfect so I just need to continue to work to be better. I can also do more to support those who do a better job of educating others and actively work on solutions to these problems on the larger platform than what I have.

When I started this blog almost 3 years ago, I decided I wanted to have a post for every International Women’s Day. I am a Woman in Technology so I think it’s important to share my thoughts about it since we all have our shared and differing experiences. I’ve always wondered if I’ve been too optimistic in my past posts. What I love about #sqlfamily and the SQL Server community is that they truly are dedicated to supporting WIT activities. (And we should strive to be this supportive for all of those who are underrepresented.) We are a diverse community and I believe that the vast majority of our community supports and celebrates that. That’s why I’m very optimistic about our little #sqlfamily corner of the tech world and I feel like that’s why I can focus on the support that’s given in our community rather than the problems. I can’t and don’t pretend issues don’t exist but I have hope that we have the tools and desire to make it better.

Back to the code of conduct – I agree with the attendee that it is a shame that they are needed. But it’s that first public step organizers can take to remind everyone that they are expected to act professionally and respectfully at all events. And, more importantly, inappropriate behavior and actions have consequences.

Posted in SQL Server

#TIL About Foreign Key Scripts

No matter how long you work with something, you can always find something that you never knew before. I found one about foreign keys this week.

I was reviewing SQL scripts for coworkers and I noticed that the foreign keys were written without referencing the parent table’s column. But the script didn’t fail and created the foreign keys correctly. So how did this work?

Continue reading “#TIL About Foreign Key Scripts”

Posted in SQL Server, T-SQL Tuesday

T-SQL Tuesday #110 – Automate all the things

TSQL2SDAY-150x150I’m getting the new year started by joining in the T-SQL Tuesday party. Thanks to Garry Bargsley (b | t) for hosting this month’s topic: Automate All the Things.

What stuck out most to me is when Garry asked the question:

What does “Automate All the Things” mean to you?

It’s not the real focus of what he’s asking us to talk about it, but I think it’s important to talk about. When I think of automation, I think of setting up routines that need to occur on a regular schedule. This means that you would automate system checks, backups, maintenance, etc. that run every night. In some ways, I see automation as a tool that helps with mainly administrative tasks.

Well I don’t work on the administrative side of the house. I work in development so I don’t have to deal with the day-to-day maintenance work that benefits from automation. Now, I do see automation used in other places in development – for example, unit tests that run every time a build is kicked off, QA automation tests, etc. I know database work can have unit tests but it’s somehow hasn’t filter down to the way that I have worked. (Yet.)

However, I have started to recognize when I have to do a series of steps over and over for a reason – usually involving resetting my environment for testing one thing or another. I’ve started collecting the small pieces together and started creating mini scripts so I can do these steps again. And I’ve started modifying them so I can make them work in any situation. For example, I need to move data between two databases but the database names may be different so I added a parameter and made the statements dynamic so I just need to supply the right database names. Or I created a simple PowerShell that has the list of commands to run to do those few steps instead of me doing them separately each time. It’s not always a lot of steps but this way I don’t accidentally mistype something or put something in the wrong place.

In many ways, this is part of setting up automation – identifying the repeatable actions and creating a mechanism to repeat those steps in a reliable way so I know every time I run the script, each action will work correctly. While I’m not scheduling them to run at a certain time – whether it’s a calendar or from some other action, it’s laying the foundation so that if I – or my coworkers – could ever automate these actions, the basic set of scripts is ready to go.

Most of my database work is still done using T-SQL scripts. Call me old-fashioned but I like using these scripts because I can use them directly in a query window in Management Studio or I can call them from PowerShell and I know I’m doing the same exact actions regardless of how I execute the script. I’ve started to use PowerShell more to run these scripts. I still feel like I’m learning PowerShell, but I’m definitely getting more comfortable and improving my skills. None of this may be the cutting edge technology but it gets the job done.

One day, I’ll probably be able to implement what I consider to be true automation. Who knows – maybe someone else will consider what I’m doing “true automation.” But until I can really automate these actions, being able to set things up so that will be possible will have to do.