Perancangan Basis Data Understanding Database Fundamentals Understanding Database
Perancangan Basis Data Understanding Database Fundamentals
Understanding Database Fundamentals • • What Is a Database? Why do we need a database? Who Uses a Database? From Where Does a Database Originate? 9/9/2020 2
What Is a Database? • Database adalah suatu kumpulan data-data yang disusun sedemikian rupa sehingga membentuk informasi yang sangat berguna. • Contoh database : q q 9/9/2020 Personal address books Telephone books Card catalogs at libraries Online bookstores 3
Why do we need a database? • Keep records of our: – Clients – Staff – Volunteers • To keep a record of activities and interventions; • Keep sales records; • Develop reports; • Perform research 9/9/2020 4
Who Uses a database? • Organization • Individuals such as bankers, lawyers, accountants, customer service representatives, and data entry staff. • For example, a banker would use a database to keep track of different individual and business accounts, lines of credit, personal loans, business loans, and so forth 9/9/2020 5
From Where Does a Database Originate? • Business modeling is the process of evaluating and capturing the daily tasks performed by a business, and the origination of any database. • The foremost task in business modeling is taking time to talk to the individuals in the company who make decisions, those who work face to face with the data, and others who perform tasks that might or might not be related to the storage requirements of the database • When designing a database, the designers must understand the business as well as the users of the proposed database 9/9/2020 6
From Where Does a Database Originate? Some basic concepts in business modeling : • Business rules, • Business processes, • Information and data, • Requirement analysis, • Entities, • Attributes, and • Re-engineering 9/9/2020 7
From Where Does a Database Originate? Business rules • From the perspective of designing a database, business rules are important because they tell us how data is created, modified, and deleted within an organization. 9/9/2020 8
From Where Does a Database Originate? Business processes • Business processes deal with the daily activities that take place. • For example, when a customer orders a book from an online bookstore, several business processes are invoked. Some of the business processes involved in this scenario might include 1. An order is received from a customer. 2. The inventory is checked for product availability. 3. The customer’s order is confirmed. 4. The warehouse is contacted. 5. The product and invoice are shipped to the customer. 9/9/2020 9
From Where Does a Database Originate? Requirement Analysis • Requirements analysis is the process of analyzing the needs of a business and gathering system requirements from the end user that will eventually become the building blocks for the new database. • In the analysis phase of a system, a requirements document should be established that outlines the following basic information : q q 9/9/2020 Objectives and goals of the business as it pertains to the proposed system A list of proposed requirements for the system A list of business processes and rules Documentation for current business processes, or documentation from the legacy system 10
From Where Does a Database Originate? Entities • An entity is a business object that represents a group, or category of data. • Another category is authors because an author might have written many books. 9/9/2020 11
From Where Does a Database Originate? Attribute • An attribute is a sub-group of information within an entity. • For example, suppose you have an entity for book titles. Within the book titles’ entity, several attributes are found, such as the actual title of the book, the publisher of the book, the author, the date the book was published. 9/9/2020 12
From Where Does a Database Originate? Business Process Re-engineering • Business process re-engineering (BPR) is the task of reworking business processes in order to streamline the operations of an organization. • BPR may involve redesigning an existing system in order to improve methods for storing and accessing the data in conjunction with the business processes that have been refined. 9/9/2020 13
What Makes a Good Database? • The definition of a good database is relative to the requirements of each customer because every situation is different. • There are many hallmarks of a good database, the most common of which are discussed in the following subsections and consist of • • • Data storage needs having been met Data is readily available to the end-user Data being protected through database security Data being accurate and easy to manage Overall database performance being acceptablez Having a minimized amount of redundant data stored 9/9/2020 14
What Makes a Good Database? Storage Needs Met The foremost objective of a database is to store data. In order to determine if data storage is adequate, the following questions might be of use: • • • Have all storage needs been met for the database? Has all data been stored effectively? Is the database model used capable of handling the complexity of business relationships? Is the database model used capable of handling the estimated volume of data for the proposed database? Is the hardware adequate for storage needs? Does the database software meet the storage needs? What data is stored offline as opposed to online storage? How easy is it to access offline data storage? Has all unnecessary online data been purged or archived into an offline storage device? 9/9/2020 15
What Makes a Good Database? Data Is Available • What good is a database if data is not readily available to the end-user? • Data must be available as requested by the end-user, during all hours of business operation. • Many organizations are referred to as 24 X 7 shops. This means that data must be available twenty-four hours a day, seven days a week, 9/9/2020 16
What Makes a Good Database? Data Is Protected • After the data is stored in the database, it is important to ensure that the data is well protected. • Database security should be established to protect the data from unauthorized users. 9/9/2020 17
What Makes a Good Database? Data Is Accurate • Suppose that storage is sufficient and security is established. Security will stop unauthorized users from entering the database, but what is there to protect the data from users with access? • Mainly, constraints should be used to control the allowed data. 9/9/2020 18
What Makes a Good Database? Acceptable Performance • Performance is a major issue for any database. All parties are worried about performance, from the end user to the database administrator to management. If the customer is not happy, management is not happy. When management is not happy, nobody is happy. • There is often a grand difference between performance as expected by the end user versus realistic performance. • Users often expect instantaneous response time. Usually, an acceptable response time to retrieve a record from the database or to perform a relatively small transaction is somewhere between one and five seconds. 9/9/2020 19
What Makes a Good Database? Redundant Data Is Minimized • One of the main goals when storing data in a database is to reduce or eliminate redundant information. 9/9/2020 20
Perancangan Basis Data Exploration of Database Models
Exploration of Database Models • Types of Database • The Modern Database of Choice • Making Your Selection 9/9/2020 22
Types of Database • • • Flat-file database model Hierarchical database model Network database model Relational database model Object-oriented (OO) database model Object-relational (OR) database model 9/9/2020 23
What Makes a Good Database? Flat-file database model • The use of flat files to store data was predominant in the mainframe era. • A flat-file database consists of one or more readable files, normally stored in a text format. • Contoh : 1234: Ernest Hemingway: For Whom the Bell Tolls 5678: Charles Dickens: Great Expectations 4321: Ernest Hemingway: A Farewell to Arms 8765: Jack London: White Fang 4523: Jack London: Call of the Wild 3456: Mark Twain: Adventures of Huckleberry Finn 9/9/2020 24
What Makes a Good Database? Hierarchical database model • A hierarchical database is a step above that of a flat-file database, mainly because of the ability to establish and maintain relationships between groups of data. The architecture of a hierarchical database is based on the concept of parent/child relationships. • Contoh : 9/9/2020 25
What Makes a Good Database? Network database model • One of the main advantages of the network model is the capability of parent tables to share relationships with child tables. This means that a child table can have multiple parent tables. • Contoh : 9/9/2020 26
What Makes a Good Database? Relational database model • The relational database model is the most popular database model used today. • The primary unit of storage in a database is a table, or group of related data. • A table consists of rows and columns. a row is associated with an individual record in the table, and a column contains values for all rows associated with a particular field. • Tables can be related to one another through common column values, called keys. 9/9/2020 27
What Makes a Good Database? Object-Oriented database model • An object-oriented database is a database in which data can be defined, stored, and accessed using an OO programming approach. 9/9/2020 28
The Modern Database of Choice • For several reasons, the relational database model has proven to be the choice database for most organizations in the modern world. • So why is the relational model so attractive? q RDB standards are well established by organizations such as the International Standards Organization (ISO) and the American National Standards Institute (ANSI). q There are many RDB vendors to choose from, including Oracle, Microsoft, Informix, IBM, and Sybase. q It is easy to define, maintain, and manipulate data with SQL. , etc 9/9/2020 29
The Modern Database of Choice SQL: The Relational Database Language • Structured Query Language, more commonly referred to as SQL, is the standard language used to issue commands to and communicate with a relational database. • With SQL, you can easily enter data into the database, modify data, delete data, and retrieve data. • SQL contains the following three sub-languages that allow you to perform nearly any operation desirable within a relational database: 1. Data Definition Language (DDL) 2. Data Manipulation Language (DML) 3. Data Control Language (DCL) 9/9/2020 30
Making Your Selection Before starting to design a database, two vital questions must first be answered: • What database model will be used? • What database software will be used? 9/9/2020 31
Making Your Selection What database model will be used • The answer to the first question, concerning the database model of selection, is usually the relational database. • Before deciding on a model, you should carefully study the benefits of each model as related to the basic requirements that the business has for a database. 9/9/2020 32
Making Your Selection What database software will be used • Many choices exist when selecting a relational database management system (RDBMS). • Many vendors are competing in the endless battle of providing software that is easier to use, providing the most features, and performing the best. • You might find a major difference between the cost of various software, which might be why it is important to compare the features of the available software on the market with the needs of the company’s proposed database. “What you pay for is what you get” is commonly stated when deciding on many products. • Database software seems to be no different. 9/9/2020 33
Task for Next Week • Choose your favourite database model and database software! • Explain the advantages of the database model and software! 9/9/2020 34
Any Question ? 9/9/2020 35
- Slides: 35