• Save
Int2 infosysdatabases
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Int2 infosysdatabases

on

  • 192 views

 

Statistics

Views

Total Views
192
Views on SlideShare
192
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Int2 infosysdatabases Presentation Transcript

  • 1. Intermediate 2 Revision Unit: Relational Databases To use these PowerPoint Flash cards, you will need a pen and paper. Write down the slide number for any slide you got wrong. Retry those slides until you can answer confidently. Press F5 to run this presentation. 1
  • 2. Databases can be either flat-file or relational. State what ismeant by each of these terms. 2
  • 3. Databases can be either flat-file or relational. State what ismeant by each of these terms. A flat-file database consists of one table only. A relational database is made of two or more linked tables. 3
  • 4. Explain what is meant by acentralised database. 4
  • 5. Explain what is meant by acentralised database. A database saved to a single location 5
  • 6. State two advantages of using acentralised database instead ofseveral copies of a databasesaved to various standalonecomputers. 6
  • 7. State two advantages of using a centralised database instead of several copies of a database saved to various standalone computers. Any two:Data is easier to back upData is accessible to everyoneIt is easier to know which is the correct versionIt is easier to protect the database 7
  • 8. Database systems are widely used to storeinformation that used to be held on paper. Statetwo advantages a computerised database has overa manual system. 8
  • 9. Database systems are widely used to storeinformation that used to be held on paper. Statetwo advantages a computerised database has overa manual system. Easier searching, less chance of damaged or misplaced records, quicker sorting, data analysis can be carried out, updating easier, reporting to display results, less storage space. etc Award 1 mark for each correct answer to max of 2 marks. 9
  • 10. Explain what is meant by theterm Entity with reference to adatabase. 10
  • 11. Explain what is meant by theterm Entity with reference to adatabase. An entity becomes a table in an electronic database. 11
  • 12. State two advantages of usinga relational database made oflinked tables rather than a flat-file database. 12
  • 13. State two advantages of usinga relational database made oflinked tables rather than a flat-file database. Any two of these:  No data duplication  No data inconsistency  No insertion anomaly  No deletion anomaly 13
  • 14. Explain what is meant by aninsertion anomaly. 14
  • 15. Explain what is meant by aninsertion anomaly. It is not possible to enter part of a record. All fields in a record need to be completed to insert a new record. 15
  • 16. Formatted output from adatabase that may have beenbased on a query is knownas…. 16
  • 17. Formatted output from adatabase that may have beenbased on a query is knownas…. A report. 17
  • 18. State two purposes ofnormalising data. 18
  • 19. State two purposes of normalising data.Any TWO: To structure the data in a database To identify the tables that will be used. To identify the fields that will go into each table. To remove repeating groups/multivalued attributes to a separate table 19
  • 20. Explain what is meant by datamodelling. 20
  • 21. Explain what is meant by datamodelling. This is the process that plans the entities, attributes and relationships for a database. 21
  • 22. What is a primary key? 22
  • 23. What is a primary key? A field that is used to uniquely identify a record in a database. 23
  • 24. What is a foreign key? 24
  • 25. What is a foreign key? A primary key from another table. 25
  • 26. Explain why a field such as“Customer_Name” would beunsuitable as a primary key. 26
  • 27. Explain why a field such as“Customer_Name” would beunsuitable as a primary key. Values in a primary key must be unique. It is possible that two customers could have the same name. 27
  • 28. Explain why validation is usedin a database system 28
  • 29. Explain why validation is usedin a database system To ensure that data entered into a field is sensible To ensure that data conforms to certain restrictions/guidelines To reduce errors when entering data 29
  • 30. Below is an example of a database form or “input screen”.State two considerations for good screen design. 30
  • 31. Below is an example of a database form or “input screen”.State two considerations for good screen design. It should identify the organisation It should allow users to access and edit data. It should have a consistent layout. 31
  • 32. Explain each of these types ofvalidation:(a) Restricted choice(b) Presence check(c) Range check 32
  • 33. Explain each of these types of validation: (a) Restricted choice (b) Presence check (c) Range check(a) Choice is limited to specific options(b) The field cannot be left empty(c) Only data between two numbers is allowed, eg, “Enter a number between 0 and 11.” 33
  • 34. State the type of validationcheck illustrated here> 34
  • 35. State the type of validationcheck illustrated here> Restricted choice 35
  • 36. “Your email address is required.Please enter your email address”State the type of validation checkbeing used in this example. 36
  • 37. “Your email address is required.Please enter your email address”State the type of validation checkbeing used in this example. Presence check. 37
  • 38. Name and explain two typesof validation that could beused on the Player ID field. 38
  • 39. Name and explain two typesof validation that could beused on the Player ID field.  Presence check to ensure this primary field is not left empty.  Range check to ensure that data is between desired values, eg > 1 and <1000 39
  • 40. Explain how the databasewould be used to display thePlayer name and Averagepoints. The player with themost points should bedisplayed first, any playerswith the same number of pointsshould appear alphabetically. 40
  • 41. Explain how the databasewould be used to display thePlayer name and Averagepoints. The player with themost points should bedisplayed first, any playerswith the same number of pointsshould appear alphabetically.  Sort (1 mark)  on attribute ‘Average points per match’ (1 mark)  in descending order (1 mark)  AND on ‘Player ID , ascending (1 mark)  Award 1 mark for each correct explanation – max 4 marks. 41
  • 42. Describe what would needto be done to produce a listof all players who are notinjured and have an averageof more than 5 points permatch. 42
  • 43. Describe what would needto be done to produce a listof all players who are notinjured and have an averageof more than 5 points permatch.  Search for ‘Injured’ = ‘NO’ 1 mark  AND 1 mark  ‘Average points per match’ >5. 1 mark 43
  • 44. Explain a type of validation thatcould be used on the “Age” fieldfor the sample pupil databaseshown here. 44
  • 45. Explain a type of validation thatcould be used on the “Age” fieldfor the sample pupil databaseshown here. Range check could be used to ensure that a valid age is entered, eg Age >11 and <19. 45
  • 46. Give an example of when each ofthe following numeric data typeswould be used in a database:(a) Real(b) Integer 46
  • 47. Give an example of when each of the following numeric data types would be used in a database: (a) Real (b) Integer(a) For decimal or fractional numbers such as 25.75(b) For whole numbers/counting numbers such as Quantity: 12 47
  • 48. Explain what is meant by a“query”. 48
  • 49. Explain what is meant by a“query”. Processes (searching and/or sorting) carried out to extract information from a file 49
  • 50. Explain how each of the followingdata field types could be used in adatabase:(a) Object(b) Boolean(c) Link 50
  • 51. Explain how each of the following data field types could be used in a database: (a) Object (b) Boolean (c) Link(a) To hold pictures or sound(b) To hold one of two values like true/false, male/female, yes/no(c) To hold web addresses or links to files 51
  • 52. State a query thatwould find all thefemale campersor campers whohave taken thecourse CA101. 52
  • 53. State a query that would find all the female campers or campers who have taken the course CA101.Gender = Female or Course Ref = CA101 53
  • 54. Explain how the following data has been sorted. 54
  • 55. Explain how the following data has been sorted.Sort questions are normally 2 marks; therefore, you will be expected to describe a complex sort. Your answer should be like this:Sorted ascending on Gender (1 mark) AND sorted on Surname ascending (1 mark) 55
  • 56. The sample databaseshows details of flowersfor sale. State whichProduct No would be atthe top of the table whenthe list is sorted byCategory in Ascendingorder and by Price (£) inascending order. 56
  • 57. The sample database shows details of flowers for sale. State which Product No would be at the top of the table when the list is sorted by Category in Ascending order and by Price (£) in ascending order. FL55 57
  • 58. Explain what is meant by aBoolean data type. 58
  • 59. Explain what is meant by aBoolean data type. An item of data that can take one of two values OR An attribute that can only store one of two values (True/False, 1/0, Yes/No) 59
  • 60. Explain how the database was queried to get the results in (a). 60
  • 61. Explain how the database was queried to get the results in (a). These types of question are normally work 3 marks. You will be expected to answer like this:Do a search (1 mark)On Make = Alpha (1 mark)AND EngineSize=1800 (1 mark) 61
  • 62. A doctor’s office wants to print out theresults of a query from a database.What is the name for printed outputfrom a database? 62
  • 63. A doctor’s office wants to print outthe results of a query from adatabase. What is the name forprinted output from a database? Report 63
  • 64. Normalise the data by removing multi-valued attributes andshow how the data would be represented as two tables. [7] 64
  • 65. Normalise the data by removing multi-valued attributes and show how the data would be represented as two tables. [7]EMPLOYEE (Employee No, Employee Name, Gender, Age, Position)CAT_HOME(Cat_Home, City, Employee No*) 65
  • 66. State the type of relationship that exists between the entities that you created below.EMPLOYEE (Employee No, Employee Name, Gender, Age, Position)CAT_HOME(Cat_Home, City, Employee No*) 66
  • 67. State the type of relationship that exists between the entities that you created below.EMPLOYEE (Employee No, Employee Name, Gender, Age, Position)CAT_HOME(Cat_Home, City, Employee No*) 67
  • 68. Normalise the data by removing multi-valued attributesand show how the data would be represented as twotables. [7] 68
  • 69. Normalise the data by removing multi-valued attributesand show how the data would be represented as twotables. [7]SHOP(Shop ID, Location)EMPLOYEE( Employee ID, Employee Name, Address, Position, Hourly Wage, Shop ID*) 69
  • 70. State two reasons fornormalising data. 70
  • 71. State two reasons for normalising data. Any two from Identify which attributes belong in each table Identify the tables that are required Identify the relationships between the tables Remove data duplication Remove data inconsistency Remove anomalies Remove insertion anomaly Remove deletion anomaly Remove modification anomaly Remove multi-valued fields 71 Identify primary and foreign keys
  • 72. Identify one multi-valued attributefrom the database shown here. 72
  • 73. Identify one multi-valued attributefrom the database shown here. Member ID, Member name, Date out, date in or Fine 73
  • 74. The Fine field is an example of a real data type.Explain what is meant by a “real” data type. 74
  • 75. The Fine field is an example of a real data type.Explain what is meant by a “real” data type. A number with a decimal or fracitonal part 75
  • 76. The University of Perthshire offers revision courses to help pupils prepare forexams. The data is held in two tables as follows:COURSE(Course ID, Title, Room, Lecturer)PUPIL(Pupil ID, First Name, Surname, School, Contact Number, Course ID*)Explain why the field Course ID is included in the PUPIL table. 76
  • 77. The University of Perthshire offers revision courses to help pupils prepare forexams. The data is held in two tables as follows:COURSE(Course ID, Title, Room, Lecturer)PUPIL(Pupil ID, First Name, Surname, School, Contact Number, Course ID*)Explain why the field Course ID is included in the PUPIL table.  To serve as a foreign key (Remember that the foreign key is a primary key in another table.) 77
  • 78. The example here is a databasereport.Explain what is meant by a “report”. 78
  • 79. The example here is a databasereport.Explain what is meant by a “report”.  Formatted output from a database used for hard copies. 79
  • 80. Describe how thePupil table wassearched and sorted toprovide the informationfor the report. 80
  • 81. Describe how thePupil table wassearched and sorted toprovide the informationfor the report.   Search for Course ID = 101 (1 mark)   Sort on school in Descending order (1 mark)   Sort on Surname in Ascending order (1 mark) 81