Você está na página 1de 6

Chapter 3.6 June 2006 7 A health centre employs doctors, nurses and receptionists.

The data that is stored about the patients includes their medical history and personal information about them. Explain the need for maintaining privacy of the data and describe methods by which the database management system (DBMS) can help to achieve this. [6] 7 - different workers at the centre need access to different information - doctor needs access to medical histories - receptionist needs access to general information - access can be of different types/RO and RW - dependent on seniority/need to amend data - some data is particularly sensitive and needs to be properly protected - access controlled by passwords - physical control of what can be seen through different machines and - specific times during the day/week when it is available to see/amend - access rights determined by - passwords/which machine used/user IDs - lead to different HCIs giving different views of the data - sensitive files encrypted - human right of privacy - could be serious consequences (loss of job) if information became known (1 per -, max 6) June 2007 11 (a) The structure of a database management system (DBMS) consists of three levels; External level, Conceptual level, Internal level. State the meaning of each of these levels. [3] (b) Describe the purpose of the following: (i) the data description language (DDL), [2] (ii) the data manipulation language (DML). [ 11 (a) External level gives the different views of the data seen by each of the users. Conceptual level is an integration of all the user views of the data/abstract representation of the whole database/relationship between tables Internal level is the structure used for storage of the data/the logical arrangements of the data for storage. [3] (b) (i) - Used to define the data tables - Specifies data types/structures - Specifies constraints on the data (ii) Allows the user to:

- Insert - Update - Delete - Modify/edit - Retrieve data (1 per -, max 2 per dotty, max 4) June 2008 1 (a) Explain what is meant by a flat file. [3] (b) Explain the advantages of using a relational database rather than flat files. 1 (a) -Database held as a single table -Comprises records of information -relating to physical items -and fields within the records -each record containing the same fields (1 per -, max 3) [3] (b) -Reduced data duplication -because data can be cross referenced using foreign keys -Improved accuracy of data -because changes made more easily -Improved data integrity -because reduced duplication means fewer clashes -Improved data security (privacy) -because DBMS will control access by users more easily -Improved understanding by users -because different users can be given different views of the data (max any 6) June 2009 4 A furniture shop sells a large number of different items whose details are stored in the STOCK table. The shop has a large number of customers whose details are stored in the CUSTOMER table. Some customers have an account. Each customer can only use one account. Some accounts can be used by more than one customer (for example all the members of one family may use the same account). Details of accounts are stored in the ACCOUNT table. (a) Draw the relationship between the CUSTOMER and ACCOUNT tables in the form of an entity-relationship (E-R) diagram. [1] A number of stock items will be stored on each account. Each type of stock item will be stored on many accounts. (b) (i) State the type of relationship between the ACCOUNT and STOCK tables. [1] (ii) Draw the normalised relationship between the ACCOUNT and STOCK tables in the form of an E-R diagram. [2] (c) By using examples from the CUSTOMER table, explain what is meant by: (i) primary key, [2] (ii) secondary key, [2] (iii) foreign key. [2]

(d) Discuss the need for controlling access to the database tables and how access can be controlled. [6] 4 (a) [1] (b) (i) Many to many. [1] (ii) Marks: -Use of Link table with sensible and descriptive name -ACCOUNT to LINK is One to Many -LINK to STOCK is Many to ONE. (1 per -, max 2) [2] (c) (i) -A unique identifier for a record -e.g. Customer ID. [2] (ii) A field/item, not the primary key, offering an alternative identification for the record (not necessarily unique.) -e.g. Postal area (to arrange delivery schedules). [2] (iii) -A field/item in one table which is a primary key in another table/acts as a link between tables. -Account number in customer table links records to relevant account in account table. [2] (d) -Confidential/Personal data of a sensitive type. -Will have guaranteed privacy of data to customers. -Must comply with legislation protecting data. -Do not want to lose any data or have data maliciously altered/used Important to maintain data integrity. -Passwords to get onto system -and into different tables -in hierarchical fashion -giving different access rights/RO or RW -and providing different views of the data -Physical protection by (e.g.) locking system terminals away/iris recognition/fingerprints/. -Protecting system with firewalls etc. (1 per -, max 6) June 2010 4 (a) Describe a hierarchical database. [2] (b) PATIENTs in a hospital are arranged in WARDs. Each WARD has a number of BEDs. The STAFF of the hospital are either DOCTORs or NURSEs. Draw a diagram to represent the details given above in the form of a hierarchical database. [6] 4 (a) -Data are held in a tree structure -with each level providing more detail to the data held on a higher level -Links to related data items at higher and sometimes lower levels (1 per -, max 2) [2] (b) Mark points: 1 for root being person or similar 1 for second level of Staff and Patient 1 for third level below Staff

1 for third level below Patient 1 for fourth level showing beds 1 for indicating continued division of ward in some way [6] Nov 2005 1 (a) Explain what is meant by a flat file. [2] (b) Describe three advantages of using a relational database over flat files. 1 (a) -All the data is held in a single file -which is two dimensional -rows for records/columns for fields (1 per -, max 2) [2] (b) -Less duplication of data held -because data does not have to be in every file/table -Greater data integrity -because limited data duplication means less chance of one copy of data altered when another is not -Data is available to all -because overcomes problems of file compatibility with software -Creation of user views of data -within the DBMS -Ease of access to data -because data accessible through relations/queries (1 per -, max 3 x 2 pairs, max 6) Nov 2006 2 (a) State what is meant by the terms: (i) primary key, (ii) secondary key, (iii) foreign key in the context of a table in a relational database. [3] (b) State three advantages of using a relational database rather than a set of flat files. 2 (a) (i) unique value in the table used to identify the record (ii) key used to access the records in a different order (iii) an attribute in one table that is a primary key in another table/to provide a link between tables (3) (b) -reduces duplication of data/no duplication of data -(improved) data integrity -allows for different views of the data -more simple to control access to data -simpler/faster/easier to access specific data through searches/queries (1 per -, max 3) (3)

Nov 2008

3 Part of a school database consists of a table of student details and a table of teacher details. A teacher teaches many students. A student is taught by many teachers. (a) (i) State the type of relationship between the two tables. [1] (ii) Explain how the relationship between the student and teacher tables can be normalised. [2] (iii) Draw the normalised relationship between the tables in the form of an entity-relationship (E-R) diagram. [3] (b) Explain what is meant by each of the following terms and give an example of each from the tables in part (a). (i) Primary key (ii) Foreign key 3 (a) (i) Many to many [1] (ii) Use of link table which would be one to many and many to one with the tables By removing many to many relationships by removing functional dependencies [2] (iii) Mark points: A link table with a sensible name Correct relationship STUDENT/LINK Correct relationship LINK/TEACHER (1 per , max 3) [3] (b) (i) Field or attribute in each record which uniquely/identifies the record StudentID/TeacherID/StudentIDTeacherID (ii) a field or attribute in one table which is the primary key in another table e.g. Student ID in the link table [4] Nov 2009 7 A library uses a computer system to store data in a database. There are a large number of members of the library whose details are stored in the MEMBER table. There are a large number of books, details of which are stored in the BOOK table. Members can borrow books. Each member can borrow more than one book and each book can be borrowed by many members. (a) (i) State the type of relationship between the MEMBER and BOOK tables. [1] (ii) Draw the relationship between the MEMBER and BOOK tables in third normal form as an E-R diagram. [2] (b) Use examples of attributes in the MEMBER table to explain what is meant by: (i) primary key, [2] (ii) foreign key, [2] (iii) secondary key. 7 (a) (i) Many to many. [1] (ii) Mark Points:

Use of a link table with a suitable name Both relationships correct. [2] (b) (i) A unique identifier for a record e.g. Member number [2] (ii) An attribute in one table which is primary key in another/acts as a link between tables e.g. Member number used in Loan table to identify who has borrowed a book. [2] (iii) An attribute (not the primary key) offering another identification for a record (not necessarily unique) e.g. Town in which they live is searched for all in Carnforth in order to send reminders about an event being held in the town. Nov 2010 2 A buildings maintenance company looks after a number of BUILDINGs in a city. Each BUILDING is occupied by one or more FIRMs. Each FIRM may have premises in more than one BUILDING. Each of the FIRMs has a CONTRACT with the company for their part of the BUILDINGs. Some of the FIRMs may share a CONTRACT. Draw an entity-relationship (E-R) diagram to represent this data model in third normal form 2 FIRM FIRMBUILDING CONTRACT BUILDING Mark points: 3 tables FIRM, CONTRACT, BUILDING Firm to contract shown as many-to-one Link entity with sensible name Firm to link is shown as one-to-many Link to building is shown as many-to-one (allow one mark if firm to building is shown as many to many) [5]

Você também pode gostar