Search Results for: nhibernate

Database Design Process

Buck Woody recently asked a question; how do you design a database. He outlined the process he followed and asked four questions about how each of us do our work: What process do you follow? How important are the business requirements? What tool do you use to create the design, do you need it to diagram, do you even care about diagrams? What's your biggest pain-point about designing? Funny enough, I haven't done a full on database design in over a year. My company just finished about 6 years of very hard-core engineering work, designing and building or redesigning and building, the majority of our data input and collection systems. Then, I was doing lots of design work. Now, we're either largely in maintenance mode for most of those systems, or the…
Read More

Connections Sessions Evals

I've kind of been embarassed to post these despite the fact that I received them a couple of weeks ago. Overall, I'd say they're very good, and I'm quite proud of them, but one comment still has me upset. Anyway, here we go: DMV's For Performance Tuning (same session as PASS): 7 responses Q1. Speaker's knowledge of topic Your average score for this session: 4.0 Highest score (all SQL speakers for this question): 4.0 Mean average score (all SQL speakers for this question): 3.74 Lowest score (all SQL speakers for this question): 3.0 Q2. Speaker's presentation skills Your average score for this session: 3.86 Highest score (all SQL speakers for this question): 4.0 Mean average score (all SQL speakers for this question): 3.47 Lowest score (all SQL speakers for this…
Read More

How do -You- use SQL Server

I've been tagged by a misplaced yankee, uh, New Englander, whatever. The question is, how do I/we use SQL Server where I work. That's a tough one. It would make a much shorter, and easier, blog post to describe the things we don't use it for. However, keeping with the spirit of these tags, I'll try to lay out it. For those that don't know, I work for a rather large insurance company. This means that we have lots and lots of databases, but not much data. We also are cheap. That means we'll run an app into the ground rather than spend the money & time to replace it. We have apps still running from the 70's and 80's propped up by ancient men with pocket protectors, spit, bailing wire…
Read More

Refining the Missing Index Data

In my previous post I showed how you could determine if a query had missing index information, but it was difficult to get meaningful data out because I didn't know XQuery well enough. I spent some more time refining the query and here are the results. This new query will show some basic performance information gathered from the aggregate data in sys.dm_exec_query_stats. It combines this with the full data pulled from the Missing Indexes element in the XML of the execution plan. I've got it listing all the recommended columns and grouping. So this means that the performance data is repeated in order to allow for the full listing of groups & columns. It seems to work well. A couple of interesting points. My purpose is to provide a short-cut…
Read More

SQL Quiz Part 2

Gee, thanks TJay. I have apparently been tagged to take part in a quiz started by Chris Shaw. It's an experiment in learning where a series of people answer the same question, hopefully spreading some useful knowledge. The question: What are the largest challenges that you have faced in your career and how did you overcome those? This is tough. You could answer based purely on technical issues, what was my toughest technical challenge. You could talk about career issues, tough bosses, ignorant co-workers, incompetent subordinates, clueless clients. You could also talk about shifting jobs as companies fail or are mismanaged or you move. You could also talk about missed opportunities, when you faced the large scale challenges and didn't quite rise to the occasion. Anyway... My Answers) 1) My…
Read More

Great Article on DBA-Developer Conflict

What a great way to phrase the issue. I love the concept of the people-people impedence mismatch. We're going through it pretty regularly where I work. Our developers are convinced that using an ORM tool, in this case nHibernate, they're eliminating all the problems with the database because they're taking complete control of the database through nHibernate. All code will be on their side of the fence, no more messy stored procedures. All data structures will look like their objects, no more having to figure out those silly JOINS. Best of all, by setting all this up, no more messing with those stupid and obnoxious DBA's. Unfortunately, they're still planning on object persistance (don't call it data storage) inside of a SQL Server database... Um, guys, you haven't eliminated a…
Read More

Query Fingerprints and Plan Fingerprints

SQL Server 2008 has been released, but the full capabilities of the product are still be discovered. This isn't a case of discovery so much as Microsoft, in the person of Bart Duncan, has shown us something new. Read the article. This is one of the most exciting things I've seen in a long time. It's especially exciting as we see databases becoming less and less manageable through the implementation of tools like nHibernate. As I noted in a previous post, nHibernate will create a lot of execution plans. With the capabilities here, we'll be able to easily and quickly aggregate some of those plans to identify the costly queries coming out of nHibernate without having to resort to 24 hour Profiler monitoring. Great stuff.
Read More

Easy Fix To Problem #1

I did a little bit, and I mean a little bit, of looking through the documentation on nHibernate and located a spot for the schema, actually  a couple of spots. It can be added to the Hibernate Mapping definition, which will make it a default for all classes within the definition, and by extension all the tables in the database you connect to. You can also add it to the class definition, specifying a particular schema for a given table. So now the query looks like this: exec sp_executesql N'INSERT INTO dbo.users (Name, Password, EmailAddress, LastLogon, LogonId) VALUES (@p0, @p1, @p2, @p3, @p4)',N'@p0 nvarchar(9),@p1 nvarchar(6),@p2 nvarchar(13),@p3 datetime,@p4 nvarchar(9)',@p0=N'Jane Cool',@p1=N'abc123',@p2=N'jane@cool.com',@p3='2008-04-25 11:11:48:000',@p4=N'jane_cool' On to the data length problem.
Read More

ORM Concerns

Object Relational Mapping (ORM) software is a great idea. You can't deny that the mismatch between objects and relational data has to be dealt with. Instead of all the time, money and effort being spent here, why not get a tool that does most of the work for you? But... One direction that this can lead is towards dumb databases. After all, if putting a piece of software between the object & the db makes things easier, how much easier if the db and the object look exactly the same. Ta-da! Even less code to write & maintain. Unfortunately, TANSTAAFL (There Ain't No Such Thing As A Free Lunch) still applies. What you save in initial coding you will pay for in reporting, data cleanup, integrity issues, data integration issues...…
Read More