SlideShare une entreprise Scribd logo
1  sur  81
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
Databases can be either flat-
file or relational. State what is
meant by each of these terms.




                           2
Databases can be either flat-
file or relational. State what is
meant 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
Explain what is meant by a
centralised database.




                        4
Explain what is meant by a
centralised database.



   A database saved to a single location




                                 5
State two advantages of using a
centralised database instead of
several copies of a database
saved to various standalone
computers.




                          6
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 up
Data is accessible to everyone
It is easier to know which is the correct version
It is easier to protect the database
                                      7
Database systems are widely used to store
information that used to be held on paper. State
two advantages a computerised database has over
a manual system.




                                      8
Database systems are widely used to store
information that used to be held on paper. State
two advantages a computerised database has over
a 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
Explain what is meant by the
term Entity with reference to a
database.




                         10
Explain what is meant by the
term Entity with reference to a
database.


   An entity becomes a table in an
    electronic database.




                                11
State two advantages of using
a relational database made of
linked tables rather than a flat-
file database.




                          12
State two advantages of using
a relational database made of
linked tables rather than a flat-
file database.


   Any two of these:
       No data duplication
       No data inconsistency
       No insertion anomaly
       No deletion anomaly

                                13
Explain what is meant by an
insertion anomaly.




                       14
Explain what is meant by an
insertion 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
Formatted output from a
database that may have been
based on a query is known
as….




                      16
Formatted output from a
database that may have been
based on a query is known
as….


   A report.




                      17
State two purposes of
normalising data.




                        18
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
Explain what is meant by data
modelling.




                        20
Explain what is meant by data
modelling.


   This is the process that plans the
    entities, attributes and relationships for
    a database.


                                    21
What is a primary key?




                         22
What is a primary key?


   A field that is used to uniquely identify
    a record in a database.




                                    23
What is a foreign key?




                         24
What is a foreign key?


   A primary key from another table.




                                 25
Explain why a field such as
“Customer_Name” would be
unsuitable as a primary key.




                        26
Explain why a field such as
“Customer_Name” would be
unsuitable as a primary key.


   Values in a primary key must be
    unique. It is possible that two
    customers could have the same name.


                              27
Explain why validation is used
in a database system




                        28
Explain why validation is used
in 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
Below is an example of a database form or “input screen”.
State two considerations for good screen design.




                                                30
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
Explain each of these types of
validation:
(a) Restricted choice
(b) Presence check
(c) Range check




                        32
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
State the type of validation
check illustrated here>




                          34
State the type of validation
check illustrated here>



   Restricted choice




                          35
“Your email address is required.
Please enter your email address”
State the type of validation check
being used in this example.




                            36
“Your email address is required.
Please enter your email address”
State the type of validation check
being used in this example.


   Presence check.




                            37
Name and explain two types
of validation that could be
used on the Player ID field.




                               38
Name and explain two types
of validation that could be
used 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
Explain how the database
would be used to display the
Player name and Average
points. The player with the
most points should be
displayed first, any players
with the same number of points
should appear alphabetically.




                                 40
Explain how the database
would be used to display the
Player name and Average
points. The player with the
most points should be
displayed first, any players
with the same number of points
should 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
Describe what would need
to be done to produce a list
of all players who are not
injured and have an average
of more than 5 points per
match.




                               42
Describe what would need
to be done to produce a list
of all players who are not
injured and have an average
of more than 5 points per
match.




        Search for ‘Injured’ = ‘NO’ 1 mark
        AND 1 mark
        ‘Average points per match’ >5. 1
         mark

                                    43
Explain a type of validation that
could be used on the “Age” field
for the sample pupil database
shown here.




                            44
Explain a type of validation that
could be used on the “Age” field
for the sample pupil database
shown here.


   Range check could be used to ensure
    that a valid age is entered, eg Age >11
    and <19.


                                 45
Give an example of when each of
the following numeric data types
would be used in a database:
(a) Real
(b) Integer




                          46
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
Explain what is meant by a
“query”.




                        48
Explain what is meant by a
“query”.




   Processes (searching and/or sorting)
    carried out to extract information from
    a file

                                  49
Explain how each of the following
data field types could be used in a
database:
(a) Object
(b) Boolean
(c) Link




                            50
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
State a query that
would find all the
female campers
or campers who
have taken the
course CA101.




                     52
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
Explain how the following data has been sorted.




                                        54
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
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.




                            56
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
Explain what is meant by a
Boolean data type.




                        58
