Lecturer: Eng. Mohamed Adam Isak PH.D Researcher in CS. M.Sc. and B.Sc. of Information Technology Engineering Senior Lecturer in University of Somalia,

Slides:



Advertisements
Similar presentations
1 Başar Öztayşi 2011 END 213E Data Processing in Industrial Systems SQL Structured Query Language.
Advertisements

SQL This presentation will cover: A Brief History of DBMS View in database MySQL installation.
Introduction to Structured Query Language (SQL)
B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
Introduction to Structured Query Language (SQL)
System Administration Accounts privileges, users and roles
Introduction to Structured Query Language (SQL)
1ISM - © 2010 Houman Younessi Lecture 3 Convener: Houman Younessi Information Systems Spring 2011.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Akhila Kondai October 30, 2013.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
Database Lecture # 1 By Ubaid Ullah.
Chapter 9 SQL and RDBMS Part C. SQL Copyright 2005 Radian Publishing Co.
ASP.NET Programming with C# and SQL Server First Edition
Learningcomputer.com SQL Server 2008 – Introduction to Transact SQL.
LOGO 1 Lab_02: Basic SQL. 2 Outline  Database Tables  SQL Statements  Semicolon after SQL Statements?  SQL DML and DDL  SQL SELECT Statement  SQL.
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
 SQL stands for Structured Query Language.  SQL lets you access and manipulate databases.  SQL is an ANSI (American National Standards Institute) standard.
Structured Query Language. SQL is an ANSI (American National Standards Institute) standard computer language for accessing and manipulating database systems.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
1 SQL Server 2000 Administration Kashef Mughal MSB.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
1 What is database 2? What is normalization? What is SQL? What is transaction?
Structure Query Language SQL. Database Terminology Employee ID 3 3 Last name Small First name Tony 5 5 Smith James
1 Theory, Practice & Methodology of Relational Database Design and Programming Copyright © Ellis Cohen Introduction to Relational Databases &
Chapter 5: Part 1: DDL STRUCTURED QUERY LANGUAGE (SQL)
“INTRODUCTION TO DATABASE AND SQL”. Outlines 2  Introduction To Database  Database Concepts  Database Properties  What is Database Management System.
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Chapter 10: The Data Tier We discuss back-end data storage for Web applications, relational data, and using the MySQL database server for back-end storage.
6 1 Lecture 8: Introduction to Structured Query Language (SQL) J. S. Chou, P.E., Ph.D.
SQL Unit – 2 Base Knowledge Presented By Mr. R.Aravindhan.
Oracle & SQL Introduction. Database Concepts Revision DB? DBMS? DB Application? Application Programs? DBS? Examples of DBS? Examples of DBMS? 2Oracle.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
1 DBS201: Introduction to Structure Query Language (SQL) Lecture 1.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
SQL. คำสั่ง SQL SQL stands for Structured Query Language is a standard language for accessing and manipulating databases.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
Module Review Basic SQL commands: Create Database, Create Table, Insert and Select 2. Connect an SQL Database to PHP 3. Execute SQL Commands in.
SQL.. AN OVERVIEW lecture3 1. Overview of SQL 2  Query: allow questions to be asked of the data and display only the information required. It can include.
ITS232 Introduction To Database Management Systems Siti Nurbaya Ismail Faculty of Computer Science & Mathematics, Universiti Teknologi MARA (UiTM), Kedah.
IS6146 Databases for Management Information Systems Lecture 1: Introduction to IS6146 Rob Gleasure robgleasure.com.
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
Intro To Oracle :part 1 1.Save your Memory Usage & Performance. 2.Oracle Login ways. 3.Adding Database to DB Trees. 4.How to Create your own user(schema).
SQL Introduction to database and SQL. Chapter 1: Databases and Database Users 6 Introduction to Databases Databases touch all aspects of our lives. Examples:
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
LM 5 Introduction to SQL MISM 4135 Instructor: Dr. Lei Li.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
Enterprise Database Systems Introduction to SQL Server Dr. Georgia Garani Dr. Theodoros Mitakos Technological.
SQL Basics Review Reviewing what we’ve learned so far…….
SQL Structured Query Language. SQL is an ANSI (American National Standards Institute) standard computer language for accessing and manipulating database.
 MySQL is a database system used on the web  MySQL is a database system that runs on a server  MySQL is ideal for both small and large applications.
