Aga Private computer Institute Prepared by: Srwa Mohammad SQL Server Aga Private computer Institute Prepared by: Srwa Mohammad
Chapter 1 Database Concepts Introduction to Database Concepts A database is collection of information that is organized so that it can be easily accessed managed and updated
Database systems 2 types of database system database system Hardware: it is helpful to categorize computer memory into 2 classes (internal memory & external memory) internal is permanent for example ROM1 and external as ROM2 which is volatile database system Software: user interface with database systems through query languages *main task of data manipulation are data retrieval and data update
Type of databases 1-Relational database: the data is in a relational database is stored in different data tables, each table has a key field used to connect it to other tables 2- operational database: is very important to organizations as they include the customer database and personal database
3- database Warehouses: organizational is required to keep all relevant data for several years 4- distributed database: many organizations have several office location 5- user database: each workstation is like a small database in itself
Steps of Design database 1-determine the purpose of your database 2-determine the tables you need in database 3-determine the fields you need 4-identify fields with unique values 5-determine the relationships between tables 6-refine the design
Chapter Tow Introduction to SQL server SQL server: is a relational database management system developed by Microsoft. Relational database management system (RDBMS): offers a variety of administrative tools to ease the burdens of database development, maintenance and administration
SQL Server minimum hardware requirements SQL Server Editions Memory (RAM) CPU SQL Server Enterprise (64 bit) 1 GB 1.4 GHz Business Intelligence(64 bit) Standard (64 bit) Enterprise (32 bit) 1 GHz Business Intelligence(32bit) Standard(32 bit)
SQL Server minimum software requirements Operating system (OS) NET Framework Windows PowerShell SQL Server support tools and software Internet Explorer Virtualization
Advantages of master DB: The Master Database: one of the database installed with Microsoft SQL Server is named master Advantages of master DB: Holds all information about server Keeps track of every thing you do on the server (EX\ creating & managing database)
Data types Data type: is an attribute that specifies type of data of any object Numeric data types: Int: from (-9, 224, 8899,251) to (9, 224, 8899,251) Tinyint: from (0) to (255) Bit: from(0) to (1) Decimal: from (-10^2+1) to (10^2-1) Numeric: from (-10^2+1) to (10^2-1) Money: from (-1 , 113 , 4.5808) to (+1 , 113 , 4.5807)
Date and Time data type: Datetime: from (Jan 1,1753) to (Dec 31,9999) Date : store data like (June 30,1991) Time: store time like 12:30 P.M. Character and String data type: Char: from (char) to (data with max length of 8000 characters) Text: from (text) to (data with max length of 2,147,483,647 characters )
Data Definition Language (DDL) DDL: are statements used to define database structure in SQL server They used to create, alter, or drop data structure CREATE: to create object in database ALTER: modify structure of database DROP: delete an object in database TURNCATE: remove all records from database ,spaces of records also will be deleted COMMENT: add comment to the data dictionary RENAME: rename an object
Data Manipulation language (DML) DML: are statements used to retrieve and work with data in SQL server Statements used to add, modify, query, or remove data in SQL server database: SELECT: retrieve data from database INSERT: insert data to table UPDATE: update existing data in table DELETE: delete all record from table, spaces of records are remain