SlideShare a Scribd company logo
1 of 39
Implementing the Database
        Server SW###

Session 1
Who am I?
Name : Guillermo Julca
Phone : 914-309-8412
Email : webmaster@gjp2s.com
Website : gjp2s.com
Best way to reach me is by Email!
What do I do?
Why am I here?
Class Info
Implementing the Database Server
MS SQL Server
SW###
#########, Room ###
Tuesday 6:30-9:30PM
Lecture/Lab format
SQL Server Versions
Class is based on SQL Server 2005.
Some concepts in the slides may refer to
previous versions of SQL Server - for
reference.
Most of the class will be applicable to any
database environment…
Texts

RECOMMENDED, not required. I do not
teach from a book.
Dewson, Beginning SQL Server 2005 for
Developers: From Novice to Professional.
Bowman et al, The Practical SQL Handbook
… or any other books you are comfortable
with!
SQL Server 2005 For YOU!

http://www.microsoft.com/sql/downloads/trial-so

180-day trial.
You can order a DVD for $5.99 + shipping.
Don’t dally – 3 weeks average delivery.
Will *NOT* install on Windows 95 or ME.
Previous students highly recommend this.
Good for mid-term and project.
Class Objectives
The student will understand the basics of
the Relational Database Model.
The student will learn Database
Administration functions as appropriate for
software developers.
The student will learn SQL.
The student will become familiar with the
entire implementation cycle of a client
server application.
And, you will build one.
Syllabus
Objectives
Schedule of Classes
Reading
Grading
Tentative?
What is a database?
Ideas?
What is a Database?
A collection of information.
The implication is that there is some
logical ordering of the data stored in it.
Databases are stored as one or more
files, on one or more disks, on one or
more computers.
What is a DBMS?
DataBase Management System
A software system that is responsible
for managing the data in the database.
Provides an interface through which
other software applications store and
retrieve data.
Secondary functions: Backup,
Distribution, etc.
SQL Server, Oracle, DB2, MySQL,
Access, etc.
Why use a database?
Permanent Storage.
Information is shared.
Provide synchronized access - locking.
Centralized security.
Backups.
Types of Databases - ‘Flat’ Files
 A single file on a disk.
 Access is sequential.
 Operations on large files require
 enormous amounts of memory (or are
 very slow).
 Locking is all or nothing - flagged.
 Security is based on operating system
 privileges.
 The original.
Types of Databases - Indexed
            Files
Start with a flat file. Each item of data is
the same size, and they are in any order.
A smaller external file exists which has
‘key’ data, and a pointer or ‘index’ into the
file.
Something like a table of contents.
File is accessed by an offset like an array
Data of varying sizes not easily modeled.
Types of Databases -
         Hierarchical
Data is organized as a tree.
Can use a single or multiple files.
The Windows Registry.
Network Database Model (structures that
contain pointers to structures).
Types of Databases - Relational
 Data is organized in tables.
 Tables consist of rows and columns.
 Tables with related information are linked,
 allowing for data integrity.
 Locking can go as low as the row level
 (field level?).
Type of Databases - Object
          Oriented
Classes define the data.
An instance of a class is an object.
Methods can be defined for classes that
contain the application logic.
Inheritance (subclasses) define data that
is related. Multiple inheritance allows for
wide variations in the types of
relationships.
Locking at the object level.
System Architecture -
          Mainframe
The database is on a mainframe.
The application is also on the mainframe.
Users access ‘dumb terminals’, which are
controlled by the mainframe.
Durable, reliable, centralized.
EXPENSIVE!
System Architecture - PC / File
The database and the DBMS are on the
PC.
4GLs define the application, which also
runs on the PC.
Optionally, the database is on the network.
Large amounts of network traffic.
Dbase, FoxPro, Access, etc.
System Architecture -
The database Client/Server a server (or
             and DBMS are on
set of severs).
Application logic is split between the client and
the server.
Less network traffic.
Allowed for complicated applications involving
multiple users on lower-cost equipment than a
mainframe.
Client/Sever - Fat Clients
The bulk of the application logic resides
on the client PC - the ‘workstation’.
Allows very complex logic to be
implemented using programming
languages.
Can be more difficult to design and
manage.
Requires application changes when
‘business rules’ change.
May require more network bandwidth.
Decision Support Systems, Expert
Client/Server - Fat Server
The server handles most business logic.
Little or no application changes required
when business rules change.
Uses ‘transactions’.
Implemented with referential integrity,
stored procedures, and constraints.
On-Line Transaction Processing (OLTP).
Systems where orders are processed.
Client/Server - ‘Mixed
         Environments’
