Presentation is loading. Please wait.

Presentation is loading. Please wait.

Database Design Concepts Info 1408 Lecture 2 An Introduction to Data Storage.

Similar presentations


Presentation on theme: "Database Design Concepts Info 1408 Lecture 2 An Introduction to Data Storage."— Presentation transcript:

1 Database Design Concepts Info 1408 Lecture 2 An Introduction to Data Storage

2 Lecture 2- Data Storage Objectives of lecture Introduce the purposes of data processing Explain the terms of fields, records and files Explain how these are organised in traditional data processing systems Introduce how Database offers a solution to some of the problems with traditional data processing systems

3 Information System Information systems process data What is data? A definition Unprocessed information consisting of details relating to business transactions input into an information system to produce information Often computerised but can be manual

4 Typical activities of an Information System Getting data into the system ( input) Storing data (Saving) Sorting data (ordering) Finding data (Retrieving) Processing data into a usable data (manipulating) Changing data ( updating) Checking data is correct and reasonable (Validation and verification) Calculation

5 To be able to carryout these processes we need to organise our data The smallest unit of usable data is known as a field or attribute

6 Properties of fields Each field will have A name A description A Size A type A value of a variable A range of acceptable values

7 Example Date of Birth Name- date of birth Description- the date the person was born Size- 10 characters (dd/mm/yyyy) Type- date Value of a variable This varies for each person but each person will have a value for date of birth which is stored in that field Range- the date should be before today’s date

8 Complete the following table NameStudent nameAddress Description Size Type Range

9 NameStudent nameSavings account balance DescriptionName of a student registered on the course The amount of money in the account Size2010 TypeAlphabetic character Real number RangeanythingGreater than 0

10 Records Fields that describe an entity are combined to make a record For example Student name, student address and student telephone number all describe a student- they are combined in a student record to record facts about a student Each individual student will have a record- made up of the same fields

11 Records continued When designing a record it is important to decide which fields are required to carryout all the processing requirements of the information system A record can have mandatory fields (fields which must have a value) And optional fields ( some instances may not have a value) Eg all students must have a name and date of birth but not all of them will have a mobile phone number

12 Files Records which describe the same type of entity are grouped together into a file For example all the individual student records will be kept together in a file- this will usually have a name that describes what the records hold information about – in this case the student file seems an appropriate name

13 An information system needs to store all of these files (on disc) This is no different to a filing cabinet we need to store the files in a way that makes it easy for us to find any information as easily as possible.

14 Imagine using a filing cabinet to store student registration forms and you need to know if a student called John has been registered properly We make it easy to find information by sorting all the records in a file in a particular order.

15 Methods of electronic file organisation (before database management systems) Serial in the order they were added to the file Sequential- in a specific order eg alphabetically Indexed sequential – In a specific order but with an index to help you locate something specific ( index is like a book index it tell you where to go exactly on the disc) Random access uses a key (or code) which tells you where to find the record.

16 Drawbacks of traditional file organisation? The problem with this approach is that you have to think how you want to access your information and choose a file organisation to do this. This is often called a flat file system. As different users may want to do different things there may be situations where: (see next slide)

17 Drawbacks continued  Different users have different versions of the same file Example A bank customer changes their address The customer has a record for their current account, savings account, bank loan and the marketing file all of which record the customers address. How can we be sure we have changed it on every file?  Examples of junk mail etc show very often things don’t get changed on all files  Even worse what if you find yourself with two addresses for the same customer- which is correct ?  The other problem with this you have a lot of duplicate data and are therefore wasting a lot space and money maintaining it.

18 Drawback continued  Problems in doing new activities. For example recording e-mail addresses for customers ( you didn’t before)  As programmes will need to know how a file is structured any change to the file means every programme which uses that file will need to be changed again this takes a great deal of time and costs a lot of money

19 How do we reduce these problems? In recent years many companies have used Databases (DBMS) to remove these problems (and many others) A database provides a method of storage which enables all the users to share the data (removes the duplication and consistency problems) in a way that allows the structure of the data to be changed relatively easily (for example add new fields)

20 This means it is easier to use but it makes the design more difficult. It is important to design a database that meets everyone's needs We will be learning how to identify all the data requirements of the different users and organise it in a way which allows everyone to share the same data We will identify the attributes required- (which is the database name for a field) Into tables ( which is the database name for a file)

21 Summary Information systems store data in files- In database system this known as a table. A file is made up of records which describe each instance of interest using the same fields. A database system calls a record a row, and a field is known as an attribute. Files are organised in a way that makes it easy for a user to find a specific record but this may not be suitable for all users. Databases give us a way of being able to find data easily and quickly.

22 References Satzinger Andy Oppel Skidmore and

23 Tasks for the week When you have completed all the lessons for this week ( lecture, tutorial and lab) check you understand the following terms. For each of the following terms give a definition and an example Database Row Table Attribute What are the properties of an attribute ? Why would a company use a database instead of a flat file system?


Download ppt "Database Design Concepts Info 1408 Lecture 2 An Introduction to Data Storage."

Similar presentations


Ads by Google