Weebly

?Link for Section homework Answers: Domain Hacks: A domain hack is where you shorten a web address in a clever way, or where you spell something catchy or easy to remember with a Top Level Domain (TLD). skydrive. --> sdrv.ms (Montserrat) Delicious --> del.icio.us (USA) Instagram --> Instragr.am (Armenia) Google --> goo.gl (Greenland) Youtube --> youtu.be (Belgium) g.co --> Google (Columbia) t.co --> Twitter (Columbia) za.ch --> (Switzerland) kop.rs --> (Serbia) Data Types Question A 1. Name of field Example data Data type Title (Mr., Mrs., Ms., Dr., etc.) Alphanumeric Phone number 0798273232 Numbers Sex M or F Logical/ Boolean Country Botswana Word Date of birth 01/10/03 Dates Years at address 4 Number 2. Items of data Tick if data type is logical/Boolean Driving licence (yes or no) o Sex (M or F) o Size (S, M, L, XL, XXL) Not logical/Boolean Airport code Not logical/Boolean Car registration number Not logical/Boolean Date of purchase Not logical/Boolean Car type (manual or automatic) o Fuel type (diesel or petrol) o Are you hungry? Not logical/Boolean Is your name long or short? Not logical/Boolean Question B A luxury car rental firm keeps the details of the cars it rents out in a table. The structure and contents of this table are shown below. Reg-Number Make Model Year DB51 AML Aston Martin D87 2009 CAB 360M Ferrari 360 Modena 2008 GT X34 FER Ferrari 355 Spider 2000 MAS 12 Maserati 3200 GTA 2001 FG09 FRT Porsche 911 Turbo 2009 M3 MMM BMW M3 Conv 2010 T433 YTH Jaguar XK8 2009 Give the names of two fields shown in the above table. Model, Year Give the name of the field that should be chosen as the key field. Color Explain why the field you have chosen for your answer to part (b) should be chosen as the key field. Because people also consider about the colors of the car whey they buy. How many records are there in the table? 2. Most schools now use databases to store details about each pupil. The table shows some of the field names and data types stored in one pupil database. Field Name Data Type UniquePupilNumber Number Firstname Surname Text/Alphanumeric FirstLineAddress Text/Alphanumeric SecondLineAddress Text/Alphanumeric Postcode LandlineNo Text/Alphanumeric DateOfBirth Date FreeSchoolMeals(Y/N) Give the most appropriate data types for the following fields: Firstname RichardPostcode L19 8CE FreeSchoolMeals (Y/N) N Give the names of three other fields that are likely to be used in this database. Contact Phone Number, Nationality, Sex Explain which field is used as the key field in the database and why such a field is necessary. UniquePupilNumber, because it cannot be same as others'. It is important that the data contained in this database is accurate. Describe how two different errors could occur when data is entered into this database. Transcription errors - where data copied from forms is misread. Transposition errors - where digits are incorrectly reversed when being entered into a database. Explain how the errors you have mentioned in part (d) could be detected or prevented. You can fix transcription errors by verifying the data. after you enter it. You can fix transposition errors by adding a check digit at the end of a long number. Linking files: To link files means to have two different files (records) which share the same information. (Data and Meaning) When we link these files, any changes made to one file is changed also on the linked file. Forming Relationships between files. Digital - Analogue Converters (DAC) Digital signals are used by the computer. They can be expressed using a logical/boolean language, like 1 and 0. They have a very limited number of choices in terms of stepping. Analogue signals are used by computer speakers. They have infinite number of choices in terms of stepping. Sampling : The rate at which a computer decides which number to apply to something. Music: Sampling is how many times a second a computer digitalizes a sound. 128kbps was sampled 128,000 times per second. The higher the bit rate number, the better digital quality the music. Pictures: The visible light spectrum has an infinite number of color choices. Sampling in a picture is where a computer assigns a number to a color. A computer MUST assign a number to each choice; therefore, a computer must have a finite number of color choices. The more color choices a computer makes, the more natural the colors look, and the better the photograph. This is expressed in mega-pixels, or millions of total pixels. 2mp photo is lower quality than a 20mp photo. 3. a. Explain what is meant by a flat - file database. Flat-file databases are of limited use and are only suitable for very simple databases. Flat files only contain one table of data. Explain what is meant by a relational database. In a relational database, we do not store all the data in a single file or table. Instead the data is stored in several tables with links between the tables to enable the data in the separate tables to be combined together if needed. Describe an application where a flat-file database would be suitable. Simple databases such as product, employee, student, etc. 4. Databases are of two types: flat file and relational. Describe two differences between a flat-file database and a relational database. Flat- file databases are suitable for only a few applications, however, the relational databases are suitable for the much more comprehensive and flexible applications. A dress hire company needs to store details of dresses, customers, and rentals. They want to store these details in a database. Which type of database do you suggest and give two reasons for your answer. I think flat files databases are better to store those details, because if all the information is written in a table, it would be much easier to compare and see the differences. Test Yourself The following notes summarize this topic. The notes are incomplete because they have words missing. Using the words in the list below, copy out and complete the sentences A to N, underlining the words that you have inserted. Each word may be used more than once. analogue to digital record digital to analogue foreign real key field Boolean links redundancy fields relational analogue alphanumeric digital table Numeric data can be in two forms integer or (redundancy). Letters and numbers together are called (alphanumeric) data. Logical or (Boolean) data can have only one of two values : True or False. A (key field) is a piece of data in a data in a database system that is unique to a particular record. All the data relating to a single thing or person is called a (record). A record consists of many (fields). A database where the data is held in two or more tables with links established between them is called a (relational) database. Flat - file databases only contain one (table) of data. Relational databases have (links) called relationships between the tables. In order to create a relationship a primary key in one table is linked to the same field called a (foreign) key in the other table. Flat file may suffer from data (real) where a lot of the data in the table is repeated. An analogue signal from a temperature sensor will need to be converted into a (digital) signal before it can be processed by a computer. Changing from an analogue to a digital signal is performed using an (analogue to digital ) converter. In order to control a device such as a motor, a digital signal from the computer will need to be changed into an (analogue) one and this is done using a (digital to analogue) converter. Revision Question Here is a sample of the data that is to be stored in an employee database. The data items shown are the employee's surname, initial, street, postcode, and telephone number. Ahmed, V, 123 The High Street, L23 6DE, 0151-002-1112 Delos, N, 64 North Way, L9 8SS, 0151-002-0011 Doyle, B, 12 Crosby Road, L23 2DF, 0151-002-1212 Carrol, A, 15 Barkfield Drive, L23 7YH, 0151-002-0899 Conway, T, 6 Windle Hey, L23 6ER, 0151-003-0899 Hoch, J, 4 Empress Road, L22 7ED, 0151-003-9090 Hoch, J, 4 Empress Road, L22 7ED, 0151-003-9090 A table is to be set up with four fields. Give field names for the four fields that would be suitable for the above set of data items. Name, postcode, initial, telephone number The person who is designing the database looks at the sample of data above and notices that there are two people with the same surname and initial who live at the same address. Explain why the surname would be an unsuitable key field. Because there could be people with same surname It is decided that each employee should be given a unique number. What would be a suitable field name for this field. Employee number 2. A store keeps details about their customers and their orders in an information handling system. Part of the data in this system is shown below: Customer number Name Item code Size Cost Delivery 2314 Hughes 464 Small $290 N 9819 Wong 255 Large $767 Y 1311 Khled 747 Small $239 N 8276 Lee 299 Small $200 Y 9223 Smith 108 Large $823 Y Give the names of two key fields used in the above table. Customer number and name There is one "Boolean" field in this database. Give the name of it. Delivery Give the names of two other fields that could be sensibly used in this table other than customer name, customer address and customer telephone number. Customer number, Item code The store offers free delivery on all items with a cost greater than $200. How many of the customers shown would qualify for the free delivery? 4 3. Sensors such as temperature, moisture, and light sensors are used to monitor the growing conditions in a greenhouse. Explain why computers are not able to read the data directly from these sensors. Because it is an analogue quantity Give the name of the devices needed to enable the computer to read this data. Analogue to digital conventer .Words - Apples .Letters - abc .Grades - A*, F .Numbers - 1,2,3,4000000, 3.45, 6.1 .Cost - $25, 25RMB .Symbols - !@#$%^&*()_+|}{":?>< .Dates - October 2nd , 2042 2042/10/02, 10/02/2042, 02/10/2042, 02/10/2042, 02/10/42 .Time - 12:00 pm, 23:07 .Logical/Boolean - Yes/No,1/0,On/Off, True/False .Alphanumeric - C3, D4, A505, B202, Dr., Mr., Mrs., /, www2. File: A collection of related records. A record of this class is called a table. If you combine the tables for all classes you get a file. A file is made up of records Records: All the data relating to a single thing or person. A record is made up of fields. Name, Age, Sex, DOB, Grade Field: a single item of data. Age Data: A fact about something. Information: Data + Meaning = Information 02/11/11. You need the field name (data). Data: 02/11/11 Meaning: It's a date, with the day first, the month second, and the year last Information: November 02, 2011 Data is pointless and confusing without meaning. Key Field: A piece of data which everyone has in common. But, this data is unique to each person. Student ID number. Passport Number. National ID Number. Social Security Number. Flat-File Database: a 1 document database, like one Excel Spreadsheet. Relational Database: 3 Excel Spreadsheets which are connected together. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download