Explain what is meant by a
Boolean 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
Explain how the database was queried to get the results in (a).




                                                      60
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
A doctor’s office wants to print out the
results of a query from a database.
What is the name for printed output
from a database?




                                62
A doctor’s office wants to print out
the results of a query from a
database. What is the name for
printed output from a database?


   Report




                             63
Normalise the data by removing multi-valued attributes and
show how the data would be represented as two tables.
 [7]




                                                64
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
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
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
Normalise the data by removing multi-valued attributes
and show how the data would be represented as two
tables. [7]




                                         68
Normalise the data by removing multi-valued attributes
and show how the data would be represented as two
tables. [7]




SHOP(Shop ID, Location)
EMPLOYEE( Employee ID, Employee
  Name, Address, Position, Hourly
  Wage, Shop ID*)

                                         69
State two reasons for
normalising data.




                        70
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
Identify one multi-valued attribute
from the database shown here.




                            72
Identify one multi-valued attribute
from the database shown here.




   Member ID, Member name, Date out,
    date in or Fine




                             73
The Fine field is an example of a real data type.
Explain what is meant by a “real” data type.




                                          74
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
The University of Perthshire offers revision courses to help pupils prepare for
exams. 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
The University of Perthshire offers revision courses to help pupils prepare for
exams. 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
The example here is a database
report.

Explain what is meant by a “report”.




                                       78
The example here is a database
report.

Explain what is meant by a “report”.




           Formatted output from a database
            used for hard copies.




                                       79
Describe how the
Pupil table was
searched and sorted to
provide the information
for the report.




                          80
Describe how the
Pupil table was
searched and sorted to
provide the information
for 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

Contenu connexe

Tendances

CIS 336 STUDY Education Counseling--cis336study.com
CIS 336 STUDY Education Counseling--cis336study.comCIS 336 STUDY Education Counseling--cis336study.com
CIS 336 STUDY Education Counseling--cis336study.comshanaabe13
 
CIS 336 PAPERS Lessons in Excellence--cis336papers.com
CIS 336 PAPERS Lessons in Excellence--cis336papers.comCIS 336 PAPERS Lessons in Excellence--cis336papers.com
CIS 336 PAPERS Lessons in Excellence--cis336papers.comthomashard82
 
CIS 336 Inspiring Innovation -- cis336.com
CIS 336 Inspiring Innovation -- cis336.comCIS 336 Inspiring Innovation -- cis336.com
CIS 336 Inspiring Innovation -- cis336.comkopiko105
 
CIS 336 Focus Dreams/newtonhelp.com
CIS 336 Focus Dreams/newtonhelp.comCIS 336 Focus Dreams/newtonhelp.com
CIS 336 Focus Dreams/newtonhelp.combellflower85
 
CIS 336 Life of the Mind/newtonhelp.com   
CIS 336 Life of the Mind/newtonhelp.com   CIS 336 Life of the Mind/newtonhelp.com   
CIS 336 Life of the Mind/newtonhelp.com   bellflower3
 
Cis 336 Enhance teaching / snaptutorial.com
Cis 336    Enhance teaching / snaptutorial.comCis 336    Enhance teaching / snaptutorial.com
Cis 336 Enhance teaching / snaptutorial.comDavis104
 
CIS 336 PAPERS Education for Service--cis336papers.com
CIS 336 PAPERS Education for Service--cis336papers.comCIS 336 PAPERS Education for Service--cis336papers.com
CIS 336 PAPERS Education for Service--cis336papers.comKeatonJennings14
 
CIS 336 STUDY Achievement Education--cis336study.com
CIS 336 STUDY Achievement Education--cis336study.comCIS 336 STUDY Achievement Education--cis336study.com
CIS 336 STUDY Achievement Education--cis336study.comclaric153
 
CIS 336 STUDY Become Exceptional--cis336study.com
CIS 336 STUDY Become Exceptional--cis336study.comCIS 336 STUDY Become Exceptional--cis336study.com
CIS 336 STUDY Become Exceptional--cis336study.comclaric102
 
CIS 336 Redefined Education--cis336.com
CIS 336 Redefined Education--cis336.comCIS 336 Redefined Education--cis336.com
CIS 336 Redefined Education--cis336.comagathachristie208
 
