Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

Chapter Five Physical Database Design.pptx

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Prochain SlideShare
2nd chapter dbms.pptx
2nd chapter dbms.pptx
Chargement dans…3
×

Consultez-les par la suite

1 sur 34 Publicité

Plus De Contenu Connexe

Similaire à Chapter Five Physical Database Design.pptx (20)

Publicité

Chapter Five Physical Database Design.pptx

  1. 1. 1. Planning: that is identifying information gap in an organization and propose a database solution to solve the problem. 2. Analysis: Concentrates more on fact finding about the problem or the opportunity.  Feasibility analysis, requirement determination and structuring, and selection of best design method are also performed at this phase. 3. Design: in database designing more emphasis is given to this phase. The phase is further divided into three sub-phases.  Conceptual Design, Logical Design, Physical Design: 4. Implementation: the testing and deployment of the designed database for use. 5. Operation and Support: administering and maintaining the operation of the database system and providing support to users.
  2. 2.  is the process of coming up with different kinds of specification for the data to be stored in the database.  is one of the middle phases we have in information systems development  Deals with describing how the data should be perceived at different levels and finally how it is going to be stored in a computer system.
  3. 3.  Sub-phases (Levels) of database design
  4. 4.  is the process of constructing a model of the information used in an enterprise,  independent of any physical considerations.  is source of information for logical design  Mostly uses ER Model to describe the data .  refinement of the schema, which is verification of Entities, Attributes, and Relationships
  5. 5.  Conceptual design revolves around discovering and analyzing organizational and user data requirements  The important activities are to identify  Entities  Attributes  Relationships  Constraints  And based on these components develop the ER model using  ER diagrams
  6. 6.  Entity-Relationship modeling is used to represent conceptual view of the database  The main components of ER Modeling are:  Entities  Represented by Rectangle  Attributes  Represented by Oval  Relationships  Represented by Diamond  Constraints  Represent the constraint in the data
  7. 7.  is the process of constructing a model of the information based on a specific data model,  independent of DBMS and other physical considerations.  Normalization process  Collection of Rules to be maintained  Discover new entities in the process  Revise attributes based on the rules and the discovered Entities
  8. 8.  The first step before applying the rules in relational data model is converting the conceptual design to a form suitable for relational logical model, which is in a form of tables.  Converting ER Diagram to Relational Tables  Three basic rules to convert ER into tables or relations:  Rule 1: Entity Names will automatically be table names  Rule 2: Mapping of attributes: attributes will be columns of the respective tables.  Atomic or single-valued or derived or stored attributes will be columns  Composite attributes: the parent attribute will be ignored and the decomposed attributes (child attributes) will be columns of the table.  Multi-valued attributes: will be mapped to a new table where the primary key of the main table will be posted for cross referencing.  Rule 3: Relationships: relationship will be mapped by using a foreign key attribute.  Foreign key is a primary or candidate key of one relation used to create association between tables.
  9. 9. Refinement: eliminates inconsistency, ambiguity and redundancy.  Identifies relations based on primary key  Decompose relations with anomalies to produce smaller, well-structured relations 1. Insertion Anomalies 2. Deletion Anomalies 3. Modification Anomalies
  10. 10.  Defines specific storage or access methods used by database  Tailored to a specific DBMS system –  Includes estimate of storage space
  11. 11.  Physical design describes the base relation, file organization, and indexes used to achieve efficient access to the data, and any associated integrity constraints and security measures.  Logical database design is concerned with the what; physical database design is concerned with the how.
  12. 12.  A good human computer interface provides a unifying structure for finding, viewing and invoking the different components of a system.  These are the means or methods by which users interact with the system.  Interface may be designed to allow:  Command based interactions  Menu based interaction  Object based interaction: icons, symbols  Natural language interaction
  13. 13.  Meaningful title  Comprehensible instructions  Logical grouping and sequencing of fields  visually appealing layout of the form/report  familiar field labels  consistent terminology and abbreviation  consistent use of color  visible space and boundaries or data entry fields  convenient cursor movement  error correction for individual characters and entire fields  error massage for unacceptable fields  optional field marked clearly  explanatory massages for fields  completion signal
  14. 14. 17  The two fundamental concepts that need to be considered while designing database systems are:  Maintaining the consistency of the database to all the changes, and  Protecting the database from unauthorized users.
  15. 15. 18  Integrity constraints ensure that the changes made to the database by authorized users do not result in a loss of data consistency.  It is a predicate to the database that needs to be declared at all time.  Types of Constraints  Key Constraints (Entity Integrity)  Foreign Key Constraints (Referential Integrity)  Domain Constraints (Domain Integrity)  General Constraints (User Defined Integrity)
  16. 16. 19  A domain constraint is a predicate on an attribute A of each tuple of a relation to be atomic value from a domain set domain(A).  Syntax: CREATE DOMAIN <domain_name> <data_type> CONSTRAINT <constraint_name> CHECK <constraint>  The CHECK statement can also be  directly applied to a column without defining a domain,  in a table definition as a tuple based constraint CHECK (<logical_expression>)
  17. 17. 20  Constraint for salary CREATE DOMAIN BasicSalary NUMERIC(9, 2) CONSTRAINT SalaryRange CHECK (VALUE>=150.00 AND VALUE<=6000.00) Salary NUMERIC(9, 2) CHECK (Salary>=150.00 AND Salary<=6000.00)  Domain Constraint CREATE TABLE Employees ( : CONSTRAINT EmpDate_Constraint CHECK (EmpDate <= GETDATE()) )
  18. 18. 21  User defined constraint is an assertion defined by the user requirement.  Domain and Referential integrity constraints.  The syntax for general assertion is: CREATE ASSERTION <assertion_name> CHECK <predicate> Example CREATE ASSERTION NumberOfTeamMembers CHECK (8 >= ALL (SELECT EmpId FROM EmpTeams GROUP BY TeamId)
  19. 19. 22  Triggers are statements that the database management system executes automatically in response to a modification to the database. Triggers need to specify:  The event that will cause or initiate the trigger execution,  Condition to be specified for the trigger execution to proceed, and  The action to be taken in response. action condition event ?       
  20. 20. 23  The trigger events are:  INSERT, DELETE, UPDATE and SELECT.  The actions for the triggers may be taken:  After successful completion of the operation (event): AFTER  Before the execution of the operation (event): BEFORE (INSTEAD OF)  Syntax CREATE TRIGGER <trigger_name> ON {<table>|<view>} {FOR | AFTER | INSTEAD OF} {[INSERT] | [UPDATE] | [DELETE] | [SELECT]} AS <SQL_Statement>
  21. 21. 24  Create a trigger that inserts the employee id to the fulltime employee table if the employee is a fulltime employee otherwise in the part-time employee table CREATE TRIGGER EmployeeType ON [Employees] AFTER INSERT AS If (SELECT empType From inserted) = 1 INSERT INTO [fulltimeEmployees] (empId) SELECT empId FROM inserted ELSE INSERT INTO [parttimeEmployees] (empId) SELECT empId FROM inserted
  22. 22. 25  Database security refers to protection of the database from malicious access such as:  Unauthorized reading of data,  Unauthorized modification of data, and  Unauthorized destruction of data.  Some of the threats to the database because of malicious access are:  Loss of integrity,  Loss of availability,  Loss of confidentiality  Security measure levels  Database System,  Operating System,  Network,  Physical,  Human
  23. 23. 26  Database system security can be implemented with the use of:  Account and Role Creation,  Privilege granting,  Privilege revocation, and  Security level assignment
  24. 24. 27  Authorization levels in a database system can be set at broad categories as:  Data Level Authorization  Read  Insert  Update  Delete  Schema Level Authorization  Index  Resource  Alter  Drop
  25. 25. 28  The syntax for privilege granting is as follows: GRANT <privilege_list> ON {<table>|<view>} TO <account_list> [WITH GRANT OPTION]  <privilege_list> is possible data level authorization for the table or view stated as: {SELECT | INSERT | UPDATE | DELETE | ALL}  To grant access to a specific column in a table: GRANT REFERENCES (<column>) ON {<table>|<view>} TO <account_list> [WITH GRANT OPTION]
  26. 26. 29  The syntax for privilege revoking is as follows: REVOKE <privilege_list> ON {<table>|<view>} FROM <account_list> [RESTRICT | CASCADE]  To revoke grant option from an account: REVOKE GRANT OPTION FOR <privilege_list> ON {<table>|<view>} FROM <account_list>
  27. 27. 30  The syntax to deny a privilege from an account list is: DENY <privilege_list> ON {<table>|<view>} TO <account_list> [CASCADE]
  28. 28. 31  Terminologies  Plain text  Cipher text  Key  Encryption  Decryption   P K C encryption P          P K C decryption P       
  29. 29. 32  Cryptography:  rendering plain information unintelligible, and  restoring the encrypted information to intelligible form  Symmetric Key Algorithms  DES (Data Encryption Standard)  IDEA (International Data Encryption Algorithm)  Asymmetric Key Algorithms  RSA (Rivest, Shamir and Adleman)  DSA (Digital Signature Algorithm )  Cryptanalysis : Breaking cipher
  30. 30. 33  Authentication is a process of verifying the identity of a user who is claimed to be.  There are two ways of authenticating a user:  Use of Password.  User Account  Password  Challenge Response  Challenge generated by the server  Encrypted by the user with the private key of the user  Decrypted by the server with the public key of the user

×