Download presentation
1
Relational Database M S
In this course as discussed last week we will focus on Relational DBMS: Give freedom for adding tables and relationships as needed and altering the database structure; In a relational DBMS, data is organized: Field: represent an attribute (column) Record: a set of field values (rows..tuples) Table: a collection of records (relations) Fields and Records can be compared to columns and rows of a Table.
2
Database Model Hierarchical database store information in the form of a tree where the relationships are one-to-many. Any relationships between pieces of data need to be set when creating the database. No further changes can be made after the creation of the database. Network databases allow one to many or many to many relationships. Many to many relationships occur in the real world, so network databases may be more appropriate to such situations than hierarchical databases. Records are classified as owners or members. Relationship also need to be set when creating network databases. Relational databases put data into independent tables (files). Users can then link the tables as they wish with many to many relationships. They are slower than network and hierarchical databases, but they are more flexible. Object-oriented databases are even more flexible than relational databases. Instead of tables as in the relational model, you have objects (eg. patients in hospital database) in the object-oriented database model. Objects are self-contained, meaning that they store data as well as the instructions for manipulating the data. Work well with Object Programming language such as C++ and Java.
3
Example of DBMS Database Model System Vendor Relational MS Access
Microsoft DB2, SQL Server IBM Oracle Oracle Corp Foxpro Hierarchic IMS Intel System 2000 Culinet Network IDMS Sperry TOTAL Cincom Systems Object Oriented Voss Logic Arts Ltd db40 db4Objects, Inc EyeDB Sysra
4
Relational Database Systems
Following a famous paper written by Ted Codd in 1970’s Database system changed significantly Codd proposed that database systems should present the user with a view of data organized as tables called relations
5
Relational Database Systems
Behind the scenes, there might be a complex data structure that allow rapid response to a variety of queries. But unlike the user of earlier database systems, the user of a relational system would not be concern with the storage structure. Queries could be expressed in a very high-level language, which greatly increased the efficiency of database programmers
6
Relational Database Systems
Relations are Tables - Columns are headed by attributes which describe the entries in the column Eg. A relation named Accounts recording Bank Account, Balance and Type might look like: Acc No Balance Type 123 100.00 Sav 456 Check …
7
Relational Database Systems
Heading the columns are the attributes - Account No - Balance -Type
8
Relational Database Systems
Below the attributes are the Rows or Tuples The table show two tuples of the relation explicitly, and the dots below them suggest that there would be many more tuples.
9
Relational Database Systems
Suppose we want to know the balance of account 456. We could ask this query in SQL as follows SELECT account No FROM Accounts WHERE accountNo = 456
10
Relational Database Systems
Do NOT expect that this example is enough to make you an expert SQL programmer, but it should convey the high-level nature of the SQL “Select-From-Where” statement High Level………English like command or statement as compared to programming language in C++ etc.
11
Relational Database Systems
In principle, they ask the DBMS to: 1. Examine all the tuples of the Relation Accounts mentioned in the FROM clause 2. Pick out those tuples that satisfy some criterion indicated in the WHERE clause and 3. Produce as an answer certain attributes of those tuples as indicated in the SELECT clause In practice, the system must “optimize” the query and find an efficient way to answer the query, even though the relations involved in the query may be very large.
12
Smaller and Smaller Systems
Originally, DBMS were large, expensive software running on large computers Size was necessary because to store large amount of data require large computer system To day many gigabytes fit on a single disk therefore feasible to run a DBMS on a PC Trend – computers size Decrease, Capacity and power increases.
13
Bigger and Bigger Systems
On the other hand, a gigabyte isn’t much data. Corporate database often occupy hundreds of gigabyte As storage become cheaper people find new reasons to store greater amount of data Database no longer focus on storing simple data item (integer or short string of characters) – but can store images, audio and video and many other kind of data.
14
Bigger and Bigger Systems
Handling such large database require technological advances eg. Database of modest size are today stored on arrays of disks which are called secondary storage device. (compared to main memory which is primary storage) The fact that database systems routinely assume data is too big to fit in main memory and must be located primarily on disk at all times
15
Bigger and Bigger Systems
Trends that allow database systems to deal with large amounts of data faster: - Tertiary Storage:- - tertiary storage devices perhaps storing a tera-byte each. - require much more time to access a given item than does a disk - involve transporting an object, upon which the desired data item is stored to a reading device
16
Bigger and Bigger Systems
- Parallel & Distributed Management - the ability to store enormous volumes of data is important but it would be of little use if we could not access large amounts of data quickly - thus very large databases also require speed enhancers. - parallel Computing handle such problem
17
Client Server and Multi-Tier Architectures
Many varieties of modern software use a client-server architecture, in which a requests by one process (the client) are sent to another process (the server) for execution; Entire DBMS is a server, except for the query interfaces that interact with the user and send queries or other commands across to the server. Eg: relational systems generally use the SQL language for representing requests from the client to the server then the database server sends the answer in the form of a table or relation.
18
Client-Server and Multi-Tier Architectures
Also trend to put more work in the client especially if there are many simultaneous database users; Two tier (client-server) architecture gives way to three (or even more) tiers DBMS continues to act as a server buts its client is an Application server which manages connections to the database, transactions, authorization and other aspects. Application Servers in turn have clients such as Web servers, which support end-users or other application.
19
Multimedia Data Information that include a signal or move of some sort. ie: video, audio, radar etc. Larger in size then normal data; Select a database for an Account compared to select a picture that look like Forces the DBMS to modify its storage manager Answer to a query us a video clip a gigabyte long……. Will be split into pieces
20
Information Integration
Information becomes more essential so existing information resources are being used in many new ways ie. Online order Legacy database – old collection data Data warehouses – varieties of data Data mining – search for interesting and unusual pattern in data ie. sales
21
END
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.