Monday, 24 September 2012

D1

Accidental deletion of fields; 
Data can be stored in different fields and they can also be organised. If you were to delete one of the fields the database would go into a error as the fields and relations would be deleted. By backing up the contents of the database to an external storage device or to another partition of the hard drive you can stop accidental deletion of fields. Another way of stop this is they could cause deletion of fields and whoever is the database author is has the authority to change the database and delete fields.

Incorrect data types;
A way to decrease incorrect data types is on Forms input masks are.Another way do decrease incorrect data types is using multiply choice question. This also allows the data to be entered quicker and makes it easier to complete a data form. 

Renaming incorrectly;
Re-naming something or someone incorrectly on a database can be a huge mistake. This is more than often human error. Unfortunately, unless the glitch is spotted it won’t mend by itself, so the clearest way to avoid this sort of problem would be to double check the information someone is giving you.

Validation; 
Validation is another common error that can come up when using a database. Data can sometimes be put in wrong so a way of overcoming this is creating rules during the design of the database. Some of these rules include only have a limited amount of characters and batch totals. This is another way of saying the information should be used correctly.

Null values;
A null value equals nothing there and is a blank space on a data sheet. This is a problem as the database will not be able to work properly as it doesn't understand the commands. It  will often have the true false or null option  if the database hasn't been set to understand the option of a null. 

Monday, 17 September 2012

M1 corrected

Referential integrity:
Referential integrity is a tool that allows you to control relations between records in related tables. Referential integrity is defined as a relationship of two tables. The table that has the referential integrity rule specified is called inferior table. Table specified in the integrity constraint is called superior table. A column or a group of columns is set in both tables as a key. Rules of referential integrity guarantee, that for each record in the inferior table whose key is not NULL there exists a record in the superior table with the same key. The key in the superior table has to be a unique key, the key in the inferior table has to be some key. Referential integrity does the following when manipulating data:
1.When adding a record into the inferior table  existence of the same key in the superior table is checked.
2.When deleting a value in the superior value, existence of the same key in the inferior table is checked.

Primary keys and foreign keys:
A primary key is a constraint defined on a relational database table that prevents users from entering duplicate records into the table. The purpose or the function of a primary key, in reference to one’s database, is to facilitate the implementation of a relationship between two tables in a relational database. It is the target in which a foreign key can reference. The foreign key is a unique field in a database that another table will use to access information, such as a "look up" table. For instance, Table 1 might consist of names and addresses, keyed in by a unique identifier. Table 2 might consist of city/state names, keyed in by the telephone area code. The area code would be the foreign key, and table 1 would have a telephone field, including the area code. The area code in table 2 ties in to the area code in table 2 (the look up table), tied together by the area code to return the city and state from which the phone number originates. This area code in table 2 is a foreign field of table 2.
Primary Key: It will not allow "Null values" and "Duplicate values"
Foreign Key: It will allow "Null values" and "Duplicate values" and it refers to a primary key in another table.

Relationships

One to one relationships; each primary key will relate specifically to one or none record in the table
One to many; This primary key will relate to one, none or more than one records in that table
Many to many; Each key in both tables can relate to more than one or any number of records.