0% found this document useful (0 votes)
21 views43 pages

Modul 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views43 pages

Modul 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

MICROSOFT SQL SERVER

FUNDAMENTALS

MODULE 1
➢ Overview of Database and DBMS
➢ Introduction to SQL Server and its Edition
➢ Exploring SQL Server Management Studio
Overview of Database
and DBMS
Data, Information, Metadata

CoLumnName DataType Length


Employee ID Int
Full_Name Varchar 255
Job_Title Varchar 255
Department Varchar 255
• Data : Meaningful facts, text, graphics, images, sound, video Business_Unit Varchar 255
• Information: Data processed to be useful in decision making and Gender Varchar 255
interpretation Ethnicity Varchar 255
• Metadata???? Age Int
Terminologies in Database
❑ Database: An organized collection of logically related data
❑ Field (data item):
• Smallest unit of information in database
• It is collection of related characters (numeric or alphabetic) that define
a characteristic of an entity (person, place or thing)
❑ Record:
• Fields are grouped together to form records.
• It is collection of related (logically connected) fields
❑ File: collection of similar types of records
Databases and DBMS
❑ Database: A very large, integrated collection of data.
❑ Examples: databases of customers, products,...
❑ There are huge databases out there, for satellite and other scientific data,
digitized movies,...; up to hexabytes of data (i.e., 1018 bytes)
❑ A database usually models (some part of) a real-world enterprise.
✓ Entities
✓ Relationship
❑ A Database Management System (DBMS) is a system software that
facilitates the management of a database and controls the access to the
data stored in the database.
Terminologies in Database (cont.)
❑ Database System: system consisting of a database, a DBMS,
hardware and people.
❑ Database Design: The design of the database structure that
will be used to store and manage data (not the design of the
DBMS).
❑ Data Dictionary (DD) or Metadata describes the
characteristics of data stored in a database and the inter-
relationships among data. Description of the properties or
characteristics of the data, including data types, field sizes,
allowable values, and documentation.
Disadvantage of File Processing
❑ Program-Data Dependence – All programs maintain
metadata for each file they use
❑ Data Redundancy (Duplication of data) – Different
systems/programs have separate copies of the same data
❑ Limited Data Sharing – No centralized control of data
❑ Lengthy Development Times – Programmers must design
their own file formats
❑ Excessive Program Maintenance – 80% of information
systems budget
Why Use a DBMS?
❑ Data independence and efficient access
You don’t need to know the implementation of the database to access data; queries are
optimized.
❑ Reduced application development time
Queries can be expressed declaratively; programmer doesn’t have to specify how they
are evaluated.
❑ Data integrity and security
Certain of constraints on the data are enforced automatically.
❑ Uniform data administration.
❑ Concurrent access, recovery from crashes
Many users can access/update the database at the same time without any interference.
DBMS
What is Data Modeling?
❑ Data modeling is the process of
creating a data model for the
data to be stored in a database.
❑ Data modeling helps in the visual
representation of data and
enforces business rules,
regulatory compliances, and
government policies on the data.
❑ Data Model is defined as an
abstract model that organizes
data description, data semantics,
and consistency constraints of
data
Data Model Components
❑ Entity Instance – Something about which we store data. For instance
person, place, object, event, concept (often corresponds to row in a table)
❑ Entity Type – Collection of entities (often corresponds to a table)
❑ Attribute – property or characteristic of an entity type (often correspond
to a field in a table)
❑ Relationship instance – link between entities (corresponds to primary
key/foreign key equivalences in related tables)
❑ Relationship type – Category of relationship… link between entity types
Example (1)
Example (2)
Example (3)
The Range of Database Applications (1)
❑ Personal Database – standalone desktop database
❑ Workgroup Database – local area network (< 25 users)
❑ Department Database – local area network (25-100 users)
❑ Enterprise Database – wide-area network (hundreds or thousands of
users)
The Range of Database Applications (2)

Workgroup

Enterprise
Exercise 1 (Waktu: 30 Menit)
❑ Case: Sistem Informasi Kepegawaian
❑ Sebutkan contoh entitas yang dapat digunakan pada rancangan database
sistem tersebut!
❑ Bagaimana relasi dari tiap entitas?
❑ Sebutkan contoh atribut dari tiap-tiap entitas!
Introduction to SQL
Server and its Edition
What is SQL Server?
❑ It is a software, developed by Microsoft, which is implemented from the
specification of RDBMS.
❑ It is also an ORDBMS.
❑ It is platform dependent.
❑ It is both GUI and command-based software.
❑ It supports SQL (SEQUEL) language which is an IBM product, non-
procedural, common database and case insensitive language
Usage of SQL Server
❑ To create databases.
❑ To maintain databases.
❑ To analyze the data through SQL Server Analysis Services (SSAS).
❑ To generate reports through SQL Server Reporting Services (SSRS).
❑ To carry out ETL operations through SQL Server Integration Services (SSIS)
SQL Server Features
❑ Data Storage and Management
❑ Security
❑ High Availability and Disaster Recovery
❑ Performance Tuning and Optimization
❑ Business Intelligence
❑ Scalability
❑ Cloud Integration
❑ Developer Tools
❑ Advanced Analytics
SQL Server Editions (1)
Edition Definition

Enterprise The premium offering, SQL Server Enterprise edition delivers comprehensive high-end
datacenter capabilities with blazing-fast performance, unlimited virtualization 1, and end-
to-end business intelligence, enabling high service levels for mission-critical workloads and
end-user access to data insight.