A nice way to say somewhere in the
middle.
Generally, all but very specific systems
should be (and are) designed in this
manner.
Systems that combine OLTP and decision
support functionality.
System Architecture - Tiers
Client/Server is passé – the new paradigm (and buzzword) is
“n-tiered architecture”.
As systems that grow from diverse needs require information
from each other, there may be multiple Servers as well as
multiple clients.
In many cases the data from these servers is combined,
processed, or amalgamated on yet another “Server”. This
software is called middleware; the machine is often called a
broker.
A web server is sometimes considered a tier; in this case the
clients are browser-based, and the distribution of application
logic can be divided across multiple tiers (Client side scripts?
Server side ASP / Applets? Database sprocs?).
You can describe a “fat tier” or a “dense tier” – the opposite of a
thin tier or a passthrough tier.
System Architecture - SOAs
Service-Oriented Architectures.
SOAs are really free-from tiers with well-
defined interfaces. Each should be, or maintain
the appearance of being, self contained.
A service may have its own database; there
may be a single service that provides an
interface to the database.
Services may be client or server side,
whichever is appropriate.
Each database server may be considered a
service of its own…
Application Examples
Fat Client - the advertising system.
Fat Server - UPC generation.
Mixed Environment - Version
Management.
All are somewhat mixed…
Other examples?
Scalability
How big is too big?
What is the line between MySQL, SQL
Server, Oracle, and what lies beyond?
Factors:
– Size
– Security
– Usage (TPS)
– Money
– Performance Requirements
– Nature of Transactions (Locking Strategies)
The Relational Model.
Defined by Codd, 1969. (Jeopardy?)
We will:
– present the technical definition of each term.
– translate that to standard vocab.
This is useful for talking to Unix gurus and
academic types… but this is a Master’s
program...
Domains

A set of values.
Must be atomic - cannot be broken
down further with respect to the
purpose it is modeled for. For example,
FULL_NAME can be atomic, as well as
FIRST_NAME and LAST_NAME
depending on the purpose of the field.
Point is, you never want to use it as less
than the whole thing.
Domains
A domain has a data type and optionally a
name.
Data type may be a simple PL data type
such as integer or string, or may be
constrained in some way:
– strings with a maximum length of 20 chars.
– All integers less than 100.
– The name of any city containing an NFL team.
Domains
Giving a domain a name is similar to #typedef
in C - it allows you to change the values
allowed in a domain used in multiple places
with a single code change. Not a great idea if
you are defining tables?
Conceptually :
TEAM_NAME = CHAR[26]
SALARY_RANGE = {20000..200000}
If you want to allow for longer team names,
higher salaries...
Relation Schema
“Table Definition”
A name and a set of “attributes”
attribute = column
each attribute has a name and a domain.
the “degree of the relation” is the number
of columns in the table.
Relation Instance
Relation for short, or just Table.
an instance of a relation schema.
“a set of tuples, where a tuple is an
ordered list of values, and where each
value is in the domain of the
corresponding attributes in the relation
schema being instantiated, or is a
special null value”
a set of unique rows, where each row
has values that match the definition of
Null Values
Used to signify that either:
A value does not apply
– An apartment # of a person that lives in a
  house.
A value is unknown
– An unlisted phone #.
Comparisons to null values return
UNKNOWN, not TRUE or FALSE.
Keys

“by definition of a set, all tuples in a
relation must be distinct.”
No duplicate rows in a table.
a ‘superkey’ is a set of columns that are
unique in every row.
a ‘key’ is a superkey which cannot have
any more columns taken away from it
and still remain unique.
Primary Key
The primary key is a key that has been
chosen as the identifying key for that
table.
Usually, a synthetic value (customer
number, type id, etc.) is used. This
abstracts the real data from the key.
Example - product names.
Recap
relation schema - definition of a table
relation - table
attribute - column or field
tuple - row
superkey - set of columns guaranteed
unique.
key - a minimal superkey
primary key - the key used as an id for
a row.
Naming Conventions
Makes things easier to read.
Should be different than PL code.
My convention:
– All database objects and attributes in upper
  case using underscores.
