340 likes | 796 Views
Introduction to database system. What is a Database system? Data System Components Data Hardware Software User What is Database Benefits of Database Approach. Database System.
E N D
Introduction to database system What is a Database system? Data System Components Data Hardware Software User What is Database Benefits of Database Approach
Database System • Database system is a computerized record-keeping system. It is a computerize system whose overall purpose is to store information and to allow users to retrieve and update that information on demand. • Information is anything that is significant to the individual or organization concerned.
Data VS Information • Data is used to refer to what is actually stored in the database • Information is used to refer to meaning of that data as understood by some user.
Operations • Adding new file to database • Inserting data into existing files • Retrieving data from existing files • Deleting data from existing files • Changing data in existing files • Removing existing files from the database
Database System Components • Data • Hardware • Software • Users
Data • Database System are available on machines that range from all the way from personal computers to the largest mainframe or clusters of mainframes. • In particular, tend to be multi-user; whereas on small machine tend to be singer user. • Single User system is a system in which at most one user can access the database at any given time. • Multi user system is a system in which many users can access the database at the same time.
The data in database – for large system- will be both integrated and shared. • Integrated • Mean the database can be thought of as a unification of several district files, with anyredundancyamong those files partly or wholly eliminated • Shared • Mean the database can be shared among different users, in the sense that different users can have access to the same data, possible even at the same time (“Concurrent access”).
Hardware The hardware components of the system consist of • The secondary storage volumes used to hold the stored data, together with the associated I/O devices, device controllers, and so forth. • The hardware processors and associated main memory that are used to supported the execution of the database system software
Software • Database Management System (DBMS) Data => physically stored All request for access to the database are handle by the DBMS DBMS is thus shielding of database users from hardware level details Provides users with a perception of the database that is elevated somewhat above the hardware level details. Support user operations
Database Management System • DBMS is a general purpose software system that facilitates the process of definition, construction, manipulating, and sharing databases among various users and applications. • Defining a database involves specifying the data types, structures, and constrains for the data to be stored in the database.
Manipulating a database includes such functions as querying the database to retrieve specific data, updating the database to reflect changes, and generating reports from data. • Sharing a database allows multiple users and programs to access the database concurrently. • Other important functions • Protection both system protection against hardware or software malfunction (crash) and Security protection against unauthorized or malicious access. • DBMS must be able to maintain the database System by allowing the system to evolve as requirements change over time.
User • Application Programmer • Responsible for writing database application programs in some programming language • End User • Access database interactively as just described, A given user can access the database via online application program or user query language
Database Designers • Responsible for identifying the data to be stored in the database and for choosing appropriate structures to represent and store in database. • Undertaken before the database is actually implement. • It is responsibility of database designers to communicate with all database user to understand their requirements, and to come up with a design that meets users’ requirements. • Designer may be one of staff of Database Administrator (DBA) • Interact with each groups of users and develop views the database that meet the data and processing requirements of those groups. • Final database design must be capable of supporting the requirements of all user groups.
Database Administrators: responsible for authorizing access to the database, for coordinating and monitoring its use, and for acquiring software and hardware resource need • Defining the conceptual schema (Logical/conceptual Database Design) • Defining the internal schema (Physical Database design) • Liaising with users, to ensure that data they need is available and to write or help user to write the external schemas, using the applicable external DDL. • Defining security and integrity constraints • Defining dump/restore schemes • Monitoring performance and responding to changing requirement.
DATABASE SYSTEM Users/Programmers Application Programs/Queries DBMS Software Software to Process Quires/Programs Software to Access Stored Data Stored Database Definition (Meta Data) Stored Database
What is a database • By C.J. Date “a Database is a collection of persistent data that is used by the application systems of some given enterprise” • Elmasri & Navatha “Database is a collection of related data. • Data mean facts that can be recorded and that have implicit meaning.” • Database can be any size and varying complexity • Database may be generated and maintained manually or it may be computerized.
Why Database • Compactness: no need for possible voluminous paper file. • Speed: Machine can retrieve and update data faster than human • Less drudgery: maintaining files by hand is eliminated. • Currency: Accurate, up-to-date information is available on demand at any time. • Protection: Data can be better protected against unintentional loss and unlawful
Benefits of Database Approach • The data can shared • Redundancy can be reduced/controlled • Inconsistency can be avoided • Transaction support can be provided • Integrity can be maintained • Security can be enforced • Conflicting requirements can be balanced • Standard can be enforced
Controlling redundancy • Redundancy is storing the same data multiple times leads to several problems. • Duplication effort • Storage waste, when same data stored repeatedly • File that represent same data may became inconsistent. • Database approach, the views of different user groups are integrated during database design. Logical data item in only one-place in database, Ensure redundancy, “controlled redundancy”.
Security • Restricting Unauthorized Access • Multiple user share large database • most users will not be authorized to access all information in the database • Example : KKU Registration all database can see by DBA Students can see/manipulate only some part of their data • Type of operation must be controlled • User/User group are given account number and passwords to access the data base. DBMS provide a security and authorization subsystem, DBA uses them to create account and to specify account restrict.
Example • Fact(factcode, factname) • Dept(faccode, deptcode, deptname) • Student(id, name, address, factcode,factname) • Subject(subjcode, subjname, credit) • Teacher(tcode,tname,taddress,factcode,deptcode,….) • Grade(id,subjcode,year,sem,grade) • Etc.
Integrity Example Create table fact( factcode char(4), factname varchar2(30), primary key(factcode)); Example 2 Create table dept( factcode char(4), deptcode char(4), deptname varchar2(30), primary key(factcode,deptcode), foreign key (factcode) references fact(factcode));
view • Create view studGrd as select id,name,subjcode,name,year,sem,grade from student,grade where stdent.id = grade.id
Summary • Define a database system and database components • Database as a collection of related data, where data means recorded facts. • The benefic of the Database system