Presented by: K.AMARNATH Ht.no:10841f0045 Guided by: T.Suneetha.
Aga Private computer Institute Prepared by: Srwa Mohammad
Web Systems & Technologies
Module T03d Software Engineering
CHAPTER 7 DATABASE ACCESS THROUGH WEB
“Introduction To Database and SQL”
“Introduction To Database and SQL”
SQL Queries Chapter No 3.
SQL .. An overview lecture3.
Introduction To Structured Query Language (SQL)
Structured Query Language
Lecuter-1.
Presentation transcript:

Lecturer: Eng. Mohamed Adam Isak PH.D Researcher in CS. M.Sc. and B.Sc. of Information Technology Engineering Senior Lecturer in University of Somalia, Mogadishu university and Dar-al-Hikma university Tell: February –July 2016 SQL SERVER DATABASES

LECTURE 1. BASIC CONCEPT OF SQL SERVER

Outlines Eng.Mohamed Adam Isak, Ph.D. Researcher 3  Why SQL Server?  How do I know if my hardware meets the requirements?  Can I just confirm that I have the right operating system?  What can I do with SQL Server?  Installing SQL Server on a Windows platform  Where to install SQL Server physically  How SQL Server runs on a machine  How security is implemented  Logon IDs for SQL Server, especially the sa (system administrator) logon

Overview Eng.Mohamed Adam Isak, Ph.D. Researcher 4  SQL stands for Structured Query Language  SQL lets you access and manipulate databases  SQL is an ANSI (American National Standards Institute) standard.  SQL Server is used by:  Database Administrator (DBA)  Programmers  SQL Literate End-users  Application Programs

Why SQL Server? Eng.Mohamed Adam Isak, Ph.D. Researcher 5  SQL Server faces competition from other databases, not only from other Microsoft products such as Microsoft Access and Microsoft Visual FoxPro, but also from competitors such as Oracle, Sybase, DB2, and Informix, to name a few.  Microsoft Access is found on a large number of PCs. The fact that it is packaged with some editions of Office and has been around for a number of years in different versions of Office has helped make this database ubiquitous; in fact, a great number of people actually do use the software. Unfortunately, it does have its limitations when it comes to scalability, speed, and flexibility, but for many small, in- house systems, these areas of concern are not an issue, as such systems do not require major database functionality.  Oracle isn’t as user friendly from a developer’s point of view.  Then there is Sybase. Yes, i t is very much like SQL Server with one major exception: it has no GUI front end.

Why SQL Server? Eng.Mohamed Adam Isak, Ph.D. Researcher 6  Each database has its own SQL syntax, although they all will have the same basic SQL syntax, known as the ANSI-92 standard. This means that the syntax for retrieving data, and so on, is the same from one database to another.  However, each database has its own special syntax to maintain it, and trying to use a feature from this SQL syntax in one database may not work, or may work differently, in another.  So SQL Server seems to be the best choice in the database marketplace, and in many scenarios it is.  It can be small enough for a handful of users, or large enough for the largest corporations. It doesn’t need to cost as much as Oracle or Sybase, but it does have the ability to scale up and deal with terabytes of data without many concerns.  As you will see, it is easy to install, as it comes as one complete package for most of its functionality, with a simple install to be performed for the remaining areas if required

Evolution of SQL Server (1/2)  SQL Server has evolved over the years into the product it is today. 7 Eng.Mohamed Adam Isak, Ph.D. Researcher

Evolution of SQL Server (2/2) Eng.Mohamed Adam Isak, Ph.D. Researcher 8

Hardware Requirements Eng.Mohamed Adam Isak, Ph.D. Researcher 9  CPU  The minimum recommended CPU that SQL Server will run on is a 1GHz processor for the 32-bit edition and a 1.6GHz for the 64-bit version, or a compatible processor, or similar processing power; however, 2GHz is recommended  Memory  Microsoft recommends 1GB or above  Hard Disk Space  For SQL Server alone, ignoring any data files that you are then going to add on top, you will need over 1GB of space.

Operating System Requirements Eng.Mohamed Adam Isak, Ph.D. Researcher 10  You will find that SQL Server 2008 will run on Windows Vista Home Basic Edition and above, as well as Windows XP.  SQL Server 2012 will run on Windows 7 Service Pack 1 and above, as well as Vista Service Pack 2.  From the server side, it will work on Windows Server 2003 with Service Pack 2 and Windows Server It will also work on the 64-bit operating systems for Windows XP Professional, as well as the 64-bit editions of Windows Server 2003 and  So there is plenty of scope for running SQL Server on many operating systems.

Installation Eng.Mohamed Adam Isak, Ph.D. Researcher 11  Microsoft offers a 120-day trial version at sql/evaluation/trial/  To connect to the server after installation process completion:

