وهى أختصار Data Definition Language
وهى عبارة عن الاوامر المسئولة على التعامل مع قواعد البيانات وعناصر قواعد البيانات وهى .
انشاء create
وتعديل alter
وحذف drop
لانشاء قاعدة بيانات :
نستخدم الامر create كالتالى :
create database database Name ;
على سبيل المثال اذا اردنا انشاء قاعدة بيانات اسمها mydb يكون الكود كالاتى :
يجب اولا تحديد اربعة عناصر قبل البدء فى انشاء الجدول .
١_اسم الجدول table name
واسم الجدول يجب الا يتكرر فى نفس قاعدة البيانات .
٢_اسماء الاعمدة columns name
واسماء الاعمدة يجب الا تتكرر فى نفس الجدول .
٣_نوع البيانات data type
وهنا هنوضح بس اهم انواع البيانات
Varchar نوع البيانات نصى بس متغير بمعنى لوكان حجم البيانات مثلا
١٠ بينما تم ادخال حجم بيانات ٥ يتم حجز ٥ فقط .
char نوع البيانات نصى بس ثابت بمعنى لوكان حجم البيانات
١٠ بينما تم ادخال حجم بيانات ٥ يتم حجز مساحة ١٠ بالكامل .
int نوع البيانات رقمى
Float,double نوع البيانات عشرى
date نوع البيانات تاريخ
صيغة انشاء الجداول
create table table name
( column1 data type (size),
column2 data type (size),
نلاحظ ان صيغة انشاء الجدول هى نفس عناصر الجدول السابق ذكرها .
نبداء بالامر create يليها نوع عنصر قاعدة البيانات المراد انشائة وهو هنا table ثم اسم الجدول وبعدة بفتح قوسين ونكتب بداخلهم عناصر الجدول وهى
اسماء الاعمدة ونوع البيانات وحجمها يفصلها coma .
وتنتهى عبارة الانشاء ب semicolon .
مثال : لو اردنا انشاء جدول الادارات dept1 وبة حقل لرقم الادارة dept_no وحقل اسم الادارة dept_name
create table dept1
(dept_no int (5),
dept_name varchar(20)
واخيرا عندما نريد عرض الهيكل الخاص بالجدول نستخدم الامر
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.