– PL and PL/SQL variables in mixed, starting
  with lower
– Other PL names (Functions, Classes) in
  mixed starting with caps.
– Table names always singular
  (EMPLOYEE)
Lab
What is the SQL Server Management
Studio?

More Related Content

What's hot

SQL interview questions by jeetendra mandal - part 4
SQL interview questions by jeetendra mandal - part 4SQL interview questions by jeetendra mandal - part 4
SQL interview questions by jeetendra mandal - part 4jeetendra mandal
 
Naming in Distributed Systems
Naming in Distributed SystemsNaming in Distributed Systems
Naming in Distributed SystemsNandakumar P
 
Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)Vidyasagar Mundroy
 
Relational database- Fundamentals
Relational database- FundamentalsRelational database- Fundamentals
Relational database- FundamentalsMohammed El Hedhly
 
MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...
MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...
MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...Edureka!
 
Sql interview questions and answers
Sql interview questions and  answersSql interview questions and  answers
Sql interview questions and answerssheibansari
 
SQL interview questions jeetendra mandal - part 5
SQL interview questions jeetendra mandal - part 5SQL interview questions jeetendra mandal - part 5
SQL interview questions jeetendra mandal - part 5jeetendra mandal
 
SQL interview questions by Jeetendra Mandal - part 2
SQL interview questions by Jeetendra Mandal - part 2SQL interview questions by Jeetendra Mandal - part 2
SQL interview questions by Jeetendra Mandal - part 2jeetendra mandal
 
Advance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In DatabaseAdvance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In DatabaseSonali Parab
 
Structured query language
Structured query languageStructured query language
Structured query languageRashid Ansari
 

What's hot (16)

SQL interview questions by jeetendra mandal - part 4
SQL interview questions by jeetendra mandal - part 4SQL interview questions by jeetendra mandal - part 4
SQL interview questions by jeetendra mandal - part 4
 
Naming in Distributed Systems
Naming in Distributed SystemsNaming in Distributed Systems
Naming in Distributed Systems
 
Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)
 
Rdbms
RdbmsRdbms
Rdbms
 
Relational database- Fundamentals
Relational database- FundamentalsRelational database- Fundamentals
Relational database- Fundamentals
 
MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...
MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...
MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...
 
SQL for interview
SQL for interviewSQL for interview
SQL for interview
 
Sql interview questions and answers
Sql interview questions and  answersSql interview questions and  answers
Sql interview questions and answers
 
Data concepts
Data conceptsData concepts
Data concepts
 
SQL interview questions jeetendra mandal - part 5
SQL interview questions jeetendra mandal - part 5SQL interview questions jeetendra mandal - part 5
SQL interview questions jeetendra mandal - part 5
 
SQL interview questions by Jeetendra Mandal - part 2
SQL interview questions by Jeetendra Mandal - part 2SQL interview questions by Jeetendra Mandal - part 2
SQL interview questions by Jeetendra Mandal - part 2
 
Advance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In DatabaseAdvance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In Database
 
Sql basics
Sql basicsSql basics
Sql basics
 
SQL
SQL SQL
SQL
 
Structured query language
Structured query languageStructured query language
Structured query language
 
Ebook12
Ebook12Ebook12
Ebook12
 

Similar to Implementing the Database Server session 01

Introduction to sql server
Introduction to sql serverIntroduction to sql server
Introduction to sql serverVinay Thota
 
Relational Database.pptx
Relational Database.pptxRelational Database.pptx
Relational Database.pptxSubhamSarkar64
 
Data massage! databases scaled from one to one million nodes (ulf wendel)
Data massage! databases scaled from one to one million nodes (ulf wendel)Data massage! databases scaled from one to one million nodes (ulf wendel)
Data massage! databases scaled from one to one million nodes (ulf wendel)Zhang Bo
 