CIS336 Education for Service--cis336.com
CIS336 Education for Service--cis336.comCIS336 Education for Service--cis336.com
CIS336 Education for Service--cis336.comwilliamwordsworth11
 
CIS 336 Achievement Education --cis336.com
CIS 336 Achievement Education --cis336.comCIS 336 Achievement Education --cis336.com
CIS 336 Achievement Education --cis336.comagathachristie171
 
CIS 336 Education Begins--cis336.com
CIS 336 Education Begins--cis336.comCIS 336 Education Begins--cis336.com
CIS 336 Education Begins--cis336.comclaric231
 
CIS 336 Become Exceptional--cis336.com
CIS 336 Become Exceptional--cis336.comCIS 336 Become Exceptional--cis336.com
CIS 336 Become Exceptional--cis336.comclaric131
 
Cis 336 final exam 2
Cis 336 final exam 2Cis 336 final exam 2
Cis 336 final exam 2lifesgood12
 
Cis 336 final exam 2
Cis 336 final exam 2Cis 336 final exam 2
Cis 336 final exam 2prasaaanna2
 
Duplicate Detection of Records in Queries using Clustering
Duplicate Detection of Records in Queries using ClusteringDuplicate Detection of Records in Queries using Clustering
Duplicate Detection of Records in Queries using ClusteringIJORCS
 
Using Your Salesforce Data in Microsoft Word
Using Your Salesforce Data in Microsoft WordUsing Your Salesforce Data in Microsoft Word
Using Your Salesforce Data in Microsoft Wordcharldreyer
 

Tendances (18)

CIS 336 STUDY Education Counseling--cis336study.com
CIS 336 STUDY Education Counseling--cis336study.comCIS 336 STUDY Education Counseling--cis336study.com
CIS 336 STUDY Education Counseling--cis336study.com
 
CIS 336 PAPERS Lessons in Excellence--cis336papers.com
CIS 336 PAPERS Lessons in Excellence--cis336papers.comCIS 336 PAPERS Lessons in Excellence--cis336papers.com
CIS 336 PAPERS Lessons in Excellence--cis336papers.com
 
CIS 336 Inspiring Innovation -- cis336.com
CIS 336 Inspiring Innovation -- cis336.comCIS 336 Inspiring Innovation -- cis336.com
CIS 336 Inspiring Innovation -- cis336.com
 
CIS 336 Focus Dreams/newtonhelp.com
CIS 336 Focus Dreams/newtonhelp.comCIS 336 Focus Dreams/newtonhelp.com
CIS 336 Focus Dreams/newtonhelp.com
 
CIS 336 Life of the Mind/newtonhelp.com   
CIS 336 Life of the Mind/newtonhelp.com   CIS 336 Life of the Mind/newtonhelp.com   
CIS 336 Life of the Mind/newtonhelp.com   
 
Cis 336 Enhance teaching / snaptutorial.com
Cis 336    Enhance teaching / snaptutorial.comCis 336    Enhance teaching / snaptutorial.com
Cis 336 Enhance teaching / snaptutorial.com
 
CIS 336 PAPERS Education for Service--cis336papers.com
CIS 336 PAPERS Education for Service--cis336papers.comCIS 336 PAPERS Education for Service--cis336papers.com
CIS 336 PAPERS Education for Service--cis336papers.com
 
CIS 336 STUDY Achievement Education--cis336study.com
CIS 336 STUDY Achievement Education--cis336study.comCIS 336 STUDY Achievement Education--cis336study.com
CIS 336 STUDY Achievement Education--cis336study.com
 
CIS 336 STUDY Become Exceptional--cis336study.com
CIS 336 STUDY Become Exceptional--cis336study.comCIS 336 STUDY Become Exceptional--cis336study.com
CIS 336 STUDY Become Exceptional--cis336study.com
 
CIS 336 Redefined Education--cis336.com
CIS 336 Redefined Education--cis336.comCIS 336 Redefined Education--cis336.com
CIS 336 Redefined Education--cis336.com
 
CIS336 Education for Service--cis336.com
CIS336 Education for Service--cis336.comCIS336 Education for Service--cis336.com
CIS336 Education for Service--cis336.com
 
CIS 336 Achievement Education --cis336.com
CIS 336 Achievement Education --cis336.comCIS 336 Achievement Education --cis336.com
CIS 336 Achievement Education --cis336.com
 