Standard SQL Server Standard edition delivers basic data management and business intelligence
database for departments and small organizations to run their applications and supports
common development tools for on-premises and cloud, enabling effective database
management with minimal IT resources.

Web SQL Server Web edition is a low total-cost-of-ownership option for Web hosters (including
choosing Web edition on IaaS on Azure) and Web VAPs to provide scalability, affordability,
and manageability capabilities for small to large-scale Web properties.
SQL Server Editions (2)
Edition Definition

Developer SQL Server Developer edition lets developers build any kind of application on top of SQL
Server. It includes all the functionality of Enterprise edition, but is licensed for use as a
development and test system, not as a production server. SQL Server Developer is an ideal
choice for people who build and test applications.

Express edition SQL Server Express edition is the entry-level, free database and is ideal for learning and
building desktop and small server data-driven applications. It is the best choice for
independent software vendors, developers, and hobbyists building client applications. If
you need more advanced database features, SQL Server Express can be seamlessly
upgraded to other higher end versions of SQL Server.
Scale Limits
Feature Enterprise Standard Web Express with Express
Advanced Services
Maximum compute Operating system Limited to lesser of 4 Limited to lesser of 4 Limited to lesser of 1 Limited to lesser of 1
capacity used by a maximum sockets or 24 cores sockets or 16 cores socket or 4 cores socket or 4 cores
single instance - SQL
Server Database
Engine
Maximum memory for Operating system 128 GB 64 GB 1410 MB 1410 MB
buffer pool per maximum
instance of SQL Server
Database Engine
Maximum memory for Unlimited memory 32 GB 16 GB 352 MB 352 MB
Columnstore segment
cache per instance of
SQL Server Database
Engine
Maximum memory- Unlimited memory 32 GB 16 GB 352 MB 352 MB
optimized data size per
database in SQL Server
Database Engine
Maximum relational 524 PB 524 PB 524 PB 10 GB 10 GB
database size
SQL Server Installation (1)
❑ Kunjungi link berikut: SQL Server Downloads | Microsoft
❑ Download SQL Server 2022 Express
SQL Server Installation (2)
❑ Pilih tipe instalasi “Basic” dan accept lisensi
SQL Server Installation (3)
❑ Klik Install
SQL Server Installation (4)
❑ Klik Install SSMS
❑ Setelah melakukan klik pada tombol install SSMS, maka halaman web untuk download akan
muncul di browser, yaitu Download SQL Server Management Studio (SSMS) - SQL Server
Management Studio (SSMS) | Microsoft Docs.
SQL Server Installation (5)
❑ Klik hasil download software SSMS → pastikan lokasi instalasi → klik
❑ Jika status instalasi SSMS sudah complete, maka akses database dapat dilakukan melalui SSMS
Exercise 2 (Waktu 1 Jam)
❑ Lakukan instalasi SQL server dan SSMS sesuai langkah-langkah yang telah
dijelaskan sebelumnya.
Exploring SQL Server
Management Studio
SSMS Features (1)
❑ Versi disesuaikan dengan hasil instalasi (20.1)
❑ Isi server name (biasanya sesuai dengan device
name) dan nama instance
❑ Login menggunakan windows authentication
SSMS Features (2)
➢ Object Explorer: tampilan pohon dari semua objek
database di server. Tampilan ini mencakup
database SQL Server Database Engine, SQL Server
Analysis Services, SQL Server Reporting Services,
dan SQL Server Integration Services. Object
Explorer menyertakan informasi untuk semua
server yang tersambung ke server tersebut.
SSMS Features (3)

➢ Jendela Kueri (Ctrl+N): Setelah Anda memilih Kueri Baru, masukkan


kueri Transact-SQL (T-SQL) Anda di jendela ini. Hasil kueri Anda juga
muncul di sini.
➢ Properti (F4): Anda dapat melihat tampilan Properti saat Jendela Kueri
terbuka. Tampilan menampilkan properti dasar kueri. Misalnya, ini
menunjukkan waktu kueri dimulai, jumlah baris yang dikembalikan, dan
detail koneksi.
SSMS Features (4)

➢ Browser Template (Ctrl+Alt+T): Browser Template ➢ detail Object Explorer (F7): Tampilan ini lebih terperinci
memiliki berbagai templat T-SQL bawaan. Anda bisa daripada tampilan di Object Explorer. Anda dapat
menggunakan templat ini untuk melakukan berbagai menggunakan detail Object Explorer untuk memanipulasi
fungsi, seperti membuat atau mencadangkan database. beberapa objek secara bersamaan. Misalnya, di jendela ini,
Anda dapat memilih beberapa database, lalu
menghapusnya atau membuat skrip secara bersamaan.
SSMS Features (5)

➢ Ubah tampilan dan konfigurasi melalui Tools > Options


➢ Contoh: untuk melakukan alter table melalui GUI, maka
opsi “Prevent saving changes that…” di uncheck
➢ Untuk mengembalikan tampilan ke setting semula maka
gunakan options> Import and Export Setting > Reset All
Quick Start (1)
➢ Membuat Database ➢ Klik Databases > New Database

➢ Buat Koneksi ke database


Quick Start (2)
➢ Isikan Nama Database > OK

➢ Buat table baru

➢ Klik icon save dan input nama tabel


‘Employee’
➢ Modifikasi script

Quick Start (3)


➢ Insert Data

➢ Eksekusi query
Quick Start (4)
➢ Cek hasil insert data
Exercise 3 (Waktu 30 Menit)
➢ Implementasikan rancangan database Anda sesuai dengan hasil Exercise 1
➢ Ikuti langkah-langkah pada penjelasan Quick Start SSMS
Questions & answers

You might also like