+ All Categories
Home > Documents > Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access...

Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access...

Date post: 20-Dec-2015
Category:
View: 217 times
Download: 0 times
Share this document with a friend
22
Course Goals • Introduce Terms • Skills – Modern DBMS (SQL Server 2008) – SQL querying and data access – Stored procedures including parameters – Brief introduction to using code to interact with dbms
Transcript
Page 1: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

Course Goals

• Introduce Terms

• Skills– Modern DBMS (SQL Server 2008)– SQL querying and data access– Stored procedures including parameters– Brief introduction to using code to interact with

dbms

Page 2: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

Information Resource Management

• What is a Database?

• Database vs. DBMS

• What are the Advantages of the Database Approach?

Page 3: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

Retail Sales with Computer System and Bar Codes

• “What Happens when you bar-code a can of beans at Walmart?

• Initial Goal: improve speed & accuracy of checkout – Wipe barcodes to get product ID – Look up price– Calculate total amount

Page 4: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

But with this information, we can do much more

• Reduce Errors– Happier customers

• Less skilled checkout people– No need to type #s or memorize prices

• Can change prices much faster• Checkout efficiency

– Credit Check– How fast people working

• Automatic Inventory Control– JustInTime Wholesale ordering – fedex option– Reduced inventory costs– Tax calculations for inventory

• Automatic Floor space v. sales calculations

Page 5: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

What Business Functions Represented by This Function?

• Sales and Marketing

• Logistics

• Operations

• Human Recourses

• Management

• Accounting

Page 6: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

Information Systems Management

• Data – Raw facts

• Information– Processed to be useful to particular users

Page 7: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

What is a Database?

• A database is a shared collection of logically related data to help multiple particular users solve multiple particular problems, possibly in the future, and as yet unknown

• A database management system (DBMS) is a tool to access a database

Page 8: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

Vision

• Database that contains ALL corporate data

Page 9: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

Hard to achieve in practiceDepartment DBs already exist

– Older non-homogeneous software• Even if not, have to start at department level to keep

tractable• Many often unwilling to start over

– Ego & $$• Different data organization and data dictionary

– E.g. how to store a name• Extra work for some departments so other departments can

do their job better– Turf wars

Page 10: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

Function of CIO• Operations Management

– Scheduling, Capacity planning, Operations security, Disaster recovery

• Quality Assurance• Communications Management

– Local/Wide area, Long haul• Data Resources Management

– Data analysis, Database design, Data administration, Database Administration

• Project Management• Corporate-Wide IS planning• Information Center• Systems development and Maintenance

Page 11: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

Centralized Database

• All data at a single site– Personal computer– Central Corporate database (big iron)– Client/Server on network

Page 12: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

DB Analysts and DB administration have to understand how organization

works

• DB analyst a good path to becoming a CIO

• Requires both solid business AND technical skills including coding and complex query writing.

Page 13: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

SQL Server Basics (Chapter 1)

• Overview of Database Objects– Database itself– Transaction log– Tables– Filegroups– Diagrams– Views

Page 14: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

Overview of Database Objects

• Indexes• Assemblies• Reports• Full-text Catalogs• User-defined data types

– e.g. ‘zip code’ instead of char(9)

• Roles• Users

Page 15: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

Four System Databases

• Master– Contains meta data about other databases

including user-defined databases

• Model– Template for creating of user-defined DBs

• Tempdb– Working area for server

• Don’t touch any of these

Page 16: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

MS Sample Databases

• AdventureWorksDW

• Pubs

• Northwinds

• We will use pubs and northwind as examples in this class

Page 17: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

Transaction Log

• Transaction is a set of operations that must happen together (more on this later in the course)

• Actions first written to transaction log.

• When that is complete, operations applied to database.

• Rollback and data recovery

Page 18: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

Objects within a Particular DB• Table

• Index– Clustered and non clustered

• Triggers

• Constraints

• Filegroups– All tables default to single file, but can be

changed to multiple files, disks, RAIDS, etc

Page 19: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

Objects within a Particular DB

• Diagrams (page 9)– Diagram to DB– DB to diagram (!!!)– Views

• Hard to update

– Stored procedures (e.g. subs w/ parameters)– User-defined functions– Users and Roles– Rules– Defaults– User-defined data types– Full-text (images?)

Page 20: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

SQL server data types

• See table page 12

• Note– Varchar– Nvarchar– Unique identifier– Conversion matrix

Page 21: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

NULLS (page 17)

• Means ‘don’t know’ but might also mean ‘not applicable’ – no way for others to tell

• Nulls are BAD

• Poor DB design sometimes leads to nulls!– If your database design requires nulls you are

doing something wrong

Page 22: Course Goals Introduce Terms Skills –Modern DBMS (SQL Server 2008) –SQL querying and data access –Stored procedures including parameters –Brief introduction.

NAMES• To know something’s true name is to be

able to control it (once and future king)

• Everything in sql server has a name (pg 17)

• SQL server naming rules (pg 18)

• My naming rules– Relations are plural– Attributes are generally singular– All lowercase– No SPACES!!! Or underscores (innercap)


Recommended