• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
مشروع قواعد البيانات
 

مشروع قواعد البيانات

on

  • 307 views

تحليل نظام البيع في شركة الخندقاوي التجاريه من وجهة نظر قواعد البيانات

تحليل نظام البيع في شركة الخندقاوي التجاريه من وجهة نظر قواعد البيانات

Statistics

Views

Total Views
307
Views on SlideShare
307
Embed Views
0

Actions

Likes
0
Downloads
17
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    مشروع قواعد البيانات مشروع قواعد البيانات Document Transcript

    • ‫‪ ‬ا‪ ‬ا‪ ‬ا‪‬‬ ‫ﺟﺎﻣﻌﺔ اﻟﻨﻴﻠﻴﻦ‬ ‫ﻛﻠﻴﺔ ﻋﻠﻮم اﻟﺤﺎﺳﻮب وﺗﻘﺎﻧﺔ اﻟﻤﻌﻠﻮﻣﺎت‬ ‫ﻣﺎﺟﺴﺘﻴﺮ ﺗﻘﺎﻧﺔ اﻟﻤﻌﻠﻮﻣﺎت‬ ‫اﻟﻤﺠﻤﻮﻋﺔ اﻟﺜﺎﻧﻴﺔ‬ ‫‪‬روع ‪‬وا‪‬د ا‪‬ت‬ ‫‪‬ظ‪‬م ا‪‬راء ‪ ‬ر‪ ‬ا‪‬د‪‬وي ا‪‬ر‪‬‬ ‫إ‪‬اد ا‪: ‬‬ ‫ﺻﻔﻴﻪ ﻧﺎﺟﺢ ﻧﻮري اﻟﺒﺪري‬ ‫إ‪‬اف :‬ ‫دﻛﺘﻮر ﻃﺎرق‬ ‫1‬
    • ‫أﻫﻤﻴﺔ ﺗﺼﻤﻴﻢ ﻗﻮاﻋﺪ اﻟﺒﻴﺎﻧﺎت :‬ ‫إن ﻋﻤﻠﻴﺔ ﺑﻨﺎء ﻗﺎﻋﺪة ﺑﻴﺎﻧﺎت ﺟﻴﺪﻩ ﻻ ﻳﺄﰐ ﺑﺘﻠﻚ اﻟﺴﻬﻮﻟﺔ ، إذ ﻻﺑﺪ ﻣﻦ ﺑﺬل‬ ‫ﺟﻬﺪ ﻛﺒﲑ ﻟﻠﺤﺼﻮل ﻋﻠﻰ ﻗﺎﻋﺪة ﺑﻴﺎﻧﺎت ﺟﻴﺪﻩ . واﻟﺘﺼﻤﻴﻢ اﳉﻴﺪ ﻟﻘﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت‬ ‫ﻳﺴﻬﻞ ﻋﻤﻠﻴﺔ إﺳﺘﺨﺪام وإدارة ﻫﺬﻩ اﻟﻘﺎﻋﺪﻩ ، أﻣﺎ اﻟﺘﺼﻤﻴﻢ اﻟﺴﻲء ﻓﺴﻴﺆدي إﱃ ﺗﻜﺮار‬ ‫اﻟﺒﻴﺎﻧﺎت وﺑﺎﻟﺘﺎﱄ ﺗﺼﻌﺐ ﻋﻤﻠﻴﺔ اﳊﻔﺎظ ﻋﻠﻰ ﺗﻮاﻓﻘﻴﺔ اﻟﺒﻴﺎﻧﺎت وﻋﺎدة ﻣﺎ ﻳﺆدي ﺗﻜﺮار‬ ‫اﻟﺒﻴﺎﻧﺎت إﱃ ﻧﺘﺎﺋﺞ ﻏﲑ ﺻﺤﻴﺤﺔ ﻋﻨﺪ ﻃﻠﺐ ﺗﻠﻚ اﻟﺒﻴﺎﻧﺎت ﻣﻦ ﺗﻠﻚ اﻟﻘﺎﻋﺪة وﻫﺬﻩ ﺑﺪورﻩ‬ ‫ﻳﺆدي إﱃ أن أي ﻗﺮارات إدارﻳﺔ ﻛﺬﻟﻚ أي ﲣﻄﻴﻂ ﻣﺴﺘﻘﺒﻠﻲ ﺳﻴﻜﻮن ﺧﺎﻃﺌﺎ ﻹﻋﺘﻤﺎدﻩ‬ ‫و‬ ‫ﻋﻠﻰ ﻣﻌﻠﻮﻣﺎت ﻏﲑ ﺻﺤﻴﺤﺔ .‬ ‫دورة ﺣﻴﺎة ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت )‪: Database Life Cycle (DBLC‬‬ ‫إن ﻋﻤﻠﻴﺔ ﺗﻄﻮﻳﺮ ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت ﲤﺮ ﲟﺠﻤﻮﻋﺔ ﻣﻦ اﳌﺮاﺣﻞ ، ﻫﺬﻩ اﳌﺮاﺣﻞ اﳌﺘﺘﺎﻟﻴﺔ‬ ‫ﺗﺴﻤﻰ ﺑﺪورة ﺣﻴﺎة ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت ، وﻫﺬ اﳌﺮاﺣﻞ أو دورة اﳊﻴﺎة ﲤﺮ ﺑﺼﻮرة ﻣﺘﺰاﻣﻨﺔ‬ ‫ﺿﻤﻦ ﻣﺮاﺣﻞ دورة ﺣﻴﺎة ﻧﻈﺎم اﳌﻌﻠﻮﻣﺎت .‬ ‫ﺗﺘﻜﻮن دورة ﺣﻴﺎة ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت ﻣﻦ اﻟﻤﺮاﺣﻞ اﻟﺘﺎﻟﻴﺔ :‬ ‫١- ﺗﺤﺪﻳﺪ اﻟﻤﻮاﺻﻔﺎت واﻟﻤﺘﻄﻠﺒﺎت اﻟﺨﺎﺻﺔ ﺑﻘﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت : وﻫﻲ ﻣﺮﺣﻠﺔ‬ ‫ﺟﺰﺋﻴﺔ ﺿﻤﻦ ﲨﻊ ﻣﻮاﺻﻔﺎت وﻣﺘﻄﻠﺒﺎت ﻧﻈﺎم اﳌﻌﻠﻮﻣﺎت ﰲ ﻣﺮﺣﻠﺔ اﻟﺘﺤﻠﻴﻞ .‬ ‫2‬
    • ‫٢- إﻋﺪاد ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت اﻷوﻟﻴﺔ ‪: Conceptual Database‬‬ ‫وﻓﻴﻬﺎ ﻳﺘﻢ ﺗﺼﻤﻴﻢ ﳕﻮذج أوﱄ ﻟﻠﺒﻴﺎﻧﺎت ﺑﻮاﺳﻄﺔ ﳐﻄﻄﺎت ﻋﻼﻗﺔ-ﻛﻴﻨﻮﻧﺔ‬ ‫)‪. (ER-D‬‬ ‫٣- ﺗﺼﻤﻴﻢ ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت اﻟﻤﻨﻄﻘﻴﺔ ‪ : Logical Database‬ﲢﻮﻳﻞ‬ ‫ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت اﻷوﻟﻴﺔ ، أو ﳐﻄﻂ )‪ ، (ER-D‬إﱃ ﳐﻄﻂ اﻹﺳﻜﻴﻤﺎ‬ ‫)‪ ، (Database Schema‬وذﻟﻚ ﺑﺈﺗﺒﺎع ﻗﻮاﻋﺪ اﻟﺘﺤﻮﻳﻞ ‪Mapping‬‬ ‫‪. Rules‬‬ ‫٤- ﺗﺤﺴﻴﻦ ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت اﻟﻤﻨﻄﻘﻴﺔ : وذﻟﻚ ﺑﺘﻄﺒﻴﻖ ﻗﻮاﻋﺪ اﻟﺘﻄﺒﻴﻊ‬ ‫‪ Normalization‬اﻟﱵ ﺪف إﱃ ﺗﻘﻠﻴﻞ ﺗﻜﺮارﻳﺔ اﻟﺒﻴﺎﻧﺎت ، ﻣﻦ أﺟﻞ‬ ‫رﻓﻊ ﻛﻔﺎءة ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت ﻣﺎ أﻣﻜﻦ .‬ ‫٥- ﺗﻨﻔﻴﺬ ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت اﻟﻔﻴﺰﻳﺎﺋﻴﺔ ‪ : Physical Database‬وﰲ ﻫﺬﻩ‬ ‫اﳌﺮﺣﻠﺔ ﻳﺘﻢ ﻛﺘﺎﺑﺔ أﻛﻮاد إﻧﺸﺎء ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت ﺑﻠﻐﺔ ‪ ، SQL‬وﳛﺪد ﻓﻴﻬﺎ ﺑﻨﻴﺔ‬ ‫اﳉﺪاول وﻧﻮع ﺑﻴﺎﻧﺎت اﳊﻘﻮل واﳌﻔﺎﺗﻴﺢ اﻷﺳﺎﺳﻴﺔ واﻷﺟﻨﺒﻴﺔ وﺑﺎﻗﻲ ﺷﺮوط‬ ‫ﺗﺼﻤﻴﻢ ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت ، ﰒ ﺗﻨﻔﻴﺬ ذﻟﻚ ﺿﻤﻦ ﻧﻈﺎم إدارة ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت‬ ‫ﻣﻨﺎﺳﺐ ‪ ، DBMS‬ﻣﺜﻞ ) , ‪Oracle , Access , Sqlserver‬‬ ‫‪. (Mysql … etc‬‬ ‫وإﻋﺘﻤﺎداً ﻋﻠﻰ دورة ﺣﻴﺎة ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت اﻟﺴﺎﺑﻘﺔ ، ﳒﺪ أن ﻣﺮﺣﻠﺔ اﻟﺘﺼﻤﻴﻢ ﺗﺒﺪأ‬ ‫ﺑﺎﳌﺮﺣﻠﺔ اﻟﺜﺎﻟﺜﺔ ﻣﻦ دورة ﺣﻴﺎة ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت .‬ ‫3‬
    • ‫ﻧﺒﺬﻩ ﺗﻌﺮﻳﻔﻴﺔ ﻋﻦ ﻛﻪ :‬ ‫اﻟﺸﺮ‬ ‫ﺗﻌﺘﱪ ﻛﺔ اﳋﻨﺪﻗﺎوي اﻟﺘﺠﺎرﻳﺔ اﶈﺪودة إﺣﺪى ﻛﱪﻳﺎت ﻛﺎت اﻟﺴﻮداﻧﻴﺔ‬ ‫اﻟﺸﺮ‬ ‫ﺷﺮ‬ ‫اﻟﻌﺎﻣﻠﻪ ﰲ ﳎﺎل إﺳﺘﲑاد وﲡﺎرة اﻟﻮاﺑﻮرات اﻟﺰراﻋﻴﺔ وﻃﻮاﺣﲔ اﻟﻐﻼل واﳌﻮﻟﺪات‬ ‫اﻟﻜﻬﺮﺑﺎﺋﻴﺔ وﻣﻌﺎﺻﺮ اﻟﺰﻳﻮت وﻋﺪات اﻟﻮرش واﻹﺳﺒﲑات .‬ ‫و‬ ‫اﻟﺸﺮ‬ ‫ﺗﻘﻮم ﻛﻪ ﺑﺈﺳﺘﲑاد ﻫﺬﻩ اﻵﻟﻴﺎت ﻣﻦ )اﻟﺼﲔ – اﳍﻨﺪ – اﻟﻴﺎﺑﺎن( وﻫﻲ ﻛﻴﻼً‬ ‫ﺣﺼﺮﻳﺎً ﻟﻠﻌﺪﻳﺪ ﻣﻦ ﻛﺎت اﻟﺘﺠﺎرﻳﺔ ذات اﻟﺸﻬﺮة اﻟﻮاﺳﻌﻪ ﰲ اﻷﺳﻮاق اﻟﺴﻮداﻧﻴﺔ .‬ ‫اﳌﺎر‬ ‫ﺗﻨﺘﺸﺮ ﻓﺮوع ﻛﺔ ﰲ وﻻﻳﺎت اﻟﺴﻮدان اﻷﺧﺮى وذﻟﻚ ﻟﺘﺴﻬﻴﻞ وﺻﻮل‬ ‫اﻟﺸﺮ‬ ‫ﺧﺪﻣﺎت ﻛﺔ وﺳﻠﻌﻬﺎ إﱃ ﻳﺪ اﳌﺴﺘﻬﻠﻚ ﺑﺴﻬﻮﻟﺔ وﻳﺴﺮ .‬ ‫اﻟﺸﺮ‬ ‫ﻛﺰ اﻟﺮﺋﻴﺴﻲ ﻛﺔ ﰲ اﳋﺮﻃﻮم – ع اﳉﻤﻬﻮرﻳﺔ – ﺟﻨﻮب ﻣﺴﺠﺪ ﻓﺎروق،‬ ‫ﺷﺎر‬ ‫ﻟﻠﺸﺮ‬ ‫اﳌﺮ‬ ‫وﳍﺎ اﻟﻌﺪﻳﺪ ﻣﻦ اﻟﻔﺮوع ﰲ أﻣﺪرﻣﺎن ، اﻟﺪاﻣﺮ ، ﺷﻨﺪي ، رﺑﻚ ، اﻷﺑﻴﺾ ، ﻧﻴﺎﻻ ،‬ ‫اﳌﻨﺎﻗﻞ ، اﻟﻘﻀﺎرف .‬ ‫أﻧﺸﻄﺘﻬﺎ :‬ ‫١- ﺗﻌﻤﻞ ﻛﺔ ﰲ ﳎﺎل إﺳﺘﲑاد وﲡﺎرة اﻟﻮاﺑﻮرات اﻟﺰراﻋﻴﺔ وﻃﻮاﺣﲔ اﻟﻐﻼل‬ ‫اﻟﺸﺮ‬ ‫واﳌﻮﻟﺪات اﻟﻜﻬﺮﺑﺎﺋﻴﺔ وﻣﻌﺎﺻﺮ اﻟﺰﻳﻮت وﻋﺪات اﻟﻮرش واﻹﺳﺒﲑات .‬ ‫٢- ﺗﻘﻮم ﻛﺔ ﺑﺈﺳﺘﲑاد ﻃﻠﻤﺒﺎت اﳌﻴﺎﻩ اﻟﺰراﻋﻴﺔ ﻣﻦ اﻟﺼﲔ واﳍﻨﺪ .‬ ‫اﻟﺸﺮ‬ ‫٣- ﲤﺘﻠﻚ ﻛﺔ ﻣﺼﻨﻊ ﻹﻧﺘﺎج ﺣﺠﺎرة اﻟﻄﻮاﺣﲔ ﻛﺔ أﺑﻮﺟﺎ ﻣﻮﺳﻰ‬ ‫ﻣﺎر‬ ‫اﻟﺸﺮ‬ ‫اﻟﺴﻮداﻧﻴﺔ اﳌﻌﺮوﻓﻪ .‬ ‫4‬
    • ‫٤- ﺗﻌﻤﻞ ﻛﻪ ﰲ ﺑﻀﺎﺋﻊ أﺧﺮى ذات إﺳﺘﺨﺪاﻣﺎت ﺣﻴﻮﻳﺔ ﰲ اﳊﻴﺎة اﻟﻴﻮﻣﻴﺔ.‬ ‫اﻟﺸﺮ‬ ‫أﻫﺪاﻓﻬﺎ :‬ ‫١- ﺗﺴﻬﻴﻞ وﺻﻮل اﻟﺴﻠﻌﺔ إﱃ ﻳﺪ اﳌﺴﺘﻬﻠﻚ ﺑﺴﻬﻮﻟﺔ وﻳﺴﺮ .‬ ‫٢- ﺗﻠﺒﻴﺔ ﺧﺪﻣﺎت زﺑﺎﺋﻨﻬﺎ ﺑﺼﻮرة ﺳﺮﻳﻌﺔ .‬ ‫٣- ﻓﺘﺢ ﻓﺮوع ﻛﺔ ﰲ وﻻﻳﺎت اﻟﺴﻮدان ﺪف ﺗﻘﺪﱘ أﻓﻀﻞ اﳋﺪﻣﺎت ﻟﻜﻞ‬ ‫ﻟﻠﺸﺮ‬ ‫ﻋﻤﻼﺋﻬﺎ أﻳﻦ ﻣﺎﻛﺎﻧﻮ .‬ ‫5‬
    • ‫وﺻﻒ اﻟﻨﻈﺎم :‬ ‫ﻧﻈﺎم اﻟﺒﻴﻊ ﻓﻲ اﻟﻤﻌﺎرض :‬ ‫١- ﻳﻘﻮم اﻟﻌﻤﻴﻞ أو اﻟﺰﺑﻮن ﺑﺘﺤﺪﻳﺪ اﻹﺿﺎﻓﻪ اﻟﱵ ﳛﺘﺎج إﻟﻴﻬﺎ ﳌﻮﻇﻒ‬ ‫اﳌﺒﻴﻌﺎت.‬ ‫٢- دﻓﻊ ﻗﻴﻤﺔ اﻹﺿﺎﻓﺔ اﻟﱵ ﰎ ﲢﺪﻳﺪﻫﺎ وإﺳﺘﻼم إﻳﺼﺎل ﻧﻘﺪي )ﻓﺎﺗﻮرة اﻟﺒﻴﻊ(.‬ ‫٣- دﻓﻊ اﳌﺒﻠﻎ ﺑﺎﳋﺰﻳﻨﻪ وإﺳﺘﻼم ﻧﺴﺨﺔ ﻣﻦ اﻹﻳﺼﺎل واﻟﺮﺟﻮع إﱃ ﻣﻮﻇﻒ‬ ‫اﳌﺒﻴﻌﺎت .‬ ‫٤- ﻳﻘﻮم ﻣﻮﻇﻒ اﳌﺒﻴﻌﺎت ﺑﺎﻟﺘﺤﻘﻖ ﻣﻦ ﺗﻮﻗﻴﻊ أﻣﲔ اﳋﺰﻳﻨﻪ .‬ ‫٥- إﺳﺘﺨﺮاج إذن ﺗﺴﻠﻴﻢ اﻟﺒﻀﺎﻋﺔ ﻣﻦ اﳌﺨﺰن )ﺻﺮﻓﻪ( .‬ ‫٦- إﺳﺘﻼم اﻟﺒﻀﺎﻋﺔ ﻣﻦ اﳌﺨﺰن .‬ ‫ﻧﻈﺎم دﺧﻮل اﻟﺒﻀﺎﻋﺔ إﻟﻰ اﻟﻤﺨﺎزن :‬ ‫١- ﻳﺴﺘﻠﻢ أﻣﲔ اﳌﺨﺰن ﺑﻮﻟﺴﺘﺔ اﻟﺸﺤﻦ ﺑﻪ ﺗﻔﺎﺻﻴﻞ اﻟﺒﻀﺎﻋﺔ .‬ ‫٢- ﺗﻮزﻳﻊ اﻟﺒﻀﺎﺋﻊ داﺧﻞ اﳌﺨﺰن ﺣﺴﺐ اﳊﺠﻢ واﻟﻨﻮﻋﻴﻪ وﻣﺮاﻋﺎة ﺗﻠﻒ‬ ‫اﻟﺒﻀﺎﻋﻪ إذا ﻛﺎﻧﺖ اﻟﺒﻀﺎﻋﺔ ﻗﺎﺑﻠﺔ ﻟﻠﺘﻠﻒ ﺑﻔﻌﻞ اﻟﻌﻮاﻣﻞ اﳌﻨﺎﺧﻴﻪ )ﺣﺮارﻩ‬ ‫اﻟﺸﻤﺲ ، أﻣﻄﺎر وﻏﲑﻫﺎ ( .‬ ‫٣- ﻳﻘﻮم أﻣﲔ اﳌﺨﺰن ﺑﺘﺪوﻳﻦ اﻹﺿﺎﻓﺔ ﺑﺪﻓﱰ ﻳﺴﻤﻰ )ﺑﺪﻓﱰ ﻛﺔ اﳌﺨﺰن( .‬ ‫ﺣﺮ‬ ‫٤- اﻟﺘﻮﻗﻴﻊ ﻋﻠﻰ اﻹﺿﺎﻓﺔ اﻟﱵ ﰎ إﺳﺘﻼﻣﻬﺎ ﰲ ﺑﻮﻟﺴﺘﺔ اﻟﺸﺤﻦ .‬ ‫6‬
    • ‫ﺗﺤﺪﻳﺪ اﻟﻤﻮاﺻﻔﺎت واﻟﻤﺘﻄﻠﺒﺎت اﻟﺨﺎﺻﺔ ﺑﻘﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت )ﺗﺤﻠﻴﻞ اﻟﻤﺘﻄﻠﺒﺎت( :‬ ‫وﻫﻰ ﻣﺮﺣﻠﺔ ﺟﺰﺋﻴﺔ ﺿﻤﻦ ﲨﻊ ﻣﻮاﺻﻔﺎت وﻣﺘﻄﻠﺒﺎت ﻧﻈﺎم اﳌﻌﻠﻮﻣﺎت‬ ‫١- ﺗﺤﻠﻴﻞ اﻷﺟﻬﺰة :‬ ‫اﻟﻄﺮﻓﻴﺎت ‪ client‬ﺗﻼﺛﺔ وﺗﻜﻮن ﺑﺎﳌﻮاﺻﻔﺎت اﻟﺘﺎﻟﻴﺔ:‬ ‫ﻧﻮع اﳉﻬﺎز 0022 ‪HP DX‬‬ ‫اﳌﻌﺎﰿ : ‪Intel Processor Core i3 , ٦ GHz‬‬ ‫اﻟﺬاﻛﺮة اﻟﺮﺋﻴﺴﻴﺔ :‪RAM ٣GB‬‬ ‫اﻟﻘﺮص اﻟﺼﻠﺐ:‪HDD 350 GB‬‬ ‫ﻣﺸﻐﻞ اﻹﻗﺮاص اﻟﺼﻠﺒﺔ:25:‪DVD:RM‬‬ ‫اﻟﺸﺎﺷﺔ :‪MONITOR17" LCD‬‬ ‫7‬
    • ‫٢- ﺗﺤﻠﻴﻞ اﻟﺒﺮﻣﺠﻴﺎت:‬ ‫اﻟﱪﳎﻴﺎت اﳌﻘﱰﺣﺔ ﻫﻲ:-‬ ‫ ﻧﻈﺎم اﻟﺘﺸﻐﻴﻞ ﻳﻜﻮن 3002‪ windows server‬ﻋﻠﻲ ﻣﺴﺘﻮي اﳉﻬﺎز‬‫اﻟﺮﺋﻴﺴﻲ اﳌﺨﺪم ‪ server‬إﻣﺎ ﻋﻠﻲ ﻣﺴﺘﻮي اﻻﺟﻬﺰﻩ اﻟﻄﺮﻓﻴﺔ ‪ client‬ﻳﻜﻮن‬ ‫‪.windows xp‬‬ ‫ ﻧﻈﺎم إدارة ﻗﻮاﻋﺪ اﻟﺒﻴﺎﻧﺎت اﳌﺴﺘﺨﺪم ﰲ ﻣﻌﺎﳉﺔ اﻟﺒﻴﺎﻧﺎت وﲣﺰﻳﻨﻬﺎ ﻫﻮ ‪oracle‬‬‫‪.10g‬‬ ‫٣- ﺗﺤﻠﻴﻞ اﻟﺸﺒﻜﺎت:‬ ‫ ﺷﺒﻜﺔ ﳏﻠﻴﺔ ﳒﻤﻴﺔ ﺗﻮﺻﻞ ﺑﻜﺎﺑﻼت ﻣﻦ اﻟﻨﻮع ‪. twisted pair‬‬‫- ﺟﻬﺎز ‪ switch‬ﻟﺮﺑﻂ اﻷﺟﻬﺰة ﻣﻊ ﺑﻌﻀﻬﺎ اﻟﺒﻌﺾ.‬ ‫8‬
    • ‫إﻋﺪاد ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت اﻷوﻟﻴﺔ ‪Conceptual Database‬‬ ‫ﯾورد‬ ‫1‬ ‫اﻟﻣورد‬ ‫ﺑوﻟﺳﺗﺔ اﻟﺷﺣن‬ ‫)اﻷﺻﻧﺎف(‬ ‫ﯾﺳﺗﻠم‬ ‫وﯾوﻗﻊ‬ ‫‪M‬‬ ‫1‬ ‫1‬ ‫اﻟﻣوظف‬ ‫1‬ ‫1‬ ‫1‬ ‫ُ‬ ‫ﺗﺧزن‬ ‫ﯾﺳﺗﺧرج‬ ‫1‬ ‫ﯾﺗﺄﻛد‬ ‫ﻣن‬ ‫‪M‬‬ ‫‪M‬‬ ‫ﯾطﻠب‬ ‫)ﯾﺣدد‬ ‫اﻹﺿﺎﻓﮫ‬ ‫‪M‬‬ ‫اﻟﻣﺧزن‬ ‫ﯾﺳﺗﻠم‬ ‫ﺻرﻓﮫ)إذن‬ ‫ﺗﺳﻠﯾم(‬ ‫1‬ ‫‪M‬‬ ‫‪M‬‬ ‫اﻟﻌﻣﯾل‬ ‫ﯾﺳﺗﻠم‬ ‫‪M‬‬ ‫‪M‬‬ ‫‪M‬‬ ‫اﻟﻣﺳﺗﻠم‬ ‫ﯾﺳﺗﻠم‬ ‫ﯾدﻓﻊ‬ ‫اﻟﻣﺑﻠﻎ‬ ‫1‬ ‫1‬ ‫اﻟﺧزﯾﻧﮫ‬ ‫9‬ ‫ﻓﺎﺗورة اﻟﻣﺑﯾﻌﺎت‬
    • Logical Database ‫ﺗﺼﻤﻴﻢ ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت اﻟﻤﻨﻄﻘﻴﺔ‬ receives received_id received_name Emp Emp_id Emp_name Emp_address Emp_phone Emp_job customer customer_id customer_name customer_phone customer_address Company Company_id Company_name Company_email Company _Country Incoming Incoming_id Item_type_id Item_id Incoming_detail_unit Incoming_detail_qty Incoming_detail_total Incoming_detail_note Supplier_id Item Item_id Item_name Item_type_id Company_id Item_price Item_max Item_min Stock Stock Stock_id Stock_name Emp_id outgoing outgoing_id Item_type_id Item_id outgoing _detail_unit outgoing _detail_qty outgoing_detail_total outgoing _detail_note received_id Invoices Invoices _id Item_type_id Item_id Invoices _detail_qty Item_price Incoming_detail_total Incoming_detail_note Customer_id Supplier Supplier_id Supplier_name Supplier_phone Supplier_email Supplier_address 10
    • ‫ )ﻣﺮاﺟﻌﺔ اﻟﻨﻤﻮذج‬Normalization ‫ﺗﺤﺴﻴﻦ ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت اﻟﻤﻨﻄﻘﻴﺔ‬ : (‫اﻟﻤﻨﻄﻘﻲ‬ ‫ﻳﻮﺟﺪ ﺗﻜﺮار ﰲ ﻫﺬﻩ اﻟﺒﻴﺎﻧﺎت ﻛﺬﻟﻚ ﺑﻌﺾ اﳉﺪاول ﻏﲑ ﻣﺮﺑﻮﻃﻪ ﻣﻊ ﺑﻘﻴﺔ اﳉﺪاول ﻓﻴﺘﻢ‬ ‫و‬ ‫ ﻋﻠﻰ ﻫﺬا اﳌﺨﻄﻂ ﻟﻴﻜﻮن ﻣﱰاﺑﻂ وﻣﺘﻜﺎﻣﻞ‬normalization ‫ﺗﻄﺒﻴﻖ ﻗﻮاﻋﺪ ال‬ : ‫وﻻﻳﻮﺟﺪ ﺑﻪ ﺗﻜﺮار ، واﻟﺘﻐﻴﲑ ﻳﻜﻮن ﻛﺎﻟﺘﺎﱄ‬ job job_id job_name Emp Emp_id Emp_name Emp_address Emp_phone Job_id Company Company_id Company_name Company_email Country_id Country Country_id Country_name outgoing_detail outgoing_id Item_type_id Item_id outgoing _detail_unit outgoing _detail_qty outgoing_detail_total outgoing _detail_note Outgoing Outgoing_id Outgoing_date Received_id 11
    • Incoming_detail Incoming_id Item_type_id Item_id Incoming_detail_unit Incoming_detail_qty Incoming_detail_total Incoming_detail_note Incoming Incoming_id Buy_no Incoming_date Supplier_id Stock_id Invoices_detail Invoices _id Item_type_id Item_id Invoices _detail_qty Item_price Incoming_detail_total Incoming_detail_note Invoices Invoices_id Invoices_date Customer_id Item Item_id Item_name Item_type_id Company_id Item_price Item_max Item_min Stock_id Item_type Item_type_id Item_type_name 12
    • Logical Database (‫ﺗﺼﻤﻴﻢ ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت اﻟﻤﻨﻄﻘﻴﺔ )ﺑﻌﺪ اﻟﺘﻌﺪﻳﻞ‬ job job_id job_name Emp Emp_id Emp_name Emp_address Emp_phone Job_id Item Item_id Item_name Item_type_id Company_id Item_price Item_max Item_min Stock_id Stock Stock_id Stock_name Emp_id Supplier Supplier_id Supplier_name Supplier_phone Supplier_email Supplier_address Country Country_id Country_name customer customer_id customer_name customer_phone customer_address Company Company_id Company_name Company_email Country_id Incoming_detail Incoming_id Item_type_id Item_id Incoming_detail_unit Incoming_detail_qty Incoming_detail_total Incoming_detail_note Incoming Incoming_id Buy_no Incoming_date Supplier_id Stock_id Invoices Invoices_id Invoices_date Customer_id receives received_id received_name Outgoing Outgoing_id Outgoing_date Received_id outgoing_detail outgoing_id Item_type_id Item_id outgoing _detail_unit outgoing _detail_qty outgoing_detail_total outgoing _detail_note Invoices_detail Invoices _id Item_type_id Item_id Invoices _detail_qty Item_price Incoming_detail_total Incoming_detail_note Item_type Item_type_id Item_type_name 13
    • ‫ﺗﻨﻔﻴﺬ ﻗﺎﻋﺪة اﻟﺒﻴﺎﻧﺎت اﻟﻔﻴﺰﻳﺎﺋﻴﺔ ‪Physical Database‬‬ ‫١- ﺟﺪول اﻟﻮﻇﻴﻔﻪ ‪job‬‬ ‫اﺳم اﻟﺣﻘل‬ ‫اﻹﺳم اﻟﺑرﻣﺟﻲ‬ ‫ﺣﺟم اﻟﺣﻘل‬ ‫ع اﻟﺑﯾﺎﻧﺎت‬ ‫ﻧو‬ ‫اﻟﺧﺻﺎﺋص‬ ‫رﻗم اﻟوظﯾﻔﺔ‬ ‫‪١٠ Job_id‬‬ ‫2‪VARCHAR‬‬ ‫‪PK‬‬ ‫إﺳم اﻟوظﯾﻔﺔ‬ ‫‪٣٠ Job_name‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫٢- ﺟﺪول اﻟﻤﻮﻇﻒ ‪emp‬‬ ‫اﺳم اﻟﺣﻘل‬ ‫اﻹﺳم اﻟﺑرﻣﺟﻲ‬ ‫ﺣﺟم اﻟﺣﻘل‬ ‫ع اﻟﺑﯾﺎﻧﺎت‬ ‫ﻧو‬ ‫اﻟﺧﺻﺎﺋص‬ ‫رﻗم اﻟﻣوظف‬ ‫‪١٠ Emp_id‬‬ ‫2‪VARCHAR‬‬ ‫‪PK‬‬ ‫إﺳم اﻟﻣوظف‬ ‫‪٣٠ Emp_name‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫اﻟﻌﻧوان‬ ‫‪٣٠ Emp_address‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫اﻟﻬﺎﺗف‬ ‫‪١٤ Emp_phone‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫‪١٠ Job_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫رﻗم اﻟوظﯾﻔﺔ‬ ‫٣- ﺟﺪول اﻟﻌﻤﻴﻞ ‪customer‬‬ ‫اﺳم اﻟﺣﻘل‬ ‫اﻹﺳم اﻟﺑرﻣﺟﻲ‬ ‫ﺣﺟم اﻟﺣﻘل‬ ‫ع اﻟﺑﯾﺎﻧﺎت‬ ‫ﻧو‬ ‫اﻟﺧﺻﺎﺋص‬ ‫رﻗم اﻟﻌﻣﯾل‬ ‫‪١٠ Customer_id‬‬ ‫2‪VARCHAR‬‬ ‫‪PK‬‬ ‫إﺳم اﻟﻌﻣﯾل‬ ‫‪٣٠ Customer_name‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫اﻟﻬﺎﺗف‬ ‫‪١٤ Customer_phone‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫اﻟﻌﻧوان‬ ‫‪٣٠ Customer_address‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫٤- ﺟﺪول اﻟﺒﻠﺪ ‪country‬‬ ‫اﺳم اﻟﺣﻘل‬ ‫رﻗم اﻟﺑﻠد‬ ‫اﻹﺳم اﻟﺑرﻣﺟﻲ‬ ‫ﺣﺟم اﻟﺣﻘل‬ ‫‪١٠ Country_id‬‬ ‫ع اﻟﺑﯾﺎﻧﺎت‬ ‫ﻧو‬ ‫2‪VARCHAR‬‬ ‫41‬ ‫اﻟﺧﺻﺎﺋص‬ ‫‪PK‬‬
    • ‫إﺳم اﻟﺑﻠد‬ ‫‪٣٠ Country_name‬‬ ‫--‬ ‫2‪VARCHAR‬‬ ‫٥- ﺟﺪول ﻛﻪ اﻟﻤﺼﻨﻌﻪ ‪company‬‬ ‫اﻟﺸﺮ‬ ‫اﺳم اﻟﺣﻘل‬ ‫اﻹﺳم اﻟﺑرﻣﺟﻲ‬ ‫ﺣﺟم اﻟﺣﻘل‬ ‫ع اﻟﺑﯾﺎﻧﺎت‬ ‫ﻧو‬ ‫اﻟﺧﺻﺎﺋص‬ ‫رﻗم اﻟﺷرﻛﻪ‬ ‫‪١٠ Company_id‬‬ ‫2‪VARCHAR‬‬ ‫‪PK‬‬ ‫إﺳم اﻟﺷرﻛﻪ‬ ‫‪٣٠ Company_name‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫اﻟﺑرﯾد اﻹﻟﻛﺗروﻧﻲ‬ ‫‪٣٠ Company_email‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫‪١٠ Country_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫اﻟﺑﻠد‬ ‫٦- ﺟﺪول أﻧﻮاع اﻷﺻﻨﺎف ‪item_type‬‬ ‫اﺳم اﻟﺣﻘل‬ ‫اﻹﺳم اﻟﺑرﻣﺟﻲ‬ ‫ﺣﺟم اﻟﺣﻘل‬ ‫ع اﻟﺑﯾﺎﻧﺎت‬ ‫ﻧو‬ ‫اﻟﺧﺻﺎﺋص‬ ‫رﻗم ع اﻟﺻﻧف‬ ‫ﻧو‬ ‫‪١٠ Item_type_id‬‬ ‫2‪VARCHAR‬‬ ‫‪PK‬‬ ‫إﺳم ع اﻟﺻﻧف‬ ‫ﻧو‬ ‫‪٣٠ Item_type_name‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫٧- ﺟﺪول اﻷﺻﻨﺎف ‪item‬‬ ‫اﺳم اﻟﺣﻘل‬ ‫اﻹﺳم اﻟﺑرﻣﺟﻲ‬ ‫ﺣﺟم اﻟﺣﻘل‬ ‫ع اﻟﺑﯾﺎﻧﺎت‬ ‫ﻧو‬ ‫اﻟﺧﺻﺎﺋص‬ ‫رﻗم اﻟﺻﻧف‬ ‫‪١٠ Item_id‬‬ ‫2‪VARCHAR‬‬ ‫‪PK‬‬ ‫إﺳم اﻟﺻﻧف‬ ‫‪٣٠ Item_name‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫رﻗم ع اﻟﺻﻧف‬ ‫ﻧو‬ ‫‪١٠ Item_type_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫رﻗم اﻟﺷرﻛﻪ اﻟﻣﺻﻧﻌﻪ‬ ‫‪١٠ Company_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫اﻟﺳﻌر‬ ‫‪١٠ Item_price‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫اﻟﺣد اﻷﻋﻠﻰ‬ ‫‪١٠ Item_max‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫اﻟﺣد اﻷدﻧﻰ‬ ‫‪١٠ Item_min‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫رﻗم اﻟﻣﺧزن‬ ‫‪١٠ Stock_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫51‬
    • ‫٨- ﺟﺪول ﻣﺴﺘﻨﺪ اﻹدﺧﺎل ‪incoming‬‬ ‫اﺳم اﻟﺣﻘل‬ ‫رﻗم ﻣﺳﺗﻧد اﻹدﺧﺎل‬ ‫رﻗم اﻟﺷ اء‬ ‫ر‬ ‫ﺗﺎرﯾﺦ اﻹدﺧﺎل‬ ‫رﻗم اﻟﻣورد‬ ‫رﻗم اﻟﻣﺧزن‬ ‫ﺣﺟم اﻟﺣﻘل‬ ‫اﻹﺳم اﻟﺑرﻣﺟﻲ‬ ‫ع اﻟﺑﯾﺎﻧﺎت‬ ‫ﻧو‬ ‫اﻟﺧﺻﺎﺋص‬ ‫‪١٠ Incoming_id‬‬ ‫2‪VARCHAR‬‬ ‫‪PK‬‬ ‫‪١٠ Buy_no‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫‪-- Incoming_date‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫‪١٠ Supplier_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫‪١٠ Stock_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫٩- ﺟﺪول اﻟﻤﻮاد اﻟﻤﺪﺧﻠﻪ ﻓﻲ ﻣﺴﺘﻨﺪ اﻹدﺧﺎل ‪incoming_detail‬‬ ‫اﺳم اﻟﺣﻘل‬ ‫رﻗم ﻣﺳﺗﻧد اﻹدﺧﺎل‬ ‫اﻹﺳم اﻟﺑرﻣﺟﻲ‬ ‫ﺣﺟم اﻟﺣﻘل‬ ‫ع اﻟﺑﯾﺎﻧﺎت‬ ‫ﻧو‬ ‫اﻟﺧﺻﺎﺋص‬ ‫‪١٠ Incoming_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫‪١٠ Item_type_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫‪١٠ Item_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫اﻟوﺣدﻩ‬ ‫‪٣٠ Incoming_detail_unit‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫اﻟﻛﻣﯾﻪ اﻟﻣدﺧﻠﻪ‬ ‫‪١٠ Incoming_detail_qty‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫اﻹﺟﻣﺎﻟﻲ‬ ‫‪١٠ Incoming_detail_total‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫ﻣﻼﺣظﺎت‬ ‫‪٥٠ Incoming_detail_note‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫رﻗم ع اﻟﺻﻧف‬ ‫ﻧو‬ ‫رﻗم اﻟﺻﻧف‬ ‫٠١- ﺟﺪول اﻟﻤﺴﺘﻠﻤﻴﻦ ‪receives‬‬ ‫اﺳم اﻟﺣﻘل‬ ‫اﻹﺳم اﻟﺑرﻣﺟﻲ‬ ‫ﺣﺟم اﻟﺣﻘل‬ ‫ع اﻟﺑﯾﺎﻧﺎت‬ ‫ﻧو‬ ‫اﻟﺧﺻﺎﺋص‬ ‫رﻗم اﻟﻣﺳﺗﻠم‬ ‫‪١٠ Received_id‬‬ ‫2‪VARCHAR‬‬ ‫‪PK‬‬ ‫إﺳم اﻟﻣﺳﺗﻠم‬ ‫‪٣٠ Received_name‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫61‬
    • ‫١١- ﺟﺪوإل ﻣﺴﺘﻨﺪ اﻹﺧﺮاج ‪outgoing‬‬ ‫اﺳم اﻟﺣﻘل‬ ‫رﻗم ﺳﻧد اﻹﺧ اج‬ ‫ر‬ ‫ﺗﺎرﯾﺦ اﻹﺧ اج‬ ‫ر‬ ‫رﻗم اﻟﻣﺳﺗﻠم‬ ‫ﺣﺟم اﻟﺣﻘل‬ ‫اﻹﺳم اﻟﺑرﻣﺟﻲ‬ ‫ع اﻟﺑﯾﺎﻧﺎت‬ ‫ﻧو‬ ‫اﻟﺧﺻﺎﺋص‬ ‫‪١٠ Outgoing_id‬‬ ‫2‪VARCHAR‬‬ ‫‪PK‬‬ ‫‪-- Outgoing_date‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫‪١٠ Received_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫٢١- ﺟﺪول اﻟﺒﻴﺎﻧﺎت اﻟﻤﺪﺧﻠﻪ ﻓﻲ ﻣﺴﺘﻨﺪ اﻹﺧﺮاج ‪outgoing_detail‬‬ ‫اﺳم اﻟﺣﻘل‬ ‫اﻹﺳم اﻟﺑرﻣﺟﻲ‬ ‫ﺣﺟم اﻟﺣﻘل‬ ‫ع اﻟﺑﯾﺎﻧﺎت‬ ‫ﻧو‬ ‫اﻟﺧﺻﺎﺋص‬ ‫رﻗم ﺳﻧد اﻹﺧ اج‬ ‫ر‬ ‫‪١٠ Outgoing_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫رﻗم ع اﻟﺻﻧف‬ ‫ﻧو‬ ‫‪١٠ Item_type_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫‪١٠ Item_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫اﻟوﺣدﻩ‬ ‫‪٣٠ Outgoing__detail_unit‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫اﻟﻛﻣﯾﻪ‬ ‫‪١٠ Outgoing__detail_qty‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫اﻹﺟﻣﺎﻟﻲ‬ ‫‪١٠ Outgoing__detail_total‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫ﻣﻼﺣظﺎت‬ ‫‪٥٠ Outgoing__detail_note‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫رﻗم اﻟﺻﻧف‬ ‫٣١- ﺟﺪول اﻟﻤﺨﺰن ‪stock‬‬ ‫اﺳم اﻟﺣﻘل‬ ‫اﻹﺳم اﻟﺑرﻣﺟﻲ‬ ‫ﺣﺟم اﻟﺣﻘل‬ ‫ع اﻟﺑﯾﺎﻧﺎت‬ ‫ﻧو‬ ‫اﻟﺧﺻﺎﺋص‬ ‫رﻗم اﻟﻣﺧزن‬ ‫‪١٠ Stock_id‬‬ ‫2‪VARCHAR‬‬ ‫‪PK‬‬ ‫إﺳم اﻟﻣﺧزن‬ ‫‪٣٠ Stock_name‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫رﻗم اﻟﻣوظف‬ ‫‪١٠ Emp_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫71‬
    • ‫٤١- ﺟﺪول ﻓﺎﺗﻮرة اﻟﺒﻴﻊ ‪invoices‬‬ ‫اﺳم اﻟﺣﻘل‬ ‫رﻗم ﻓﺎﺗو ة اﻟﺑﯾﻊ‬ ‫ر‬ ‫ﺗﺎرﯾﺦ ﻓﺎﺗو ة اﻟﺑﯾﻊ‬ ‫ر‬ ‫رﻗم اﻟﻌﻣﯾل اﻟﺻﺎد ة ﻟﻪ‬ ‫ر‬ ‫ﺣﺟم اﻟﺣﻘل‬ ‫اﻹﺳم اﻟﺑرﻣﺟﻲ‬ ‫ع اﻟﺑﯾﺎﻧﺎت‬ ‫ﻧو‬ ‫اﻟﺧﺻﺎﺋص‬ ‫‪١٠ Invoices_id‬‬ ‫2‪VARCHAR‬‬ ‫‪PK‬‬ ‫‪-- Invoices_date‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫‪١٠ Customer_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫٥١- ﺟﺪول اﻟﻤﻮاد اﻟﺼﺎدرة ﻓﻲ ﻓﺎﺗﻮرة اﻟﺒﻴﻊ ‪invoice_detail‬‬ ‫اﺳم اﻟﺣﻘل‬ ‫رﻗم ﻓﺎﺗو ة اﻟﺑﯾﻊ‬ ‫ر‬ ‫اﻹﺳم اﻟﺑرﻣﺟﻲ‬ ‫ﺣﺟم اﻟﺣﻘل‬ ‫ع اﻟﺑﯾﺎﻧﺎت‬ ‫ﻧو‬ ‫اﻟﺧﺻﺎﺋص‬ ‫‪١٠ Invoice_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫‪١٠ Item_type_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫‪١٠ Item_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫اﻟﻛﻣﯾﻪ‬ ‫‪١٠ Invoice_detail_qty‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫اﻟﺳﻌر‬ ‫‪١٠ Item_price‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫اﻹﺟﻣﺎﻟﻲ‬ ‫‪١٠ Invoice_detail_total‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫ﻣﻼﺣظﺎت‬ ‫‪٥٠ Invoice_detail_note‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫رﻗم ع اﻟﺻﻧف‬ ‫ﻧو‬ ‫رﻗم اﻟﺻﻧف‬ ‫٦١- ﺟﺪول اﻟﻤﻮردﻳﻦ ‪supplier‬‬ ‫اﺳم اﻟﺣﻘل‬ ‫اﻹﺳم اﻟﺑرﻣﺟﻲ‬ ‫ﺣﺟم اﻟﺣﻘل‬ ‫ع اﻟﺑﯾﺎﻧﺎت‬ ‫ﻧو‬ ‫اﻟﺧﺻﺎﺋص‬ ‫رﻗم اﻟﻣورد‬ ‫‪١٠ Supplier_id‬‬ ‫2‪VARCHAR‬‬ ‫‪PK‬‬ ‫إﺳم اﻟﻣورد‬ ‫‪٣٠ Supplier_name‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫رﻗم اﻟﻬﺎﺗف‬ ‫‪١٤ Supplier_phone‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫‪٣٠ Supplier_email‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫‪٣٠ Supplier_address‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫اﻟﺑرﯾد اﻹﻟﻛﺗروﻧﻲ‬ ‫اﻟﻌﻧوان‬ ‫81‬
    • ‫٧١- ﺟﺪول اﻟﺨﺰﻳﻨﻪ ‪Py‬‬ ‫اﺳم اﻟﺣﻘل‬ ‫رﻗم اﻟﺧزﯾﻧﺔ‬ ‫ع اﻟدﻓﻊ‬ ‫ﻧو‬ ‫ع‬ ‫اﻟﻣﺑﻠﻎ اﻟﻣدﻓو‬ ‫ة اﻟﺑﯾﻊ‬ ‫ﻓﺎﺗور‬ ‫اﻟﻌﻣﯾل‬ ‫اﻟﻣوظف‬ ‫اﻹﺳم اﻟﺑرﻣﺟﻲ‬ ‫ﺣﺟم اﻟﺣﻘل‬ ‫ع اﻟﺑﯾﺎﻧﺎت‬ ‫ﻧو‬ ‫اﻟﺧﺻﺎﺋص‬ ‫‪١٠ Py_Id‬‬ ‫2‪VARCHAR‬‬ ‫‪PK‬‬ ‫‪١٠ Py_Type‬‬ ‫2‪VARCHAR‬‬ ‫--‬ ‫‪١٠ Paid‬‬ ‫‪NUMBER‬‬ ‫--‬ ‫‪١٠ Invoices_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫‪١٠ Customer_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫‪١٠ Emp_id‬‬ ‫2‪VARCHAR‬‬ ‫‪FK‬‬ ‫91‬
    • SQL Code (Create Tables) : CREATE TABLE job (job_id VARCHAR2(10) NOT NULL, job_name VARCHAR2(30), ADD CONSTRAINT job_id_pk PRIMARY KEY (job_id)); CREATE TABLE emp (emp_id VARCHAR2(10) NOT NULL, emp_name VARCHAR2(30), emp_address VARCHAR2(30), emp_phone VARCHAR2(14), job_id VARCHAR2(10), ADD CONSTRAINT emp_id_pk PRIMARY KEY (emp_id), ADD CONSTRAINT emp_job_id_fk FOREIGN KEY (job_id) REFERENCES job (job_id) ON DELETE CASCADE); CREATE TABLE customer (customer_id VARCHAR2(10) NOT NULL, customer_name VARCHAR2(30), customer_phone VARCHAR2(14), customer_address VARCHAR2(30), ADD CONSTRAINT customer_id_pk PRIMARY KEY (customer_id)); CREATE TABLE country (country_id VARCHAR2(10) NOT NULL, country_name VARCHAR2(30), ADD CONSTRAINT country_id_pk PRIMARY KEY (country_id)); CREATE TABLE company (company_id VARCHAR2(10) NOT NULL, company_name VARCHAR2(30), company_email VARCHAR2(30), country_id VARCHAR2(10), ADD CONSTRAINT company_id_pk PRIMARY KEY (company_id), 20
    • ADD CONSTRAINT company_country_id_fk FOREIGN KEY (country_id) REFERENCES country (country_id) ON DELETE CASCADE); CREATE TABLE item_type (item_type_id VARCHAR2(10) NOT NULL, item_type_name VARCHAR2(30), ADD CONSTRAINT item_type_id_pk PRIMARY KEY (item_type_id)); CREATE TABLE item (item_id VARCHAR2(10) NOT NULL, item_name VARCHAR2(30), item_type_id VARCHAR2(10), company_id VARCHAR2(10), item_price VARCHAR2(10), item_max VARCHAR2(10), item_min VARCHAR2(10), stock_id VARCHAR2(10), ADD CONSTRAINT item_id_pk PRIMARY KEY (item_id), ADD CONSTRAINT item_item_type_id_fk FOREIGN KEY (item_type_id) REFERENCES item_type (item_type_id) ON DELETE CASCADE, ADD CONSTRAINT item_company_id_fk FOREIGN KEY (company_id) REFERENCES company (company_id) ON DELETE CASCADE, ADD CONSTRAINT item_stock_id_fk FOREIGN KEY (stock_id) REFERENCES stock (stock_id) ON DELETE CASCADE); CREATE TABLE incoming (incoming_id VARCHAR2(10) NOT NULL, buy_no VARCHAR2(10), incoming_date DATE, supplier_id VARCHAR2(10), stock_id VARCHAR2(10) ADD CONSTRAINT incoming_id_pk PRIMARY KEY (incoming_id), ADD CONSTRAINT incoming_supplier_id_fk FOREIGN KEY (supplier_id) REFERENCES supplier (supplier_id) ON DELETE CASCADE, ADD CONSTRAINT incoming_stock_id_fk FOREIGN KEY (stock_id) 21
    • REFERENCES stock (stock_id) ON DELETE CASCADE); CREATE TABLE incoming_detail (incoming_id VARCHAR2(10), item_type_id VARCHAR2(10), item_id VARCHAR2(10), incoming_detail_unit VARCHAR2(30), incoming_detail_qty VARCHAR2(10), incoming_detail_total VARCHAR2(10), incoming_detail_note VARCHAR2(50), ADD CONSTRAINT incoming_detail_incoming_id_fk FOREIGN KEY (incoming_id) REFERENCES incoming (incoming_id) ON DELETE CASCADE, ADD CONSTRAINT incomin_detail_item_type_id_fk FOREIGN KEY (item_type_id) REFERENCES item_type (item_type_id) ON DELETE CASCADE, ADD CONSTRAINT incoming_detail_item_id_fk FOREIGN KEY (item_id) REFERENCES item (item_id) ON DELETE CASCADE); CREATE TABLE receives (received_id VARCHAR2(10) NOT NULL, received_name VARCHAR2(30), ADD CONSTRAINT receives_id_pk PRIMARY KEY (received_id)); CREATE TABLE outgoing (outgoing_id VARCHAR2(10) NOT NULL, outgoing_date DATE, received_id VARCHAR2(10), ADD CONSTRAINT outgoing_id_pk PRIMARY KEY (outgoing_id), ADD CONSTRAINT outgoing_received_id_fk FOREIGN KEY (received_id) REFERENCES receives (received_id) ON DELETE CASCADE); 22
    • CREATE TABLE outgoing_detail (outgoing_id VARCHAR2(10), item_type_id VARCHAR2(10), item_id VARCHAR2(10), outgoing__detail_unit VARCHAR2(30), outgoing__detail_qty VARCHAR2(10), outgoing__detail_total VARCHAR2(10), outgoing__detail_note VARCHAR2(50), ADD CONSTRAINT outgoing_detail_outgoing_id_fk FOREIGN KEY (outgoing_id) REFERENCES outgoing (outgoing_id) ON DELETE CASCADE, ADD CONSTRAINT outgoin_detail_item_type_id_fk FOREIGN KEY (item_type_id) REFERENCES item_type (item_type_id) ON DELETE CASCADE, ADD CONSTRAINT outgoing_detail_item_id_fk FOREIGN KEY (item_id) REFERENCES item (item_id) ON DELETE CASCADE); CREATE TABLE stock (stock_id VARCHAR2(10) NOT NULL, stock_name VARCHAR2(30), emp_id VARCHAR2(10), ADD CONSTRAINT stock_id_pk PRIMARY KEY (stock_id), ADD CONSTRAINT stock_emp_id_fk FOREIGN KEY (emp_id) REFERENCES emp (emp_id) ON DELETE CASCADE); CREATE TABLE invoices (invoices_id VARCHAR2(10) NOT NULL, invoices_date DATE, customer_id VARCHAR2(10), ADD CONSTRAINT invoices_id_pk PRIMARY KEY (invoices_id), ADD CONSTRAINT invoices_customer_id_fk FOREIGN KEY (customer_id) REFERENCES customer (customer_id) ON DELETE CASCADE); 23
    • CREATE TABLE invoice_detail (invoice_id VARCHAR2(10), item_type_id VARCHAR2(10), item_id VARCHAR2(10), invoice_detail_qty VARCHAR2(10), item_price VARCHAR2(10), invoice_detail_total VARCHAR2(10), invoice_detail_note VARCHAR2(50), ADD CONSTRAINT invoice_detail_invoice_id_fk FOREIGN KEY (invoice_id) REFERENCES invoices (invoices_id) ON DELETE CASCADE, ADD CONSTRAINT invoice_detail_item_type_id_fk FOREIGN KEY (item_type_id) REFERENCES item_type (item_type_id) ON DELETE CASCADE, ADD CONSTRAINT invoice_detail_item_id_fk FOREIGN KEY (item_id) REFERENCES item (item_id) ON DELETE CASCADE, ADD CONSTRAINT invoice_detail_item_price_fk FOREIGN KEY (item_price) REFERENCES item (item_id) ON DELETE CASCADE); CREATE TABLE supplier (supplier_id VARCHAR2(10) NOT NULL, supplier_name VARCHAR2(30), supplier_phone VARCHAR2(14), supplier_email VARCHAR2(30), supplier_address VARCHAR2(30), ADD CONSTRAINT supplier_id_pk PRIMARY KEY (supplier_id)); 24
    • : (‫اﻹﺳﺘﻌﻼﻣﺎت اﻟﺘﻲ ﺗﻠﺒﻲ اﻟﻤﺘﻄﻠﺒﺎت )اﻟﺘﻘﺎرﻳﺮ‬ ‫١. ﺗﻘﺮﻳﺮ ﺑﻔﻮاﺗﲑ اﻟﺒﻴﻊ ﺑﺘﺎرﻳﺦ ﻣﻌﲔ‬ Select * From invouces Where invouces_date='10-10-2012'; . ‫٢. ﺗﻘﺮﻳﺮ ﺑﻔﻮاﺗﲑ اﻟﺒﻴﻊ ﰲ ﻣﺪة زﻣﻨﻴﻪ ﳏﺪدﻩ‬ Select * From invouces Where invouces_date between '1-10-2012' and '1-10-2013'; . ‫٣. ﺗﻘﺮﻳﺮ ﺑﻌﺪد ﻓﻮاﺗﲑ اﳌﺒﻴﻌﺎت ﰲ ﻓﱰة ﳏﺪدﻩ‬ Select count(*) From invouces Where invouces_date between '1-10-2012' and 25
    • '1-10-2013'; . ‫٤. ﺗﻘﺮﻳﺮ ﺑﻔﻮاﺗﲑ اﻟﺒﻴﻊ ﻟﻌﻤﻴﻞ ﻣﻌﲔ‬ Select customer_id, invouces_id, invouces_date From invouces,customer Where customer.customer_id = invouces.customer_id; . ‫٥. ﺗﻘﺮﻳﺮ ﺑﺎﻷﺻﻨﺎف اﻟﱵ ﺗﺴﺘﻮردﻫﺎ ﻛﻪ و ﻛﺎت اﳌﺼﻨﻌﻪ ﳍﺎ وﺑﻠﺪ اﳌﻨﺸﺄ‬ ‫اﻟﺸﺮ اﻟﺸﺮ‬ Select item_id,company_id,country_id From item,company,country Where (item.company_id = company. company_id) and (company. country_id= country. country_id); . ‫٦. ﺗﻘﺮﻳﺮ ﺑﺄﻧﻮاع اﻷﺻﻨﺎف اﻟﱵ ﺗﺴﺘﻮردﻫﺎ ﻛﻪ‬ ‫اﻟﺸﺮ‬ Select item_type_id From item_type; 26
    • . ‫٧. ﺗﻘﺮﻳﺮ ﺑﺎﳊﺪ اﻷﻋﻠﻰ واﳊﺪ اﻷدﱏ ﻟﻜﻞ ﺻﻨﻒ‬ Select item_ name,item_max,item_min From item; . (‫٨. ﺗﻘﺮﻳﺮ ﺑﺎﻷﺻﻨﺎف اﻟﱵ وﺻﻠﺖ ﻟﻠﺤﺪ اﻷدﱏ )اﻷﺻﻨﺎف اﻟﱵ ﳚﺐ اﻟﺸﺮاء ﻣﻨﻬﺎ‬ Select item_ id, item_min From item; . ‫٩. ﺗﻘﺮﻳﺮ ﺑﺎﻷﺻﻨﺎف ﺣﺴﺐ ﻧﻮع ﻣﻌﲔ‬ Select item_type_id,item_id From item,item_type Where item. item_type_id = item_type. item_type_id Group by item_type_name; 27
    • . ‫ﺗﻘﺮﻳﺮ ﺑﺎﻷﺻﻨﺎف اﻟﱵ ﰎ ﺑﻴﻌﻬﺎ ﺑﺘﺎرﻳﺦ ﻣﻌﲔ‬ .١٠ Select item_id, From item Where item_type_id ='1'; . ‫ﺗﻘﺮﻳﺮ ﺑﺎﻷﺻﻨﺎف اﳌﺘﻮﻓﺮﻩ ﺑﺎﳌﺨﺰن ﺣﺴﺐ اﳌﺨﺰن اﳌﻮﺟﻮدﻩ ﻓﻴﻪ‬ .١١ Select item_id ,stock_id From item,stock Where (item. stock_id = stock. stock_id) Group by stock_id; . ‫ﺗﻘﺮﻳﺮ ﺑﺄﺣﺪث وأﻗﺪم ﻓﺎﺗﻮرة ﺑﻴﻊ‬ .١٢ SELECT MAX(invoices_date), MIN(invoices_date) FROM invoices; . ‫ﺗﻘﺮﻳﺮ ﺑﻜﻞ اﳌﻮﻇﻔﲔ اﻟﺬﻳﻦ ﻳﻌﻤﻠﻮن ﰲ ﻛﻪ‬ ‫اﻟﺸﺮ‬ 28 .١٣
    • ‫‪SELECT emp_id,emp_name‬‬ ‫;‪FROM emp‬‬ ‫٤١.‬ ‫ﺗﻘﺮﻳﺮ ﺑﺎﳌﻮردﻳﻦ اﻟﺬﻳﻦ ﺗﺘﻌﺎﻣﻞ ﻣﻌﻬﻢ ﻛﻪ .‬ ‫اﻟﺸﺮ‬ ‫‪SELECT supplier_id, supplier_name‬‬ ‫;‪FROM supplier‬‬ ‫٥١.‬ ‫ﺗﻘﺮﻳﺮ ﺑﻜﻞ اﻟﻌﻤﻼء اﻟﺬﻳﻦ ﻳﺘﻌﺎﻣﻠﻮن ﻣﻊ ﻛﺔ .‬ ‫اﻟﺸﺮ‬ ‫‪SELECT customer_id, customer_name‬‬ ‫;‪FROM customer‬‬ ‫وﻳﻤﻜﻦ أن ﺗﻀﺎف ﺗﻘﺎرﻳﺮ أﺧﺮى ﺣﺴﺐ ﺣﺠﺔ اﻟﻤﺆﺳﺴﺔ ﻟﻬﺎ .‬ ‫92‬
    • ‫ﺷﺎﺷﺎت اﻟﻨﻈﺎم :‬ ‫ﺷﺎﺷﺎت ﻧﻈﺎم اﻟﻤﺒﻴﻌﺎت ﻛﺔ اﻟﺨﻨﺪﻗﺎوي :‬ ‫ﻟﺸﺮ‬ ‫١- ﺷﺎﺷﺔ اﻟﺪﺧﻮل ﻟﻨﻈﺎم اﻟﻤﺒﻴﻌﺎت‬ ‫03‬
    • ‫٢- اﻟﺸﺎﺷﺔ اﻟﺮﺋﻴﺴﺔ ﻟﻨﻈﺎم اﻟﻤﺒﻴﻌﺎت‬ ‫13‬
    • ‫٣- ﺷﺎﺷﺔ ﻛﺎت اﻟﻤﺼﻨﻌﻪ‬ ‫اﻟﺸﺮ‬ ‫23‬
    • ‫٤- ﺷﺎﺷﺔ اﻟﺒﻠﺪان‬ ‫33‬
    • ‫٥- ﺷﺎﺷﺔ اﻟﻌﻤﻼء‬ ‫43‬
    • ‫٦- ﺷﺎﺷﺔ اﻟﻤﻮﻇﻔﻴﻦ‬ ‫53‬
    • ‫٧- ﺷﺎﺷﺔ ﻣﺴﺘﻨﺪ اﻹدﺧﺎل وﺗﻔﺎﺻﻴﻠﻪ‬ ‫63‬
    • ‫٨- ﺷﺎﺷﺔ اﻷﺻﻨﺎف‬ ‫73‬
    • ‫٩- ﺷﺎﺷﺔ أﻧﻮاع اﻷﺻﻨﺎف‬ ‫83‬
    • ‫٠١- ﺷﺎﺷﺔ اﻟﻮﻇﺎﺋﻒ‬ ‫93‬
    • ‫١١- ﺷﺎﺷﺔ ﻣﺴﺘﻨﺪ اﻹﺧﺮاج وﺗﻔﺎﺻﻠﻴﻪ‬ ‫04‬
    • ‫٢١- ﺷﺎﺷﺔ اﻟﻤﺴﺘﻠﻤﻴﻦ‬ ‫14‬
    • ‫٣١- ﺷﺎﺷﺔ اﻟﻤﺨﺎزن‬ ‫24‬
    • ‫٤١- ﺷﺎﺷﺔ اﻟﻤﻮردﻳﻦ‬ ‫34‬
    • ‫٥١- ﺷﺎﺷﺔ ﻓﺎﺗﻮرة اﻟﺒﻴﻊ وﺗﻔﺎﺻﻠﻴﻬﺎ‬ ‫ﺗﻢ ﺑﺤﻤﺪ اﷲ‬ ‫44‬