Pandas vs. SQL – Tools that Data Scientists use most often.pdf
Pandas vs. SQL – Tools that Data Scientists use most often.pdfPandas vs. SQL – Tools that Data Scientists use most often.pdf
Pandas vs. SQL – Tools that Data Scientists use most often.pdfData Science Council of America
 
NOSQL and MongoDB Database
NOSQL and MongoDB DatabaseNOSQL and MongoDB Database
NOSQL and MongoDB DatabaseTariqul islam
 
Data massage: How databases have been scaled from one to one million nodes
Data massage: How databases have been scaled from one to one million nodesData massage: How databases have been scaled from one to one million nodes
Data massage: How databases have been scaled from one to one million nodesUlf Wendel
 
Brief introduction to NoSQL by fas mosleh
Brief introduction to NoSQL by fas moslehBrief introduction to NoSQL by fas mosleh
Brief introduction to NoSQL by fas moslehFas (Feisal) Mosleh
 
Finding your Way in the Midst of the NoSQL Haze - Abdelmonaim Remani
Finding your Way in the Midst of the NoSQL Haze - Abdelmonaim RemaniFinding your Way in the Midst of the NoSQL Haze - Abdelmonaim Remani
Finding your Way in the Midst of the NoSQL Haze - Abdelmonaim RemaniJAXLondon2014
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12kaashiv1
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12kaashiv1
 
Sql interview question part 5
Sql interview question part 5Sql interview question part 5
Sql interview question part 5kaashiv1
 

Similar to Implementing the Database Server session 01 (20)

nosql.pptx
nosql.pptxnosql.pptx
nosql.pptx
 
Introduction to sql server
Introduction to sql serverIntroduction to sql server
Introduction to sql server
 
Cassandra data modelling best practices
Cassandra data modelling best practicesCassandra data modelling best practices
Cassandra data modelling best practices
 
Relational Database.pptx
Relational Database.pptxRelational Database.pptx
Relational Database.pptx
 
Data massage! databases scaled from one to one million nodes (ulf wendel)
Data massage! databases scaled from one to one million nodes (ulf wendel)Data massage! databases scaled from one to one million nodes (ulf wendel)
Data massage! databases scaled from one to one million nodes (ulf wendel)
 
Dbms Basics
Dbms BasicsDbms Basics
Dbms Basics
 
Pandas vs. SQL – Tools that Data Scientists use most often.pdf
Pandas vs. SQL – Tools that Data Scientists use most often.pdfPandas vs. SQL – Tools that Data Scientists use most often.pdf
Pandas vs. SQL – Tools that Data Scientists use most often.pdf
 
Codds rules & keys
Codds rules & keysCodds rules & keys
Codds rules & keys
 
DB2 on Mainframe
DB2 on MainframeDB2 on Mainframe
DB2 on Mainframe
 
DBMS Full.ppt
DBMS Full.pptDBMS Full.ppt
DBMS Full.ppt
 
NOSQL and MongoDB Database
NOSQL and MongoDB DatabaseNOSQL and MongoDB Database
NOSQL and MongoDB Database
 
Data massage: How databases have been scaled from one to one million nodes
Data massage: How databases have been scaled from one to one million nodesData massage: How databases have been scaled from one to one million nodes
Data massage: How databases have been scaled from one to one million nodes
 
No sq lv2
No sq lv2No sq lv2
No sq lv2
 
NoSql Database
NoSql DatabaseNoSql Database
NoSql Database
 
Brief introduction to NoSQL by fas mosleh
Brief introduction to NoSQL by fas moslehBrief introduction to NoSQL by fas mosleh
Brief introduction to NoSQL by fas mosleh
 
Finding your Way in the Midst of the NoSQL Haze - Abdelmonaim Remani
Finding your Way in the Midst of the NoSQL Haze - Abdelmonaim RemaniFinding your Way in the Midst of the NoSQL Haze - Abdelmonaim Remani
Finding your Way in the Midst of the NoSQL Haze - Abdelmonaim Remani
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12
 
Ebook5
Ebook5Ebook5
Ebook5
 
Sql interview question part 5
Sql interview question part 5Sql interview question part 5
Sql interview question part 5
 