CIS 336 Education Begins--cis336.com
CIS 336 Education Begins--cis336.comCIS 336 Education Begins--cis336.com
CIS 336 Education Begins--cis336.com
 
CIS 336 Become Exceptional--cis336.com
CIS 336 Become Exceptional--cis336.comCIS 336 Become Exceptional--cis336.com
CIS 336 Become Exceptional--cis336.com
 
Cis 336 final exam 2
Cis 336 final exam 2Cis 336 final exam 2
Cis 336 final exam 2
 
Cis 336 final exam 2
Cis 336 final exam 2Cis 336 final exam 2
Cis 336 final exam 2
 
Duplicate Detection of Records in Queries using Clustering
Duplicate Detection of Records in Queries using ClusteringDuplicate Detection of Records in Queries using Clustering
Duplicate Detection of Records in Queries using Clustering
 
Using Your Salesforce Data in Microsoft Word
Using Your Salesforce Data in Microsoft WordUsing Your Salesforce Data in Microsoft Word
Using Your Salesforce Data in Microsoft Word
 

En vedette

Int2 infosysmultimedia
Int2 infosysmultimediaInt2 infosysmultimedia
Int2 infosysmultimediaitslides2009
 
Int2 infosysusinginforevision
Int2 infosysusinginforevisionInt2 infosysusinginforevision
Int2 infosysusinginforevisionitslides2009
 
Int 1 comp ca and mm
Int 1 comp ca and mmInt 1 comp ca and mm
Int 1 comp ca and mmitslides2009
 
ASP.NET MVC 新增、查詢、修改、刪除 基本功實戰 -twMVC#3
ASP.NET MVC 新增、查詢、修改、刪除 基本功實戰 -twMVC#3ASP.NET MVC 新增、查詢、修改、刪除 基本功實戰 -twMVC#3
ASP.NET MVC 新增、查詢、修改、刪除 基本功實戰 -twMVC#3twMVC
 
Int 1 information and the internet revision
Int 1 information and the internet revisionInt 1 information and the internet revision
Int 1 information and the internet revisionitslides2009
 
ASP.NET MVC 善用網路資源快速完打造網站
ASP.NET MVC 善用網路資源快速完打造網站ASP.NET MVC 善用網路資源快速完打造網站
ASP.NET MVC 善用網路資源快速完打造網站twMVC
 

En vedette (7)

Int2 infosysmultimedia
Int2 infosysmultimediaInt2 infosysmultimedia
Int2 infosysmultimedia
 
Int2 infosysusinginforevision
Int2 infosysusinginforevisionInt2 infosysusinginforevision
Int2 infosysusinginforevision
 
Int 1 comp ca and mm
Int 1 comp ca and mmInt 1 comp ca and mm
Int 1 comp ca and mm
 
dl_ppt
dl_pptdl_ppt
dl_ppt
 
ASP.NET MVC 新增、查詢、修改、刪除 基本功實戰 -twMVC#3
ASP.NET MVC 新增、查詢、修改、刪除 基本功實戰 -twMVC#3ASP.NET MVC 新增、查詢、修改、刪除 基本功實戰 -twMVC#3
ASP.NET MVC 新增、查詢、修改、刪除 基本功實戰 -twMVC#3
 
Int 1 information and the internet revision
Int 1 information and the internet revisionInt 1 information and the internet revision
Int 1 information and the internet revision
 
ASP.NET MVC 善用網路資源快速完打造網站
ASP.NET MVC 善用網路資源快速完打造網站ASP.NET MVC 善用網路資源快速完打造網站
ASP.NET MVC 善用網路資源快速完打造網站
 

Similaire à Intermediate 2 Revision Database Flashcards

Data Warehouse ( Dw Of Dwh )
Data Warehouse ( Dw Of Dwh )Data Warehouse ( Dw Of Dwh )
Data Warehouse ( Dw Of Dwh )Jenny Calhoon
 
Physical elements of data
Physical elements of dataPhysical elements of data
Physical elements of dataDimara Hakim
 
Advanced MySQL Query Optimizations
Advanced MySQL Query OptimizationsAdvanced MySQL Query Optimizations
Advanced MySQL Query OptimizationsDave Stokes
 
