Page 1 of 1

exp with MS SQL Server?

Posted: Tue Mar 21, 2006 12:35 am
by Xed
In the past I've worked with MySQL, which is much more on my level of stupidity. I have tables, and (maybe) stored procedures (if using 5.x).

In SQL Server I have all this crap: aggregates, views, user defined types, user defined *data* types, database triggers, other triggers, extended properties, certificates, oh my.
I'm a coder, not a db admin. I'm assuming I don't need to worry about most of this shit, but I'd like to at least know what it is, but I'm having trouble finding info. I'm not a total n00b to databases but the docs just don't do it for me.

I dont' have formal training in databases, I'm guessing this is why I don't know anything. I know at least one person here (Dave) mentioned using SQL Server before, but I'm sure others have used it. Can someone tell me at least what these things are:

1) aggregates

2) views

3) triggers

Posted: Tue Mar 21, 2006 12:47 am
by ^misantropia^
1) SELECT COUNT(*) FROM table <-- COUNT(*) is the aggregate

2) A custom-tailored way to restrict user access to a table based upon privileges, e.g. an employee can query the first name, last name and date of birth while a manager can also obtain the salary information.

3) Code stored in the database that gets executed when the entity it's attached to gets queried (triggered). The code can be executed before or after the actual query,

Posted: Tue Mar 21, 2006 3:36 am
by Xed
:icon14: awesome. thanks man.
I'm not sure that sufficiently explains aggregates but I think I can get the missing pieces from the docs.

Posted: Tue Mar 21, 2006 3:53 am
by mjrpes
MySQL 5 also has views. And views don't have to be used necessarily to limit user access; a view could be a common multi-table query that you use often enough that you want to keep it out of code.

Posted: Tue Mar 21, 2006 4:31 am
by R00k
[quote="^misantropia^"][/quote]

That pretty much sums it up.

Also, conceptually think of views as reports, without the pretty interface.