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

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Recently uploaded (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

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?