Introduction To Database Management SYSTEM
Introduction To Database Management SYSTEM
Lecture 1
About Data
The axiom "better data means better decisions" is more true today than ever. No matter what business you're in, the success of your organization depends on accurate and timely information.
What is data? Why: you need data? Where: is data reside? Who: data belongs to? How: is it a worthwhile data?
Objectives
Some common uses of database systems. Characteristics of file-based systems. Problems with file-based approach. Meaning of the term database. Meaning of the term Database Management System (DBMS).
Objectives
Typical functions of a DBMS. Major components of the DBMS environment. Personnel involved in the DBMS environment. History of the development of DBMSs. Advantages and disadvantages of DBMSs
Information Hierarchy
Data: The raw Material of Information Information: Data organized and presented in a particular manner. Knowledge: Justified True belief. Information that can be acted upon. Wisdom: Integrated knowledge. High level understanding
Some examples
Purchases from a supermarket Bar code reader to scan each purchase. Bar code reader is linked to an application program that uses the bar code to find out the price of the item from a product database. This program reduces the number of such items in stock and displays the price on the cash register. If the reorder level falls below a specified threshold, the database system may automatically place an order to obtain more stocks of that item.
Assistant normally checks you have sufficient credit left to make the purchase. This can be done on the telephone or may be done automatically by a card reader linked to a computer system. There is a database somewhere that contains information about the purchases you have made on your credit card. To check your credit there is a database application program that uses your credit card number to check that the price of the goods you wish to buy together with the sum of the purchases you have already made this billing period is within your credit limit.
confirmation of the purchase the details of the purchase are added to this database. The application program also accesses the database to check that the credit card is not on a list of stolen credit cards before authorising the purchase. There are other application programs to send out monthly statements to each credit card holder and to credit accounts when payment is received
What is data? Why: you need data? Where: is data reside? Who: data belongs to? How: is it a worthwhile data?
The file-based system is the predecessor of the database system. This approach is mostly obsolete but:
understanding the problems inherent in file based systems may prevent us from repeating these problems in our database systems, understanding how the file system works is extremely useful when converting a file-based system to a database system.
File-Based Approach
DEFN: The File-based system is a collection of application programs that perform services for the end-users such as the production of reports. Each program defines and manages its own data. These were an early attempt to computerise the manual filing system that most of us are familiar with. Really only works well when the number of items to be stored is small. It works adequately when there are large numbers and we have only to store and retrieve them
A file is simply a collection of records, which contain logically related data. Each record contains a logically connected set of one or more fields, where each field represents some characteristics of the real-world object that is being modelled.
The manual filing system breaks down when we have to cross-reference or process information in the files. Example: A typical real estate agents office might have a separate file for each property for sale or rent, each potential buyer and renter, and each member of staff.
How easy would it be to answer these questions using this set up?
What flats do you have for rent within three kilometres of the city centre? What is the average rent for a two-bedroom flat? What is the total annual salary bill for staff? How does last months turnover compare with the projected figure for this month? What is the expected monthly turnover for next financial year?
Entry test, student enrolment, fee collection, course registration etc. Exams announcements, student results etc Course allocation, salaries etc.
Which students taking the course of IDMS which is allocated to Mohsen Ansari? How many students passed the prerequisite subject DS taking course IDMS. Which students eligible for scholarship according to university criteria?
The file-based system was developed in response to the needs of industry for more efficient data access. A decentralised approach was taken, where each department, with the assistance of Data Processing (DP) staff, stored and controlled its own data. We will illustrate this using an example
The Sales Department is responsible for selling and renting property. The form that landlord has to fill out before property is marketed for rent is
Sales Department also handles enquiries from clients (renters) (b) Client Details form.
Propert y
With assistance of Data Processing (DP) Department, Sales Department creates an information system to handle renting the property This consists of three files containing property owner and client details
Owner
client
Contracts Department is responsible for rental agreements. Whenever a client agrees to rent a property a form is filled out by one of the Sales staff which is passed to the Contracts Department which allocates a lease number and completes the payment and rental period details.
With assistance from the Data Processing (DP) Department the Contracts Department creates an information system to handle lease agreements. This consists of three files containing lease, property, and client details The data is similar to that held by the Sales Department.
Sales Department
Sales Files
PropertForRent(propertyNo, street, city, postcode, type, rooms, rent, ownerNo) PrivateOwner(ownerNo, fName, lName, address, telNo) Client(clientNo, fName, lName, address, telNo, prefType, maxRent)
Contract Department
Contract Files
Lease(leaseNo, propertyNo, clientNo, rent, paymentMethod,deposit, paid, rentStart, rentFinish, duration) PropertyForRent(property No, street, city, postcode, rent) Clientv(clientNo, fName, lName, address, telNo)
There is a significant amount of duplication of data in the two departments. This duplication of data is generally true of filebased systems.
Each department accesses their own files through applications programs written specially for them. Each set of application programs handles data entry, file maintenance, and the generation of a fixed set of specific reports. The physical structure and storage of the data files and records are defined in the application code.
is more difficult to access data that should be available when the data is isolated in separate files. The difficulty is compounded if we required data from more than two files.
Duplication of data
Uncontrolled duplication of data is undesirable It is wasteful. It costs time and money to enter the data more than once. It takes up additional storage space which has costs attached. Often duplication can be avoided by sharing files. Privacy? Security?? Duplication can lead to loss of data integrity; the data is no longer consistent.
Data dependence The physical structure and storage of the data files and records are defined in the application code. Making changes to an existing structure is difficult.
Incompatible file formats The structure of files is embedded in the applications program (??? Any example? ). The structures are dependent on the application programming language.
Example: The structure of a file generated by a COBOL program may be different from the structure of a file generated by a `C program. The direct incompatibility of such files makes them difficult to process jointly. They need to be converted to some common format to facilitate processing.
Fixed queries/proliferation of application programs File-based systems are very dependent upon the application developer, who has to write any queries or reports that are required. For some organisations the query or report that could be produced was fixed.
prevision for security or integrity, In the event of hardware or software failure recovery was limited or non-existent, no provision for shared access, access to files was restricted to one user at a time.
A database is a collection of related data. The Database Management System (DBMS) is the software that manages and controls access to the database. A database application is a program that interacts with the database at some point of its execution. The database system is a collection of application programs that interact with the database along with the DBMS and the database itself.
The database and the Database Management System (DBMS) were developed to overcome these limitations. DEFN: The database is a shared collection of logically related data, and a description of this data, designed to meet the information needs of an organisation.
The database is a single, possibly large, repository of data that can be used simultaneously by many departments and users, All data items are integrated with a minimum amount of duplication.
Database
The database is a shared corporate resource. The database holds not only the organisations operational data but also a description of the data.
For this reason, a database is also defined as a self describing collection of integrated records. The description of the data is known as the system catalog (or data dictionary or metadata the `data about the data). It is the self-describing nature of a database that provides program-data independence.
Database
the structure of the data the application programs stores it in the database.
If the new data structures are added or existing structures are modified then the application programs are unaffected, provided they do not directly depend upon what has been modified.
If we add a new field or record or create a new file, existing applications are unaffected. If we remove a field from a file that an application program uses, then that application program is affected by this change and must be modified accordingly.