CPSC 50900 Database Systems ProjectAll your efforts this semeste
CPSC 50900 Database Systems ProjectAll your efforts this semesteCPSC 50900 Database Systems ProjectAll your efforts this semeste
CPSC 50900 Database Systems ProjectAll your efforts this semesteCruzIbarra161
 
Etl And Data Test Guidelines For Large Applications
Etl And Data Test Guidelines For Large ApplicationsEtl And Data Test Guidelines For Large Applications
Etl And Data Test Guidelines For Large ApplicationsWayne Yaddow
 
Revision booklet 6957 2016
Revision booklet 6957 2016Revision booklet 6957 2016
Revision booklet 6957 2016jom1987
 
It 302 computerized accounting (week 2) - sharifah
It 302   computerized accounting (week 2) - sharifahIt 302   computerized accounting (week 2) - sharifah
It 302 computerized accounting (week 2) - sharifahalish sha
 
ICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptxICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptxInfotech27
 
Interactivity on Excel Using Pivoting, Dashboards, “Index and Match,” and Glo...
Interactivity on Excel Using Pivoting, Dashboards, “Index and Match,” and Glo...Interactivity on Excel Using Pivoting, Dashboards, “Index and Match,” and Glo...
Interactivity on Excel Using Pivoting, Dashboards, “Index and Match,” and Glo...Shalin Hai-Jew
 
Physical Database Design & Performance
Physical Database Design & PerformancePhysical Database Design & Performance
Physical Database Design & PerformanceAbdullah Khosa
 
Database Performance
Database PerformanceDatabase Performance
Database PerformanceBoris Hristov
 
Database Analytics for PGDM first - year
Database Analytics for PGDM first - yearDatabase Analytics for PGDM first - year
Database Analytics for PGDM first - yearPavithra M. R
 
Databases & spreadsheets
Databases & spreadsheetsDatabases & spreadsheets
Databases & spreadsheetsMrJRogers
 

Similaire à Intermediate 2 Revision Database Flashcards (20)

Data Warehouse ( Dw Of Dwh )
Data Warehouse ( Dw Of Dwh )Data Warehouse ( Dw Of Dwh )
Data Warehouse ( Dw Of Dwh )
 
Higher Homework
Higher HomeworkHigher Homework
Higher Homework
 
Physical elements of data
Physical elements of dataPhysical elements of data
Physical elements of data
 
Advanced MySQL Query Optimizations
Advanced MySQL Query OptimizationsAdvanced MySQL Query Optimizations
Advanced MySQL Query Optimizations
 
CPSC 50900 Database Systems ProjectAll your efforts this semeste
CPSC 50900 Database Systems ProjectAll your efforts this semesteCPSC 50900 Database Systems ProjectAll your efforts this semeste
CPSC 50900 Database Systems ProjectAll your efforts this semeste
 
D 17
D 17D 17
D 17
 
Etl And Data Test Guidelines For Large Applications
Etl And Data Test Guidelines For Large ApplicationsEtl And Data Test Guidelines For Large Applications
Etl And Data Test Guidelines For Large Applications
 
Databases By ZAK
Databases By ZAKDatabases By ZAK
Databases By ZAK
 
Revision booklet 6957 2016
Revision booklet 6957 2016Revision booklet 6957 2016
Revision booklet 6957 2016
 
It 302 computerized accounting (week 2) - sharifah
It 302   computerized accounting (week 2) - sharifahIt 302   computerized accounting (week 2) - sharifah
It 302 computerized accounting (week 2) - sharifah
 
ICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptxICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptx
 
Sq lite module6
Sq lite module6Sq lite module6
Sq lite module6
 
Interactivity on Excel Using Pivoting, Dashboards, “Index and Match,” and Glo...
Interactivity on Excel Using Pivoting, Dashboards, “Index and Match,” and Glo...Interactivity on Excel Using Pivoting, Dashboards, “Index and Match,” and Glo...
Interactivity on Excel Using Pivoting, Dashboards, “Index and Match,” and Glo...
 
Physical Database Design & Performance
Physical Database Design & PerformancePhysical Database Design & Performance
Physical Database Design & Performance
 
Sql basics
Sql  basicsSql  basics
Sql basics
 
Database Performance
Database PerformanceDatabase Performance
Database Performance
 
Database Analytics for PGDM first - year
Database Analytics for PGDM first - yearDatabase Analytics for PGDM first - year
Database Analytics for PGDM first - year
 
