Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Database Design & Implementation

749 views

Published on

  • Be the first to comment

  • Be the first to like this

Database Design & Implementation

  1. 1. Submitted to: Dr Ala Al-Zobaidie Greenwich Coordinator Submitted by: Md. Mahbub Alam Student ID: 000788896 Daffodil Institute of IT, Bangladesh Coursework On Database Design and Implementation Course: COMP1302 Title: Database System for MORP
  2. 2. DATABASE DESIGN AND IMPLEMENTATION 1 Table of Contents [D1] Assumptions....................................................................................................................................2 [D2] Conceptual Model Diagram ............................................................................................................0 [D3] Relational Schema...........................................................................................................................1 [D4] Normalisation Declaration..............................................................................................................0 [D5] Database .........................................................................................................................................1 [D6] SQL Codes........................................................................................................................................2 [D7] User Registration Form ...................................................................................................................3 [D8] Report for Application.....................................................................................................................4 [D9] Master and Detail Form ..................................................................................................................5 [D10] Output of all queries, forms and reports ......................................................................................6 Conclusion...............................................................................................................................................8
  3. 3. DATABASE DESIGN AND IMPLEMENTATION 2 [D1] Assumptions  With Purchase & Metamorphosis table, all query and report can be execute. So, they are not included into the database.  Super Avatars (who are wanted to join breed process) unable to breed if both are under one user.  After sell of avatar user unable to return it with buy.
  4. 4. [D2] Conceptual Model Diagram SPECIES AVATAR MEGA SUPER MASTER SELLUSER WEAPONS_USERWEAPONS Can Contain Has Have Has May Can be Assigned (0,1) (1,M) (1,1) (1,M) (1,1) (1,M) (1,1) (1,M) (1,1) (1,1) (1,1) (1,1) (1,1)(1,M) Sale_IDUID SID AID WUIDWID
  5. 5. DATABASE DESIGN AND IMPLEMENTATION 1 [D3] Relational Schema SPECIES (SID, s_name, strenth, cost) WEAPONS (WID, w_name, range, max_use, damage_factor, cost) WEAPONS_USER (WUID, WID, AID) AVATAR (AID, A_NAME, DOB, joining_date, strenth_indicator, gender, hoard, UID, SID) USER (UID, user_email, password, u_name, DOB, gender, joining_date) SELL (Sale_ID, UID, AID, buyer_id, exchange) SUPER (AID, wisdom_level) MEGA (AID, F_name, m_name, magic_power) MASTER (AID, leadership_skill)
  6. 6. [D4] Normalisation Declaration The Relational Schema satisfies 3NF criteria
  7. 7. DATABASE DESIGN AND IMPLEMENTATION 1 [D5] Database The database for the relational schema as stated above has been done with the DBMS Microsoft Access and named as MORF. So, the MORF database has been attached in a zip file.
  8. 8. DATABASE DESIGN AND IMPLEMENTATION 2 [D6] SQL Codes The SQL code for the application from A1-A4 is given below: A1. SELECT u.user_email AS Email, a.DOB, m.F_name AS Father, m.m_name AS Mother FROM AVATAR AS a, [USER] AS u, MEGA AS m WHERE a.UID=u.UID and m.AID = a.AID and a.a_name= [Insert Avatar Name]; A2. SELECT u.user_email AS [User Email], a.a_name AS [Avatar Name], sp.s_name AS [Species Name], s.wisdom_level AS [Wisdom Category], m.leadership_skill AS [Leadership Skill], a.hoard AS Hoard FROM SPECIES AS sp, AVATAR AS a, [USER] AS u, MASTER AS m, SUPER AS s WHERE a.UID=u.UID and m.AID = a.AID and s.AID = a.AID and sp.SID = a.SID and a.DOB >= [First Date ] and a.DOB <= [Last Date ] ORDER BY a.hoard; A3. SELECT a.a_name AS [Avater Name], a.DOB, a.strenth_indicator AS [Strenth Indicator], a.gender AS Gender, a.hoard AS Hoard, s.wisdom_level AS [Wisdom Level], sa.UID AS [User ID], sa.buyer_id AS [Buyer ID], sa.exchange AS [Exchange Date] FROM AVATAR AS a, [USER] AS u, SELL AS sa, SUPER AS s WHERE sa.AID = a.AID and s.AID = sa.AID and u.UID = sa.UID and a.AID in ( Select AID from SELL group by AID having count(AID)>2); A4. SELECT AVATAR.a_name, SPECIES.s_name, MEGA.magic_power, MEGA.f_name, s1.s_name, s1.cost, SUPER.wisdom_level, MEGA.m_name, s2.s_name, s2.cost, su.wisdom_level FROM MEGA, AVATAR, SPECIES, SUPER, SPECIES AS s1, SPECIES AS s2, AVATAR AS a1, AVATAR AS a2, SUPER AS su WHERE MEGA.AID=AVATAR.AID and AVATAR.a_name=SPECIES.s_name and MEGA.AID=SUPER.AID and SUPER.AID=a1.AID and a1.a_name=s1.s_name And MEGA.AID=su.AID And su.AID=a2.AID And a2.a_name=s2.s_name And AVATAR.hoard>16;
  9. 9. DATABASE DESIGN AND IMPLEMENTATION 3 [D7] User Registration Form
  10. 10. DATABASE DESIGN AND IMPLEMENTATION 4 [D8] Report for Application
  11. 11. DATABASE DESIGN AND IMPLEMENTATION 5 [D9] Master and Detail Form
  12. 12. DATABASE DESIGN AND IMPLEMENTATION 6 [D10] Output of all queries, forms and reports Relationship in Access: Output- A1 Output- A2
  13. 13. DATABASE DESIGN AND IMPLEMENTATION 7 Output- A3 Output- A4
  14. 14. DATABASE DESIGN AND IMPLEMENTATION 8 Conclusion By completing this course work I get knowledge about extended Entity Relationship Diagram, master detail form and report. This course work developed my developing skill my research and creative ability. Now I am more confident about Database Design and Implementation. At this moment I am so much happy by complete this course work successfully.

×