مواقع تعجبني
الأربعاء، 17 يونيو 2015
Lession (2) Database Designing & Modeling
بسم الله الرحمن الرحيم
Database Designing & Modeling section (Part 2)
رابط الدرس:
Syllabus:
Entity/Relationship Modelling
Entities and Attributes
Relationships
Attributes
E/R Diagrams
Database Design
Conceptual design
Logical design
Physical design
Entity/Relationship Modelling
Entities
Attributes
Relationships
One to one (1:1)
One to many (1:M)
Many to many (M:M)
Constraints on Relationships
Entity/Relationship Modelling
Entities and Attributes
Relationships
Attributes
E/R Diagrams
Database Design
Conceptual design
Logical design
Physical design
Entity/Relationship Modelling
Entities
Attributes
Relationships
One to one (1:1)
One to many (1:M)
Many to many (M:M)
Constraints on Relationships
السبت، 13 يونيو 2015
Lession (1) Database Designing & Modeling
بسم الله الرحمن الرحيم
تحليل وتصميم وبناء أنظمة قواعد البيانات باستخدام
2012 SQL Server
Database Designing & Modeling section (Part 1)
رابط الدرس:
Syllabus:
Data Model Defintion
Information Levels
Data Models at Information Levels
Data Model Components
Data Model Quality
Data Model Characteristics
Data System Development
Data System Development Life Cycle
Roles and Responsibilities
Data Modeling Approaches
OLTP
Data Warehouse
Postrelational Databases
Edraw Max
Data Model Defintion
Information Levels
Data Models at Information Levels
Data Model Components
Data Model Quality
Data Model Characteristics
Data System Development
Data System Development Life Cycle
Roles and Responsibilities
Data Modeling Approaches
OLTP
Data Warehouse
Postrelational Databases
Edraw Max
الخميس، 11 يونيو 2015
On delete cascade & On update cascade SQL Server Tips
Simple example to illustrate to amazing features in SQL server "On delete cascade & On update cascade"
Building Sample Data
USE [TestDB]
GO
-- Creating Table Products
CREATE TABLE [dbo].[Products](
[ProductID] [int] NOT NULL,
[ProductDesc] [varchar](50) NOT NULL,
CONSTRAINT [PK_Products] PRIMARY KEY CLUSTERED
(
[ProductID] ASC
)) ON [PRIMARY]
GO
-- Creating Table ProductDetails
CREATE TABLE [dbo].[ProductDetails](
[ProductDetailID] [int] NOT NULL,
[ProductID] [int] NOT NULL,
[Total] [int] NOT NULL,
CONSTRAINT [PK_ProductDetails] PRIMARY KEY CLUSTERED
(
[ProductDetailID] ASC
)) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ProductDetails] WITH CHECK ADD CONSTRAINT [FK_ProductDetails_Products] FOREIGN KEY([ProductID])
REFERENCES [dbo].[Products] ([ProductID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
-- Insert Data into Table
USE TestDB
GO
INSERT INTO Products (ProductID, ProductDesc)
SELECT 1, 'Bike'
UNION ALL
SELECT 2, 'Car'
UNION ALL
SELECT 3, 'Books'
GO
INSERT INTO ProductDetails
([ProductDetailID],[ProductID],[Total])
SELECT 1, 1, 200
UNION ALL
SELECT 2, 1, 100
UNION ALL
SELECT 3, 1, 111
UNION ALL
SELECT 4, 2, 200
UNION ALL
SELECT 5, 3, 100
UNION ALL
SELECT 6, 3, 100
UNION ALL
SELECT 7, 3, 200
GOSelect Data from Tables
-- Selecting Data
SELECT *
FROM Products
SELECT *
FROM ProductDetails
GODelete Data from Products Table
-- Deleting Data
DELETE
FROM Products
WHERE ProductID = 1
GOSelect Data from Tables Again
-- Selecting Data
SELECT *
FROM Products
SELECT *
FROM ProductDetails
GOClean up Data
-- Clean up
DROP TABLE ProductDetails
DROP TABLE Products
GOالسبت، 6 يونيو 2015
الثلاثاء، 2 يونيو 2015
الدرس (11) - تحليل وتصميم وبناء أنظمة قواعد البيانات باستخدام SQL Server
بسم الله الرحمن الرحيم
تحليل وتصميم وبناء أنظمة قواعد البيانات باستخدام
2012 SQL Server
رابط الدرس:
Syllabus:
Stored Procedure and Functions
Basic Concepts of Stored Procedure
Stored procedure definition
Stored procedure benefits
Stored procedure types
User-defined stored procedures
System stored procedures
Using the CREATE PROCEDURE statement
Using the ALTER PROCEDURE statement
Using the DROP PROCEDURE statement
Working with Functions
Basic Concepts of Functions
Function definition
Function benefits
Function types
Creating and Calling Functions
Function Calling
Creating a Scalar-Valued function
Creating a Table-Valued function
Creating a Multi-statement Table-Valued function
Modifying and Removing Functions
Triggers
Working with Triggers
Trigger definition and types
DDL triggers
DML triggers
DML trigger benefits
Managing INSTEAD OF triggers
Creating INSTEAD OF triggers
Modifying and removing triggers
الاشتراك في:
الرسائل (Atom)