Databases & spreadsheets
Databases & spreadsheetsDatabases & spreadsheets
Databases & spreadsheets
 
Bill howe 2_databases
Bill howe 2_databasesBill howe 2_databases
Bill howe 2_databases
 
Ddd ms dec 2010
Ddd ms dec 2010Ddd ms dec 2010
Ddd ms dec 2010
 

Intermediate 2 Revision Database Flashcards

  • 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 is meant by each of these terms. 2
  • 3. Databases can be either flat- file or relational. State what is meant 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 a centralised database. 4
  • 5. Explain what is meant by a centralised database.  A database saved to a single location 5
  • 6. State two advantages of using a centralised database instead of several copies of a database saved to various standalone computers. 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 up Data is accessible to everyone It is easier to know which is the correct version It is easier to protect the database 7
  • 8. Database systems are widely used to store information that used to be held on paper. State two advantages a computerised database has over a manual system. 8
  • 9. Database systems are widely used to store information that used to be held on paper. State two advantages a computerised database has over a 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 the term Entity with reference to a database. 10
  • 11. Explain what is meant by the term Entity with reference to a database.  An entity becomes a table in an electronic database. 11
  • 12. State two advantages of using a relational database made of linked tables rather than a flat- file database. 12
  • 13. State two advantages of using a relational database made of linked 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 an insertion anomaly. 14
  • 15. Explain what is meant by an insertion 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 a database that may have been based on a query is known as…. 16
  • 17. Formatted output from a database that may have been based on a query is known as….  A report. 17
  • 18. State two purposes of normalising 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 data modelling. 20
  • 21. Explain what is meant by data modelling.  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 be unsuitable as a primary key. 26
  • 27. Explain why a field such as “Customer_Name” would be unsuitable 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 used in a database system 28
  • 29. Explain why validation is used in 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 of validation: (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 validation check illustrated here> 34
  • 35. State the type of validation check illustrated here>  Restricted choice 35
  • 36. “Your email address is required. Please enter your email address” State the type of validation check being used in this example. 36
  • 37. “Your email address is required. Please enter your email address” State the type of validation check being used in this example.  Presence check. 37
  • 38. Name and explain two types of validation that could be used on the Player ID field. 38
  • 39. Name and explain two types of validation that could be used 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 database would be used to display the Player name and Average points. The player with the most points should be displayed first, any players with the same number of points should appear alphabetically. 40
  • 41. Explain how the database would be used to display the Player name and Average points. The player with the most points should be displayed first, any players with the same number of points should 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 need to be done to produce a list of all players who are not injured and have an average of more than 5 points per match. 42
  • 43. Describe what would need to be done to produce a list of all players who are not injured and have an average of more than 5 points per match.  Search for ‘Injured’ = ‘NO’ 1 mark  AND 1 mark  ‘Average points per match’ >5. 1 mark 43
  • 44. Explain a type of validation that could be used on the “Age” field for the sample pupil database shown here. 44
  • 45. Explain a type of validation that could be used on the “Age” field for the sample pupil database shown 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 of the following numeric data types would 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 following data field types could be used in a database: (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 that would find all the female campers or campers who have taken the course 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 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. 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 a Boolean data type. 58
  • 59. Explain what is meant by a Boolean 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 the results of a query from a database. What is the name for printed output from a database? 62
  • 63. A doctor’s office wants to print out the results of a query from a database. What is the name for printed output from a database?  Report 63
  • 64. Normalise the data by removing multi-valued attributes and show 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 attributes and show how the data would be represented as two tables. [7] 68
  • 69. Normalise the data by removing multi-valued attributes and show how the data would be represented as two tables. [7] SHOP(Shop ID, Location) EMPLOYEE( Employee ID, Employee Name, Address, Position, Hourly Wage, Shop ID*) 69
  • 70. State two reasons for normalising 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 attribute from the database shown here. 72
  • 73. Identify one multi-valued attribute from 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 for exams. 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 for exams. 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 database report. Explain what is meant by a “report”. 78
  • 79. The example here is a database report. Explain what is meant by a “report”.  Formatted output from a database used for hard copies. 79
  • 80. Describe how the Pupil table was searched and sorted to provide the information for the report. 80
  • 81. Describe how the Pupil table was searched and sorted to provide the information for 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