Changes between Initial Version and Version 1 of Version1


Ignore:
Timestamp:
06/14/24 18:12:32 (6 months ago)
Author:
212012
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Version1

    v1 v1  
     1= Верзија 1
     2
     3== Определување функциски зависности и да нема нешто со исто име на атрибут
     4
     5*s_id = statement_id
     6
     7R = { pe_id, first_name, last_name, gender, address, picture, contact, embg, date_of_birth, country, nationality, o_badge_no, o_password, o_date_of_employment, p_id, p_address, s_id, city, p_date_of_employment, badge_no, rank, p_password, statement_id, statement_date, description, incident_timestamp, incident_place, e_id, e_name, e_type, is_found, e_picture, c_id, c_name, opening_date, c_status, date_of_closing, sc_description, final_document, t_id, t_name }
     8
     9pe_id -> first_name, last_name, gender, address, picture, contact, embg, date_of_birth, country, nationality \\
     10o_badge_no -> pe_id, o_password, o_date_of_employment \\
     11p_id -> p_address, o_badge_no, s_id \\
     12s_id -> city \\
     13badge_no -> pe_id, p_date_of_employment, rank, p_password, p_id \\
     14statement_id -> statement_date, description, incident_timestamp, incident_place, e_id, badge_no \\
     15e_id -> e_name, e_type, is_found, e_picture \\
     16c_id -> c_name, opening_date, c_status, statement_id, e_id, t_id, p_id, date_of_closing \\
     17date_of_closing ->  sc_description, final_document \\
     18t_id -> t_name \\
     19
     20\\
     21Лево \\
     22c_id
     23
     24Лево и десно \\
     25pe_id, t_id, o_badge_no, p_id, s_id, badge_no, statement_id, e_id, date_of_closing, t_id
     26
     27Десно \\
     28first_name, last_name, gender, address, picture, contact, embg, date_of_birth, country, nationality, o_password, o_date_of_employment, p_address, city, p_date_of_employment, rank, p_password,statement_date, description, incident_timestamp, incident_place, e_name, e_type,
     29is_found, e_picture,c_name, opening_date, c_status, sc_description,
     30final_document, t_name
     31
     32c_id+={ c_id, c_name, opening_date, c_status, statement_id, e_id, t_id, p_id, date_of_closing, statement_date, description, incident_timestamp, incident_place, badge_no, e_name, e_type, is_found, e_picture, t_name, p_address, o_badge_no, s_id, sc_description, final_document, city, pe_id, o_password, o_date_of_employment, p_date_of_employment, rank, p_password, first_name, last_name, gender, address, picture, contact, embg, date_of_birth, country, nationality } \\
     33Следува дека е единствен кандидат клуч и го прогласуваме за примарен клуч.
     34
     35\\
     36Во ваква дефинирана релација нема повеќекратни зависности, па со тоа следува дека задоволува **1НФ**. \\
     37Клучот на релацијата е составен само од еден атрибут c_id, што значи дека парцијална зависност не постои, и со тоа заклучуваме дека е задоволена **2НФ**. \\
     38Не е во 3НФ бидејќи има транзитивни зависности, пример s_id -> city
     39
     40Декомпозиција:
     41
     42**R1{__s_id__, city} е во BCNF**
     43
     44R2{__c_id__, c_name, opening_date, c_status, statement_id, e_id, t_id, p_id, date_of_closing, statement_date, description, incident_timestamp, incident_place, badge_no, e_name, e_type, is_found, e_picture, t_name, p_address, o_badge_no, s_id, sc_description, final_document, pe_id, o_password, o_date_of_employment, p_date_of_employment, rank, p_password, first_name, last_name, gender, address, picture, contact, embg, date_of_birth, country, nationality}
     45
     46R2 не е во 3НФ поради e_id -> e_name, e_type, is_found, e_picture
     47
     48**R21{__e_id__, e_name, e_type, is_found, e_picture } е во BCNF**
     49
     50R22{__c_id__, c_name, opening_date, c_status, statement_id, e_id, t_id, p_id, date_of_closing, statement_date, description, incident_timestamp, incident_place, badge_no, t_name, p_address, o_badge_no, s_id, sc_description, final_document, pe_id, o_password, o_date_of_employment, p_date_of_employment, rank, p_password, first_name, last_name, gender, address, picture, contact, embg, date_of_birth, country, nationality}
     51
     52R22 не е во 3НФ поради t_id -> t_name
     53
     54**R221{t_id, t_name} е во BCNF**
     55
     56R222{c_id, c_name, opening_date, c_status, statement_id, e_id, t_id, p_id, date_of_closing, statement_date, description, incident_timestamp, incident_place, badge_no, p_address, o_badge_no, s_id, sc_description, final_document, pe_id, o_password, o_date_of_employment, p_date_of_employment, rank, p_password, first_name, last_name, gender, address, picture, contact, embg, date_of_birth, country, nationality}
     57
     58R222 не е во BCNF поради pe_id -> first_name, last_name, gender, address, picture, contact, embg, date_of_birth,country, nationality}
     59
     60**R2221{__pe_id__, first_name, last_name, gender, address, picture, contact, embg, date_of_birth,country, nationality}е во BCNF**
     61
     62R2222{__c_id__, c_name, opening_date, c_status, statement_id, e_id, t_id, p_id, date_of_closing, statement_date, description, incident_timestamp, incident_place, badge_no, p_address, o_badge_no, s_id, sc_description, final_document, pe_id, o_password, o_date_of_employment, p_date_of_employment, rank, p_password}
     63
     64R2222 не е во BCNF поради date_of_closing ->  sc_description, final_document
     65
     66**R22221{__date_of_closing__, sc_description, final_document}е во BCNF**
     67
     68R22222{c_id, c_name, opening_date, c_status, statement_id, e_id, t_id, p_id, date_of_closing, statement_date, description, incident_timestamp, incident_place, badge_no, p_address, o_badge_no, s_id, pe_id, o_password, o_date_of_employment, p_date_of_employment, rank, p_password}
     69
     70R22222 не е во 3НФ поради o_badge_no -> pe_id, o_password, o_date_of_employment
     71
     72**R222221{__o_badge_no__, pe_id, o_password, o_date_of_employment}е во BCNF**
     73
     74R222222{__c_id__, c_name, opening_date, c_status, statement_id, e_id, t_id, p_id, date_of_closing, statement_date, description, incident_timestamp, incident_place, badge_no, p_address, o_badge_no, s_id, p_date_of_employment, rank, p_password}
     75
     76R222222 не е во 3НФ поради badge_no -> pe_id, p_date_of_employment, rank, p_password, p_id
     77
     78**R2222221{__badge_no__, pe_id, p_date_of_employment, rank, p_password, p_id} е во BCNF**
     79
     80R2222222{__c_id__, c_name, opening_date, c_status, statement_id, e_id, t_id, p_id, date_of_closing, statement_date, description, incident_timestamp, incident_place, badge_no, p_address, o_badge_no, s_id}
     81
     82R2222222 не е во BCNF поради statement_id -> statement_date, description, incident_timestamp, incident_place, e_id, badge_no
     83
     84**R22222221{__statement_id__, statement_date, description, incident_timestamp, incident_place, e_id, badge_no} е во BCNF**
     85
     86R22222222{__c_id__, c_name, opening_date, c_status, statement_id, t_id, p_id, date_of_closing, p_address, o_badge_no, s_id}
     87
     88R22222222 не е во BCNF поради p_id -> p_address, o_badge_no, s_id
     89
     90**R222222221{__p_id__, p_address, o_badge_no, s_id} е во BCNF**
     91
     92**R222222222{__c_id__, c_name, opening_date, c_status, statement_id, t_id, date_of_closing} тука завршуваме бидејќи е во BCNF.**
     93
     94== Релации
     95**R1 = Statement{__s_id__, city}**
     96
     97**R21 = Evidence{__e_id__, e_name, e_type, is_found, e_picture} е во BCNF**
     98
     99**R221 = Type_of_crime{__t_id__, t_name} е во BCNF**
     100
     101**R2221=People{__pe_id__, first_name, last_name, gender, address, picture, contact, embg, date_of_birth,country, nationality}е во BCNF**
     102
     103**R22221 = Solved_case{__date_of_closing__, sc_description, final_document}е во BCNF**
     104
     105**R222221 = Officer{__o_badge_no__, pe_id, o_password, o_date_of_employment}е во BCNF**
     106
     107**R2222221 = Policeman{__badge_no__, pe_id, p_date_of_employment, rank, p_password, p_id} е во BCNF**
     108
     109**R22222221 = Statement{__statement_id__, statement_date, description, incident_timestamp, incident_place, e_id, badge_no} е во BCNF**
     110
     111**R222222221 = Police_Station{__p_id__, p_address, o_badge_no, s_id} е во BCNF**
     112
     113**R222222222 = Crime_case{__c_id__, c_name, opening_date, c_status, statement_id, t_id, date_of_closing} тука завршуваме бидејќи е во BCNF.**