Professional Documents
Culture Documents
4)
*******
كويس وScenario محتاج إنكم تقروا الـ.. Form وScenario معطينا.. مثل ما انتو ملحظين في السؤال
و نقارن بينه.. و تشوفوا إذا تقدروا تحسنوا شي فيهForm بعدين تروحوا للـ.. تركزوا على التفاصيل اللي فيه
..! إذا كان كل البيانات موجودة فيه ول في شي ناقص؟.. المعطىScenario و بين
و تتضمن كل التفاصيل الليNormalized tables إنها تكون.. أهم شي عندنا لما نجي نعمل الجداول
Scenario موجودة في الـ
----------
و عندنا في تعريف النورمليزيشن ..
The process of creating a well-behaved set of tables to efficiently store data,minimize
redundancy,and ensure data integrity
و هذا معناهـ إني محتاجة إني أقسم الـ entitiesفي جداول صغيرة قد ما أقدر ..
----------
..نرجع تاني للسؤال حقنا ..و نشوف هو إيش معطينا ..عشان نبدأ نعمل النورمليزيشن -
1- All Attributes are listed bellow
-----------
رقم موديل الحذاء - ShoeStyleID
الوصف - Des-cri-ption
اللون - Color
الخامة - Material
المقاس -Size
التعديلت المطلوبة - Adjustments
السعر - Price
-----------
2- we know that in Normalization we use this Format:
-----------
UnNormalizedForm نقدر نكتب الـForm من هذا الـ
مع ملحظة وضع الـPrimary Key و اختيارForm اللي في الـAttributes و هو عبارة عن جميع الـ
: مثل ماهو موضح في السفل.. خاص فيهاPrimary Key المتكررة بين قوسين و اختيارAttribute
UNNORMALIZATION FORM
OrderForm1(OrderID , OrderDate, EstimatedShipDate, ActualShipDate,
ShippingCost, CustID, CusLastName, CustFirstName, Phone, Email, Address, City,
State, PostalCode, Country, LeftFootID, RightFootID, ShippingAddress,
(ShoesStyleID, DeS-CRI-PTion, Color, Material, Size, Adjustment, Price) ) O
*********************
FIRST NORMALIZATION FORM
First normal form (1NF) : A table is in 1NF when there are no repeating groups
within it.Each cell can contain only one value.For example,how may items can be
placed in one Order table?The items repeat,so they must be split into a separate table.
3-
*********************
SECOND NORMALIZATION
Second normal form (2NF) : A table is in 2NF if every nonkey column depends on
the entire key (not just part of it).This issue arises only if there is a concatenated
key(with multiple columns).
Second Normal Form عشان نوصل للـ
1- نشوف:
اللي ما نقدرNonKeys إيش الـ.. الباقيةNonKeys و الـComposite Key و نخلي تركيزنا على الـ-2
اللي تعتمد علىNonKeys مع بعض ؟ و إيش الـCompisite Key نحصل عليها غير إذا كان عندنا الـ
فقط ؟؟ShoesStyleID اللي تعتمد علىNonKeys فقط و إيش الـOrderID
فقط مالهاShoesStyleId كلها تعتمد علىDeS-CRI-PTion, Color, Material, Size, Price ال-3
: على النحو التاليStyle إذن حيكون عندنا جدول اسمهOrderId علقة بالـ
ما نقدر نعرف ايش التعديلت اللي يبغاها العميل ال إذا.. و مثل ما تعرفواAdjustment بقي عندنا الـ-4
: على النحو التاليOrderItem إذن حيكون عندنا جدول كمان اسمه.. عرفنا رقم الطلب و رقم الموديل
: مثل ما هوFirst Normal Form و ننزل الجدول الثالث اللي عندنا من الـ-5
-*-*-*-*-*-*-
و بكذا حيكون عندنا خلصة الـSecond Normal Form ثلث جداول
:
Style( ShoesStyleID, DeS-CRI-PTion, Color, Material, Size, Price) O
*********************
THIRD NORMALIZATION
Third normal form (3NF) : A table is in third normal form (3NF)if each nonkey
column depends on the whole key and nothing but the key.
اللي عندنا اللي هوPrimary Key اللي ما تعتمد على الـNonKeys الـOrderForm1 حنشوف جدول-1
.. و نفصلها في جدول مستقلOrderID
-2
OrderForm1(OrderID , OrderDate, EstimatedShipDate, ActualShipDate,
ShippingCost, CustID, CusLastName, CustFirstName, Phone, Email, Address, City,
State, PostalCode, Country, LeftFootID, RightFootID, ShippingAddress) O
و قسم يعتمد على الـOrderID قسم يعتمد على.. أقسام3 قسمتها إلىattributes لو لحظتوا كيف لونت الـ-3
City و قسم خاص بالـCus-tum-er
*********************
..