Relationship typesRelationshipsare invisible links between two databases thatasituation that exists between two relational databases tables whenone table has a foreign key that references the primary key of theother table. Relationships allow databases to split and store data indifferent tables while still being connected. Benefits of the relational model of databasesTheAdvantages of a Relational Database is a database structured on the”Relational”model. Data are stored and presented in a tabular format, organizedin rows and columns with one record per row.
Thishelps a lot having the relational model as there is no duplicateddata and helps a lot with organising tables.NormalisationNormalisation is theprocess of organizing data in a way that the results make the dataeasier for you find individual tables. This also stops dataduplication because you would create a table in between the 2 tablesthat have the same data.Data typesAdata type whenusedinadatabaseisa wayofclassifyingdata into groups of similar things. For exampleastringis a data type that is used to storetext and an integer is a data type used to classify whole numbers.Field SizesAtermused to describe the amount of data that can go in 1 field.All data entry fields have a default maximum sizewhichis normally set to 12.
For example a single line input field often has a 255 character limitwhileother things may vary. Validation rulesAValidationrule is a criteriaor constraint used in the databaseon a field that limits what the user can type into that field. One avalidation rule is set anything that is not included in it will benot allowed to enter intothe field.Primary keysAprimary key is a special thingattached to a field thatisdesignatedto uniquely identify all table records. A primary key’s main featuresare: It must contain a unique value for each row of data.
Itis also what you link when linking 2 tables together.Foreign keysAforeign key is a field (or sometimesa collectionof fields) in one table that uniquely identifies a row of anothertable or the same table buta different position.Theforeign key is defined in a second table but it refers to the primarykey in the first table. ReferentialintegrityReferentialintegrity is a relational onlydatabasethingwhich states that relationships betweentablesmust always be consistent. In other words, any foreign key field mustagree with the primary key that is referenced by the foreign key.Auto incremental keysAuto-incrementallows a unique number to be generated automatically when a newrecord is inserted into a table. Often this is the primary key fieldthat we would like to be created automatically every time a newrecord is inserted. Andexample of this is when you are creating character each new characterhas there own unique ID number.
Field AttributesAnattribute insimple isa characteristic linkedto a field.Anattribute refers to a database component, such as a table. It alsomay refer to a database field. Data redundancyDataredundancy is athingcreated within a database in which the same piece of data is held intwo separate places. Wheneverdata is repeated, this isdata redundancy. This happenssometimes happen when your writing lots of data and can occurby accident but is also done deliberately whenyour testing different fields and stuff to check that they work.