23 relationship a relationship is a situation that
This preview shows page 18 - 22 out of 86 pages.
2.3 RelationshipA relationship is a situation that exist the relation between two databases where one table hasforeign key that references the primary key of the other table. Relationship allow the relationaldata to stored data in different tables. There are various types’ relationship entities:One-to-One A pair of tables that bears one-to-one relationship when single record in the first table is relatedto only one in the second table and vice-versa.18 | P a g eDATABASE AND DESIGN
Fig: Example of one-to-one relationshipOne-to-Many RelationshipA one-to-many relationship exists between a pair of tables when a single record in the first tablecan be related to one or more records in the second table, but a single record in the second tablecan be related to only one record in the first table.Fig: one to many RelationshipMany -to- ManyMany instance of the one entity are related with many instance of another entity.Many –to- One Many instance of the one entity with only one records of another entity. 19 | P a g eDATABASE AND DESIGN
Data Flow DiagramSymbolProcess -External Entity/Input -Data Store in device on File-Data Flow –Schema DiagramA mental codification of experience that includes a particular organized way of perceivingcognitively and responding to a complex situation or set of stimuli. (Merriam-webster.com,2016) It is the structure behind data organization, it is also known as the visual representation ofhow different table relationship enable the schema under the rules and mission of theorganization for which database is created.In a schema diagram, all the database table are design with a unique column with specialfeatures, e.g. primary key, foreign key etc. formats and symbols are universally understood toeliminating the confusion. The table relationship also expressed via as a parents table as a parentstable and child table corresponding as a foreign key.Schema have important function because they force the database developer to transpose ideas topaper. This provides an overview of the database, while facilitating future database organizationwork.20 | P a g eDATABASE AND DESIGN
Fig: schema DiagramDatabase Normalization up to 3NFNormalization Normalization is the process of organizing data in a database. This includes creating tables andestablishing relationships between those tables according to rules designed both to protect thedata and to make the database more flexible by eliminating redundancy and inconsistentdependency. In a one-word Normalization is the process of breaking down a single big table intomany smaller tables with fields. AdvantagesSmaller Database: Eliminating duplicate data, we can reduce the size of database.Better performanceIt simplifies the data structureDisadvantagesComplex design due to the different table’s relationship.