Recently uploaded

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Recently uploaded (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

Implementing the Database Server session 01

  • 1. Implementing the Database Server SW### Session 1
  • 2. Who am I? Name : Guillermo Julca Phone : 914-309-8412 Email : webmaster@gjp2s.com Website : gjp2s.com Best way to reach me is by Email! What do I do? Why am I here?
  • 3. Class Info Implementing the Database Server MS SQL Server SW### #########, Room ### Tuesday 6:30-9:30PM Lecture/Lab format
  • 4. SQL Server Versions Class is based on SQL Server 2005. Some concepts in the slides may refer to previous versions of SQL Server - for reference. Most of the class will be applicable to any database environment…
  • 5. Texts RECOMMENDED, not required. I do not teach from a book. Dewson, Beginning SQL Server 2005 for Developers: From Novice to Professional. Bowman et al, The Practical SQL Handbook … or any other books you are comfortable with!
  • 6. SQL Server 2005 For YOU! http://www.microsoft.com/sql/downloads/trial-so 180-day trial. You can order a DVD for $5.99 + shipping. Don’t dally – 3 weeks average delivery. Will *NOT* install on Windows 95 or ME. Previous students highly recommend this. Good for mid-term and project.
  • 7. Class Objectives The student will understand the basics of the Relational Database Model. The student will learn Database Administration functions as appropriate for software developers. The student will learn SQL. The student will become familiar with the entire implementation cycle of a client server application. And, you will build one.
  • 9. What is a database? Ideas?
  • 10. What is a Database? A collection of information. The implication is that there is some logical ordering of the data stored in it. Databases are stored as one or more files, on one or more disks, on one or more computers.
  • 11. What is a DBMS? DataBase Management System A software system that is responsible for managing the data in the database. Provides an interface through which other software applications store and retrieve data. Secondary functions: Backup, Distribution, etc. SQL Server, Oracle, DB2, MySQL, Access, etc.
  • 12. Why use a database? Permanent Storage. Information is shared. Provide synchronized access - locking. Centralized security. Backups.
  • 13. Types of Databases - ‘Flat’ Files A single file on a disk. Access is sequential. Operations on large files require enormous amounts of memory (or are very slow). Locking is all or nothing - flagged. Security is based on operating system privileges. The original.
  • 14. Types of Databases - Indexed Files Start with a flat file. Each item of data is the same size, and they are in any order. A smaller external file exists which has ‘key’ data, and a pointer or ‘index’ into the file. Something like a table of contents. File is accessed by an offset like an array Data of varying sizes not easily modeled.
  • 15. Types of Databases - Hierarchical Data is organized as a tree. Can use a single or multiple files. The Windows Registry. Network Database Model (structures that contain pointers to structures).
  • 16. Types of Databases - Relational Data is organized in tables. Tables consist of rows and columns. Tables with related information are linked, allowing for data integrity. Locking can go as low as the row level (field level?).
  • 17. Type of Databases - Object Oriented Classes define the data. An instance of a class is an object. Methods can be defined for classes that contain the application logic. Inheritance (subclasses) define data that is related. Multiple inheritance allows for wide variations in the types of relationships. Locking at the object level.
  • 18. System Architecture - Mainframe The database is on a mainframe. The application is also on the mainframe. Users access ‘dumb terminals’, which are controlled by the mainframe. Durable, reliable, centralized. EXPENSIVE!
  • 19. System Architecture - PC / File The database and the DBMS are on the PC. 4GLs define the application, which also runs on the PC. Optionally, the database is on the network. Large amounts of network traffic. Dbase, FoxPro, Access, etc.
  • 20. System Architecture - The database Client/Server a server (or and DBMS are on set of severs). Application logic is split between the client and the server. Less network traffic. Allowed for complicated applications involving multiple users on lower-cost equipment than a mainframe.
  • 21. Client/Sever - Fat Clients The bulk of the application logic resides on the client PC - the ‘workstation’. Allows very complex logic to be implemented using programming languages. Can be more difficult to design and manage. Requires application changes when ‘business rules’ change. May require more network bandwidth. Decision Support Systems, Expert
  • 22. Client/Server - Fat Server The server handles most business logic. Little or no application changes required when business rules change. Uses ‘transactions’. Implemented with referential integrity, stored procedures, and constraints. On-Line Transaction Processing (OLTP). Systems where orders are processed.
  • 23. Client/Server - ‘Mixed Environments’ A nice way to say somewhere in the middle. Generally, all but very specific systems should be (and are) designed in this manner. Systems that combine OLTP and decision support functionality.
  • 24. System Architecture - Tiers Client/Server is passé – the new paradigm (and buzzword) is “n-tiered architecture”. As systems that grow from diverse needs require information from each other, there may be multiple Servers as well as multiple clients. In many cases the data from these servers is combined, processed, or amalgamated on yet another “Server”. This software is called middleware; the machine is often called a broker. A web server is sometimes considered a tier; in this case the clients are browser-based, and the distribution of application logic can be divided across multiple tiers (Client side scripts? Server side ASP / Applets? Database sprocs?). You can describe a “fat tier” or a “dense tier” – the opposite of a thin tier or a passthrough tier.
  • 25. System Architecture - SOAs Service-Oriented Architectures. SOAs are really free-from tiers with well- defined interfaces. Each should be, or maintain the appearance of being, self contained. A service may have its own database; there may be a single service that provides an interface to the database. Services may be client or server side, whichever is appropriate. Each database server may be considered a service of its own…
  • 26. Application Examples Fat Client - the advertising system. Fat Server - UPC generation. Mixed Environment - Version Management. All are somewhat mixed… Other examples?
  • 27. Scalability How big is too big? What is the line between MySQL, SQL Server, Oracle, and what lies beyond? Factors: – Size – Security – Usage (TPS) – Money – Performance Requirements – Nature of Transactions (Locking Strategies)
  • 28. The Relational Model. Defined by Codd, 1969. (Jeopardy?) We will: – present the technical definition of each term. – translate that to standard vocab. This is useful for talking to Unix gurus and academic types… but this is a Master’s program...
  • 29. Domains A set of values. Must be atomic - cannot be broken down further with respect to the purpose it is modeled for. For example, FULL_NAME can be atomic, as well as FIRST_NAME and LAST_NAME depending on the purpose of the field. Point is, you never want to use it as less than the whole thing.
  • 30. Domains A domain has a data type and optionally a name. Data type may be a simple PL data type such as integer or string, or may be constrained in some way: – strings with a maximum length of 20 chars. – All integers less than 100. – The name of any city containing an NFL team.
  • 31. Domains Giving a domain a name is similar to #typedef in C - it allows you to change the values allowed in a domain used in multiple places with a single code change. Not a great idea if you are defining tables? Conceptually : TEAM_NAME = CHAR[26] SALARY_RANGE = {20000..200000} If you want to allow for longer team names, higher salaries...
  • 32. Relation Schema “Table Definition” A name and a set of “attributes” attribute = column each attribute has a name and a domain. the “degree of the relation” is the number of columns in the table.
  • 33. Relation Instance Relation for short, or just Table. an instance of a relation schema. “a set of tuples, where a tuple is an ordered list of values, and where each value is in the domain of the corresponding attributes in the relation schema being instantiated, or is a special null value” a set of unique rows, where each row has values that match the definition of
  • 34. Null Values Used to signify that either: A value does not apply – An apartment # of a person that lives in a house. A value is unknown – An unlisted phone #. Comparisons to null values return UNKNOWN, not TRUE or FALSE.
  • 35. Keys “by definition of a set, all tuples in a relation must be distinct.” No duplicate rows in a table. a ‘superkey’ is a set of columns that are unique in every row. a ‘key’ is a superkey which cannot have any more columns taken away from it and still remain unique.
  • 36. Primary Key The primary key is a key that has been chosen as the identifying key for that table. Usually, a synthetic value (customer number, type id, etc.) is used. This abstracts the real data from the key. Example - product names.
  • 37. Recap relation schema - definition of a table relation - table attribute - column or field tuple - row superkey - set of columns guaranteed unique. key - a minimal superkey primary key - the key used as an id for a row.
  • 38. Naming Conventions Makes things easier to read. Should be different than PL code. My convention: – All database objects and attributes in upper case using underscores. – PL and PL/SQL variables in mixed, starting with lower – Other PL names (Functions, Classes) in mixed starting with caps. – Table names always singular (EMPLOYEE)
  • 39. Lab What is the SQL Server Management Studio?