Podcast
Questions and Answers
ما هو الفرق بين char(10)
و varchar(10)
؟
ما هو الفرق بين char(10)
و varchar(10)
؟
- `varchar(10)` يحتفظ بـ 10 مساحات في الذاكرة فقط عند الحاجة (correct)
- `char(10)` يحتفظ بـ 10 مساحات في الذاكرة فقط عند الحاجة
- `varchar(10)` يحتفظ بـ 10 مساحات في الذاكرة حتى لو لم يتم استخدامها
- `char(10)` يحتفظ بـ 10 مساحات في الذاكرة حتى لو لم يتم استخدامها (correct)
ما هو الفرق بين create database
و drop database
؟
ما هو الفرق بين create database
و drop database
؟
create database
عبارة عن عبارة SQL تستخدم لإنشاء قاعدة بيانات جديدة، بينما drop database
عبارة عن عبارة SQL تستخدم لحذف قاعدة بيانات موجودة.
يمكن استخدام أكثر من كلمة رئيسية (Primary Key) في جدول واحد.
يمكن استخدام أكثر من كلمة رئيسية (Primary Key) في جدول واحد.
False (B)
ما هو دور constraint
في SQL؟
ما هو دور constraint
في SQL؟
ما هي أنماط constraint
المعروفة في SQL؟
ما هي أنماط constraint
المعروفة في SQL؟
ما هو دور on update
في constraint
؟
ما هو دور on update
في constraint
؟
ما هو الفرق بين select
و retrieve
في SQL؟
ما هو الفرق بين select
و retrieve
في SQL؟
ما هو دور group by
في SQL؟
ما هو دور group by
في SQL؟
تستخدم الدوال التجميعية Aggregate Functions مع group by clause
.
تستخدم الدوال التجميعية Aggregate Functions مع group by clause
.
Flashcards
كيان قوي
كيان قوي
كيان أساسي لا يعتمد على أي كيان آخر لوجوده.
كيان ضعيف
كيان ضعيف
كيان يعتمد على كيان آخر لوجوده ولا يمتلك مفتاحًا أساسيًا.
السمات
السمات
مجموعة من السمات التي تصف الكيان بشكل كامل.
نسبة التعدد
نسبة التعدد
Signup and view all the flashcards
علاقة ثنائية
علاقة ثنائية
Signup and view all the flashcards
علاقة متكررة
علاقة متكررة
Signup and view all the flashcards
علاقة ثلاثية
علاقة ثلاثية
Signup and view all the flashcards
قيود القيمة الافتراضية
قيود القيمة الافتراضية
Signup and view all the flashcards
char(n)
char(n)
Signup and view all the flashcards
varchar(n)
varchar(n)
Signup and view all the flashcards
قيود
قيود
Signup and view all the flashcards
قيود عدم التكرار
قيود عدم التكرار
Signup and view all the flashcards
قيود عدم الفراغ
قيود عدم الفراغ
Signup and view all the flashcards
قيود المفاتيح الأساسية
قيود المفاتيح الأساسية
Signup and view all the flashcards
قيود المفتاح الأجنبي
قيود المفتاح الأجنبي
Signup and view all the flashcards
قيود التحقق
قيود التحقق
Signup and view all the flashcards
أمر إنشاء الجدول
أمر إنشاء الجدول
Signup and view all the flashcards
أمر حذف الجدول
أمر حذف الجدول
Signup and view all the flashcards
أمر تعديل الجدول
أمر تعديل الجدول
Signup and view all the flashcards
أمر إضافة عمود
أمر إضافة عمود
Signup and view all the flashcards
أمر حذف عمود
أمر حذف عمود
Signup and view all the flashcards
أمر إضافة قيد
أمر إضافة قيد
Signup and view all the flashcards
أمر حذف قيد
أمر حذف قيد
Signup and view all the flashcards
لغة SQL
لغة SQL
Signup and view all the flashcards
لغة DDL
لغة DDL
Signup and view all the flashcards
لغة DML
لغة DML
Signup and view all the flashcards
أمر الإضافة
أمر الإضافة
Signup and view all the flashcards
أمر الاسترجاع
أمر الاسترجاع
Signup and view all the flashcards
أمر التعديل
أمر التعديل
Signup and view all the flashcards
أمر الحذف
أمر الحذف
Signup and view all the flashcards
Study Notes
Database Design
- Database design involves several stages: analysis, entity-relationship diagrams (ER diagrams), schema, Data Definition Language (DDL), and Data Manipulation Language (DML).
- Analysis focuses on identifying entities (objects) and their attributes (characteristics).
- Relationships between entities are crucial; examples include 1:1, 1:M, and M:M relationships.
Attributes
- Key attributes are unique identifiers. Examples include student ID, serial number, and social security number.
- Composite attributes are composed of multiple parts. An address, for instance, might include street, city, and zip code
- Multi-valued attributes can hold multiple values for a single entity. Examples include phone numbers and email addresses.
- Derived attributes are calculated from other attributes. An example is the average grade of students.
Entity Types
- Strong entities exist independently. Examples include students and courses
- Weak entities depend on other entities. Examples include dependent in the employee relation, as they depend on the employee for existence
- Recursive relationships occur when an entity relates to itself. An example is the hierarchical structure of an employee supervisory relationship.
- Ternary relationships describe relationships between three entities. For example, the relationship between a supplier, a project, and an item.
Database Implementation
- Converting an ER diagram to a relational database schema involves mapping entities to tables.
- Attributes become columns and relationships become foreign keys.
SQL
- SQL (Structured Query Language) is used to manage and manipulate data in databases.
- DDL (Data Definition Language) commands are used to define tables, columns, and constraints.
- DML (Data Manipulation Language) commands are used to manipulate data within the database. These include insert, select, update, and delete statements.
Constraints
- Constraints are rules applied to data integrity and consistency. Common constraints include:
- Key constraints to ensure uniqueness.
not null
to prevent missing values.unique
to prevent duplicate values.check
to enforce specific rules.
default
value is used to set default values to columns.
Data Types
- Data types specify the kind of data a column can hold. Note variances between VARCHAR(length) and CHAR(length).
Additional Notes
- Database management systems (DBMS) use SQL to interact with databases.
- Common database systems include SQL Server
- Multiple relationships exist in database design.
- Proper constraints are essential to maintain data integrity.
- DDL commands are used to create, modify, and delete tables and columns.
- DML commands are used to insert, select, update, and delete data from tables.
- Foreign keys establish relationships between tables.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.