The sa Login Eng.Mohamed Adam Isak, Ph.D. Researcher 12  The sa login is a default login that has full administration rights for SQL Server.  If you had selected mixed mode authentication during the installation process, you would have seen that you would be forced to include a password for this account.  This is because the sa user ID is such a powerful login.  It also exists in every SQL Server installation; therefore, any hacker knows that this user ID exists and so will try to connect to the server using it.  It is essential to set up a strong password on the sa account.  A good password is one that mixes numbers and letters, but doesn’t include letters than can be made into numbers and numbers into letters. For example, pa55word is just as easy to guess as password

What Can SQL do?  SQL can execute queries against a database  SQL can retrieve data from a database  SQL can insert records in a database  SQL can update records in a database  SQL can delete records from a database  SQL can create new databases  SQL can create new tables in a database  SQL can create stored procedures in a database  SQL can create views in a database  SQL can set permissions on tables, procedures, and views Eng.Mohamed Adam Isak, Ph.D. Researcher 13

Using SQL in Your Web Site  To build a web site that shows some data from a database, you will need the following:  An RDBMS database program (i.e. MS Access, SQL Server, MySQL)  A server-side scripting language, like PHP or ASP  HTML / CSS Eng.Mohamed Adam Isak, Ph.D. Researcher 14

Tasks of a SQL Server DBA  Install and configure SQL Server  Plan and create databases  Backup the databases  Restore databases when required  Setup and manage users for SQL Servers  Manage Security for SQL Server users  Setup / Manage task, alerts, operators  Setup / Manage replication environment  Performance Tune SQL Server  Troubleshoot SQL Server related problems Eng.Mohamed Adam Isak, Ph.D. Researcher 15

THE FOLLOWING TWO TABLES: Eng.Mohamed Adam Isak, Ph.D. Researcher 16 OUR EXAMPLES WILL BE BASED ON:

Database Tables  A database most often contains one or more tables. Each table is identified by a name (e.g. “EmployeeTable" or “DepartmentTable").  Tables contain records (rows) with data and attributes (columns). Eng.Mohamed Adam Isak, Ph.D. Researcher 17

Employee Table Eng.Mohamed Adam Isak, Ph.D. Researcher 18

SQL DML and DDL  SQL can be divided into two parts: The Data Manipulation Language (DML) and the Data Definition Language (DDL). Eng.Mohamed Adam Isak, Ph.D. Researcher 19

DML part of SQL  SELECT - extracts data from a database  UPDATE - updates data in a database  DELETE - deletes data from a database  INSERT INTO - inserts new data into a database Eng.Mohamed Adam Isak, Ph.D. Researcher 20

The DDL part of SQL  The DDL part of SQL permits database tables to be created or deleted. It also defines indexes (keys), specify links between tables, and impose constraints between tables. The most important DDL statements in SQL are: Eng.Mohamed Adam Isak, Ph.D. Researcher 21

DDL  CREATE DATABASE - creates a new database  ALTER DATABASE - modifies a database  CREATE TABLE - creates a new table  ALTER TABLE - modifies a table  DROP TABLE - deletes a table  CREATE INDEX - creates an index (search key)  DROP INDEX - deletes an index Eng.Mohamed Adam Isak, Ph.D. Researcher 22

The SQL SELECT Statement  The SELECT statement is used to select data from a database.  The result is stored in a result table, called the result-set.  SQL SELECT Syntax  SELECT column_name(s) FROM table_name  SELECT * FROM table_name  Note: SQL is not case sensitive. SELECT is the same as select Eng.Mohamed Adam Isak, Ph.D. Researcher 23

The SQL SELECT Statement-Example  The asterisk (*) is a quick way of selecting all columns. Eng.Mohamed Adam Isak, Ph.D. Researcher 24

THE DISTINCT SYNTAX  In a table, some of the columns may contain duplicate values. This is not a problem; however, sometimes you will want to list only the different (distinct) values in a table.  The DISTINCT keyword can be used to return only distinct (different) values. Eng.Mohamed Adam Isak, Ph.D. Researcher 25

THE DISTINCT SYNTAX Eng.Mohamed Adam Isak, Ph.D. Researcher 26

The WHERE Clause  The WHERE clause is used to extract only those records that fulfill a specified criterion. Eng.Mohamed Adam Isak, Ph.D. Researcher 27

Select your project from the list you will see after you click here orhere Visit Start up your own project !!!!!!!! Eng.Mohamed Adam Isak, Ph.D. Researcher 28