Presentation is loading. Please wait.

Presentation is loading. Please wait.

Project 2 Data Structure Design. Objectives To create two data structure designs To understand the advantages of linking tables To be able to describe.

Similar presentations


Presentation on theme: "Project 2 Data Structure Design. Objectives To create two data structure designs To understand the advantages of linking tables To be able to describe."— Presentation transcript:

1 Project 2 Data Structure Design

2 Objectives To create two data structure designs To understand the advantages of linking tables To be able to describe the advantages and disadvantages of your structures

3 Marks Produce designs for the data structure (3 marks)Mark Produce a file structure for your database.1 Produce alternative designs.2 Write down a list of advantages and disadvantages of each structure and give reasons why your choice is best. 3

4 Introduction You will need to create two database structures for your project and each will contain the field names, data types, properties and validation rules. One of the designs will be the same as the two tables in your Project 2 database and the other one will be different. The differences can be: –One design has one table while the other has two –There could be some fields in one design that are missing in the other –The data types of a particular field are different –The validation rules are different You then need to say what is good and bad about each design and why you chose the one you did. The changes must be appropriate.

5 Design 1 TABLE - MOTORBIKES FIELD NAMEDATA TYPEPROPERTIESVALIDATION RULE Motorbike IDAutonumberLong Integer MakeText20 CharactersSuzuki OR Honda OR Kawasaki ModelText20 Characters ColourText20 CharactersN/A PriceNumberCurrency>0 YearNumberIntegerN/A Date BoughtDateShort dateN/A TABLE - CUSTOMERS FIELD NAMEDATA TYPEPROPERTIESVALIDATION RULE Customer IDAutonumberLong Integer SurnameText20 Characters ForenameNumberCurrency AddressNumberInteger Motorbike IDNumberLong integer

6 Design 2 FIELD NAMEDATA TYPEPROPERTIES Make & ModelText40 Characters ColourText20 Characters PriceNumberCurrency YearNumberInteger Date BoughtDateShort date NameText60 Characters AddressText120 Characters

7 Flat File vs Relational Database

8 Splitting Name & Address

9 FIELD NAMEDATA TYPEPROPERTIES TitleText4 Characters ForenameText20 Characters SurnameText20 Characters StreetText30 Characters TownText40 Characters Post CodeText8 Characters FIELD NAMEDATA TYPEPROPERTIES NameText40 Characters AddressText80 Characters DESIGN 1 DESIGN 2

10 Yes/No vs Text Fields

11 FIELD NAMEDATA TYPEPROPERTIES TaxedYes/No Suitable for LearnersYes/No MOTYes/No FIELD NAMEDATA TYPE PROPERTIESVALIDATION RULE TaxedText40 CharactersYes OR No Suitable for Learners Text80 CharactersYes OR No MOTText80 CharactersYes OR No DESIGN 1 DESIGN 2

12 Changing Data Type II FIELD NAMEDATA TYPEPROPERTIES TaxedYes/No MOTYes/No DESIGN 1 FIELD NAME DATA TYPE PROPERTIESVALIDATION RULE Taxed (months) NumberByte>=0 AND <=12 MOT (months) NumberByte>=0 AND <=12 DESIGN 2

13 Number Lengths Byte0 - 2551 byte of memory Integer–32,768 to 32,767 2 bytes of memory Long Integer–2,147,483,648 to 2,147,483,647 4 bytes of memory YOU MUST LEAVE CURRENCY AND AUTONUMBER FIELDS AS LONG INTEGER

14 Number Lengths FIELD NAMEDATA TYPEPROPERTIES MileageNumberLong Integer Year MadeNumberLong Integer Number of OwnersNumberLong Integer FIELD NAME DATA TYPE PROPERTIESVALIDATION RULE MileageNumberLong Integer>=0 Year MadeNumberInteger>=1990 AND <=2007 Number of Owners NumberByte>=1 AND <=10

15 Date Format Short Date19/12/06 Medium Date19-Dec-06 Long Date19 December 2006 Short Time17:34 Medium Time05:34 PM Long Time17:34:43

16 Date Format FIELD NAMEDATA TYPEPROPERTIES Date BoughtDate/TimeLong Date Date SoldDate/TimeLong Date FIELD NAME DATA TYPE PROPERTIESVALIDATION RULE Date BoughtDate/TimeShort Date>=01/01/05 Date SoldDate/TimeShort Date>=01/01/07

17 Homework

18 Advantages & Disadvantages For both designs write a list of advantages write a list of disadvantages For your chosen design explain why you chose it by summarising the advantages and disadvantages of the designs


Download ppt "Project 2 Data Structure Design. Objectives To create two data structure designs To understand the advantages of linking tables To be able to describe."

Similar presentations


Ads by Google