280 likes | 490 Views
NPIC. Subject: Database System. Lecturer: Mr. Kay Heng, MScIT Tel: 012 827-429 E-mail: kayheng.npic@gmail.com. Bachelor of Science in Information Technology. Objectives.
E N D
NPIC Subject: Database System Lecturer: Mr. Kay Heng, MScIT Tel: 012 827-429 E-mail: kayheng.npic@gmail.com Bachelor of Science in Information Technology
Objectives After finished this course students able to design to manage large bodies of information. Management of data involves both designing structure for storage of information and providing mechanisms for the manipulation of information. Data Management • Build an Entity-Relationship model for a relational DBMS • Implement the database in MS Access/SQL Server • Normalize tables • Produce SQL coding to manage data Application Development • Plan and design an application system • Implement an application in MS Access
Class References • Fundamental of Database systems, Elmasri & Navatthe
Chapter 1: Introduction Databases and Database users Database System
Outline • Basic Definitions • Typical DBMS Functionality • Example of a Database (UNIVERSITY) • Advantages of Using the Database Approach • Database Users
Basic Definitions- Data VS Information Figure 1.1 Input-process-output DATA: Facts concerning people, objects, vents or other entities. Databases store data. INFORMATION: Data presented in a form suitable for interpretation. Data is converted into information by programs and queries.
Shopping in supermarket Why every employees in company need information?
Basic Definitions – Database VS DBMS DATABASE: A collection of information or data in large organization such as corporations, universities, hospitals, and bank. DATABASE MANAGEMENT SYSTEM (DBMS) : A software system that enables users to define, create, and maintain the database and that provides controlled access to this database.
Basic Definitions – Database System • DATABASE SYSTEM: Database System =DBMS+Database The DBMS software together with the data itself. Sometimes, the applications are also included. Oracle, SQL Server,DB2, MySQL, Infomix,…
Basic Definitions – Metadata • Metadata “Data about data” • Description of fields Display and format instructions Structure of files and tables Security and access rules Triggers and operational rules Example of Metadata
Basic Definitions –Sample of Metadata Sample of Metadata
Simplified database system environment A simplified database system environment
Database application program • A software program that interacts with the database by issuing an appropriate request (typically an SQL statement) to the DBMS.
Database Overview- Why Use a DBMS? • Using a DBMS to manage data has many advantages: • Data independence • Sharing of data among multiple applications • Data integrity and security • Concurrent access and crash recovery • Data administration • Reduced application development time
Database Users-1 • Users may be divided into • Those who actually use and control the database content, and those who design, develop and maintain database applications (called “Actors on the Scene”), and • Those who design and develop the DBMS software and related tools, and the computer systems operators (called “Workers Behind the Scene”).
Database Users-2 • Actors on the scene • Database administrators: • Responsible for authorizing access to the database, for coordinating and monitoring its use, acquiring software and hardware resources, controlling its use and monitoring efficiency of operations. • Database Designers: • Responsible to define the content, the structure, the constraints, and functions or transactions against the database. They must communicate with the end-users and understand their needs.
Database Users-3 • Application programmer/Application Developer They access the data from programs written in high-level language such as Visual basic or C++,C#, Java. The application programmers design systems such as payroll, Inventory, and billing. • End user They use the data for queries, reports and some of them update the database content.
Exercise 1.1 Indicate which type of user would perform the following functions for a payroll system in a large company: • Write an application program to generate and print the checks. • Change the address in the database for an employee who has moved. • Create a new user account for a newly hired payroll clerk
RDBMS User tables Data dictionary • Relational Database Management System (RDBMS) • Relational Database is a collection of relations (table) Oracle, SQL Server, DB2, My SQL,…
199011913 19959999 19860001 19911123 19901913 19959999 Sample of Relational Database Index Index column [EMPLOYEE table] [DEPARTMENT table] Hire_Year Serial_ No Emp_Name Salary Dept_No 1990 1913 Pich Oudam 180000 5648 Row Prum Chan Dara Keo Rithy . . . 0042 7699 . . . 200000 190000 . . . 4327 2271 . . . 1987 1992 . . . Field
Database Architecture • Single tier Architecture • Two-tier Architecture • Three-tier Architecture
Single tier a. Single tier: All on one machine Access by terminals DBMS Software Database
Client/Server (Two tier ) Application #1 Application #2 Application #3 Database containing centralized shared data Front-End/Client b. Two-Tier: Server with many clients DBMS Server Software DBMS manages data resources like an operating system manages hardware resources
Three-tier architecture Application #3 Applicatio4 #3 Application #1 Application #2 DBMS II Server Software DBMS I Server Software Database Database Front-End/Client Front-End/Client Middleware c. Three-tier: Two kings of DBMS Connected by Middleware
Three-tier architecture • Also call Distributed Systems • Solutions are distributed between client PC’s and one or more servers.
Exercise 1.2 Specify whether each system would be single-tiered, two-tiered, or three-tiered. a. The Happy Nights motel chain allows local managers to purchase a franchise. They can install and use the DBMS of their choice for their reservation system. The only requirement is that they be able to connect and communicate with the central office’s system. b. The Sticky Wicket Company has home offices in Detroit and branches in Chicago and Baltimore. The inventory and parts database is distributed with each branch keeping its own inventory. One central DBMS located in Detroit allows instant ordering of supplies through the central office.