Chapter 8 Database Design and Construction a Database Is the Place Where Permanent Data Are Stored for Software Products

Total Page:16

File Type:pdf, Size:1020Kb

Chapter 8 Database Design and Construction a Database Is the Place Where Permanent Data Are Stored for Software Products Chapter 8 Database Design and Construction A database is the place where permanent data are stored for software products. This chapter presents details on databases. In Chapter 8, we will learn • What a database is • What a relational database is • What the elements of a database are • How to make database design • What an entity-relationship diagram is • How to create database table relationships • How to ensure the integrity of a database Databases are designed to hold a huge amount of data in a manner that these data can easily be accessed and modified when required. The data in a database are permanent in nature unless you delete them: they won’t be lost when the power is off or when a software application crashes. They won’t be lost if you lose the connection to your website. The data you store in a database must conform to some requirements so that they are usable. Some important characteristics of a database include the following: • Data integrity • Data consistency • Data query • Data manipulation Databases are very important for most industries that run their businesses using software products. These industries perform their everyday business transactions such as sales orders and purchase orders by storing the information about these transactions in their databases. If any of the transaction data are lost or get corrupted, then these businesses face problems. Therefore, databases are extremely important for these industries. Databases are also used to store data about many other things. Today, social media has become very popular. People use social media to make friends as well as to do business. Storing the personal or business data of the users and keeping them secure and safe are important for the owners of these social media sites. Databases are integral part of any software product. Most software products need to create and keep permanent data. This permanent data is created and kept in databases. Databases are extremely important for many types of software products. The power of search engines like Google come from their sophisticated and huge databases. Most commercial and enterprise software products (ERPs, SAS, Accounting etc.) depend on their databases for all business transactions and reports. Even social media software products like Facebook, Twitter etc. have databases as their backbone. There are 2 parts of any database: the database engine and the stored data. The database engine itself is a software product. Many software companies build database engines. Oracle database engine is created by Oracle Corporation, MS SQL Server is created by Microsoft Corporation etc. Software companies who build software products use one of the database engines to create and store data which is used by their software products. 64 | Page @Foundation of Software Engineering, A. Ahmed and B. Prasad, CRC Press – Taylor & Francis, 2016 Databases and Software Engineering Methodologies In the Waterfall methodology, the size of the software project teams tends to be large. Thus, database design and construction require software engineers who have specialized skills in those activities. Such software engineers will be solely working on designing and creating the databases. In agile methodologies, there are no separate team members who will exclusively take the database design and construction assignments. Database design and creation are mostly done by the same team members who are also involved in software design and programming activities. This is the norm except for very large agile projects. Database Types In general discussions, when people use the term databases, they mean both the database engine and the database schemas. However, there is a difference between these two. The database engine can be thought of as a superstructure. In the database engine, you can create many schemas. The database engine is also used for querying and accessing the data in the database schema. The database schema is the data structure (e.g., database tables in the case of relational databases, which are explained later) and the data that reside in that data structure. Here, when we use the term database types, we are actually talking about the database engine. From the very beginning of the software industry, companies and researchers have tried to create databases that can be used in building commercial and scientific software products. Because of these efforts, many types of databases exist. Some database types include file server based, relational, object oriented, object relational, and NoSQL. Of all these types of databases, relational databases have been the most commonly used. Some of the most popular relational databases include Oracle, Microsoft’s SQL Server, and MySQL. Relational databases can hold very large amounts of data (trillions of gigabytes in size). NoSQL databases There are many types of databases. Most databases fall under the category of either NoSQL databases or relational databases. Web-based software products have an architecture in which the database sits too far away from the users’ browsers. If the users want to validate their input using traditional databases, then the responsiveness of the web-based software products becomes a concern. There was a need for a better way to do it. This need was addressed when XML was invented. XML is a file that can be stored on an operating system and can be queried quickly. This file is generally stored at the web server and can be easily accessed by the user interface (web browser). This provides a quick response if any queries arising from the web browser need to be validated. XML can help in validating the user data quickly without accessing a traditional database that is located at the back end. NoSQL databases are based on this assumption. NoSQL databases are essentially a file system. They are not relational in nature. You cannot make a relationship between two NoSQL files. This is their limitation. In contrast, relational databases allow a relationship between two or more database tables, as explained in the latter sections of this chapter. NoSQL databases are essentially a file containing data. The data in these NoSQL databases is kept in a structured format. For example, we can store data in an XML file. The advantage of NoSQL databases is that they can be stored alongside other kinds of files. For example, an XML file can be kept on a web server alongside the HTML files. Reading and writing from these XML files is fast as compared to a relational database as they reside near the files which need data from these files. For web-based software products, use of XML files thus can be used to write client side scripts and perform user validations. The disadvantages of NoSQL databases is that it is difficult to enforce integrity rules to keep atomic and non- repeating data. When a data file becomes too large then reading or writing in data files becomes very slow. 65 | Page @Foundation of Software Engineering, A. Ahmed and B. Prasad, CRC Press – Taylor & Francis, 2016 Relational databases Relational databases keep their data in tables. Each table contains many columns. Each column represents a field and each row represents a record. Relational database technology is the most mature among all the database technologies available today. That is why most businesses and government agencies use relational databases to keep their data safely. Relational databases are the most often type of databases used with software products. Relational databases are powerful and can grow to contain extremely large size of data. The main idea behind relational databases is that data can be kept in different tables. Later a relation can be set among all these tables so that it is possible to create data and keep this data in different tables. Whenever required to view or modify data, a search through all the connected tables is possible. The ability to separate data in tables and yet be able to connect all this data through a relation between tables is something which makes relational databases powerful. Database languages To search a database, to manipulate a database, to create a database, or to manipulate the data in a database, you need to communicate with the database. This communication is done using database languages. The database language is divided into two parts: The part of language which deals with database entities creation and management is known as Data Definition Language (DDL). The part of language which deals with data creation and management is known as Data Manipulation Language (DML). Together, these languages are known as Structured Query Language (SQL). Both DDL and DML use SQL. Database entities include database schemas, database tables, sequences, indexes, primary keys, foreign keys, stored procedures, triggers etc. We will discuss about relational databases, entities and how they work throughout this chapter. Database entities: database schema A database consists of many entities. There is a top-level entity known as schema under which all other database entities are defined. You need to use DDL to define a new database entity. You can also delete a database entity, but you cannot update a database entity once it is defined. Schema. Schema is the topmost-level entity in a database. Schema is a blueprint that describes how the data will be stored and what structures will be available for the storage of data inside the database. A schema is divided into database tables and other database entities such as stored procedures, sequences, primary keys, and secondary keys. Tables. Tables are the second top-level entity inside a database after the schema. A table may contain many columns. Each column keeps the data at the most atomic level. For example, you can keep the data about the branch names of a bank in one column of a table. A table contains data related to a task or a function.
Recommended publications
  • Form Follows Function Model-Driven Engineering for Clinical Trials
    Form Follows Function Model-Driven Engineering for Clinical Trials Jim Davies1, Jeremy Gibbons1, Radu Calinescu2, Charles Crichton1, Steve Harris1, and Andrew Tsui1 1 Department of Computer Science, University of Oxford Wolfson Building, Parks Road, Oxford OX1 3QD, UK http://www.cs.ox.ac.uk/firstname.lastname/ 2 Computer Science Research Group, Aston University Aston Triangle, Birmingham B4 7ET, UK http://www-users.aston.ac.uk/~calinerc/ Abstract. We argue that, for certain constrained domains, elaborate model transformation technologies|implemented from scratch in general- purpose programming languages|are unnecessary for model-driven en- gineering; instead, lightweight configuration of commercial off-the-shelf productivity tools suffices. In particular, in the CancerGrid project, we have been developing model-driven techniques for the generation of soft- ware tools to support clinical trials. A domain metamodel captures the community's best practice in trial design. A scientist authors a trial pro- tocol, modelling their trial by instantiating the metamodel; customized software artifacts to support trial execution are generated automati- cally from the scientist's model. The metamodel is expressed as an XML Schema, in such a way that it can be instantiated by completing a form to generate a conformant XML document. The same process works at a second level for trial execution: among the artifacts generated from the protocol are models of the data to be collected, and the clinician conduct- ing the trial instantiates such models in reporting observations|again by completing a form to create a conformant XML document, represent- ing the data gathered during that observation. Simple standard form management tools are all that is needed.
    [Show full text]
  • Jsfa [email protected]
    John Sergio Fisher & Associates Inc. 5567 Reseda Blvd. Suite 209 Los Angeles, CA 91356 818.344.3045 Fax 818.344.0338 jsfa [email protected] July 18, 2019 Peter Tauscher, Senior Civil Engineer City of Newport Beach – Public Works Department Newport Beach Library Lecture Hall Building Project 100 Civic Center Drive Newport Beach, CA 92660 Dear Mr. Tauscher, John Sergio Fisher & Associates, Inc. (JSFA) is most honored to submit a proposal for the Newport Beach Library Lecture Hall Building Project. We are architects, planners/ urban designers, interior designers, theatre consultants and acoustical consultants with offices in Los Angeles and San Francisco. We’ve been in business 42 years involved primarily with cultural facilities for educational and civic institutions with a great majority of that work being for performance facilities. We are experts in seating arrangements whether they be for lecture halls, theatres/ concert halls or recital halls. We have won many design awards including 48 AIA design excellence awards and our work has been published regionally, nationally and abroad. We use a participatory programming and design process involving the city and the stakeholders. We pride ourselves in delivering award- winning, green building designs on time and on budget. Our current staff is 18 and our principals are involved with every project. Thank you for inviting us and for your consideration. Sincerely, John Sergio Fisher & Associates, Inc. John Fisher, AIA President 818.344.3045 Fax: 818.344.0338 Architecture Planning/Urban Design Interiors Arts/Entertainment Facilities Theatre Consulting Acoustical Consulting Los Angeles San Francisco jsfa Table of Contents Tab 1 1.
    [Show full text]
  • XXI. Database Design
    Information Systems Analysis and Design CSC340 XXI. Database Design Databases and DBMS Data Models, Hierarchical, Network, Relational Database Design Restructuring an ER schema Performance analysis Analysis of Redundancies, Removing generalizations Translation into a Relational Schema The Training Company Example Normal Forms and Normalization of Relational Schemata © 2002 John Mylopoulos Database Design -- 1 Information Systems Analysis and Design CSC340 Databases n A database is a collection of persistent data shared by a number of applications n Databases have been founded on the concept of data independence: Applications should not have to know the organization of the data or the access strategy employed Need query processing facility, which generates automatically an access plan, given a query n Databases also founded on the concept of data sharing: Applications should be able to work on the same data concurrently, without knowing of each others’ existence. Þ Database procedures defined in terms of atomic operations called transactions © 2002 John Mylopoulos Database Design -- 2 1 Information Systems Analysis and Design CSC340 Conventional Files vs Databases Databases Advantages -- Good for data integration; allow for more flexible Files formats (not just records) Advantages -- many already exist; good for simple applications; very Disadvantages -- high cost; efficient drawbacks in a centralized facility Disadvantages -- data duplication; hard to evolve; hard to build for complex applications The future is with databases! © 2002 John
    [Show full text]
  • Database Performance Study
    Database Performance Study By Francois Charvet Ashish Pande Please do not copy, reproduce or distribute without the explicit consent of the authors. Table of Contents Part A: Findings and Conclusions…………p3 Scope and Methodology……………………………….p4 Database Performance - Background………………….p4 Factors…………………………………………………p5 Performance Monitoring………………………………p6 Solving Performance Issues…………………...............p7 Organizational aspects……………………...................p11 Training………………………………………………..p14 Type of database environments and normalizations…..p14 Part B: Interview Summaries………………p20 Appendices…………………………………...p44 Database Performance Study 2 Part A Findings and Conclusions Database Performance Study 3 Scope and Methodology The authors were contacted by a faculty member to conduct a research project for the IS Board at UMSL. While the original proposal would be to assist in SQL optimization and tuning at Company A1, the scope of such project would be very time-consuming and require specific expertise within the research team. The scope of the current project was therefore revised, and the new project would consist in determining the current standards and practices in the field of SQL and database optimization in a number of companies represented on the board. Conclusions would be based on a series of interviews with Database Administrators (DBA’s) from the different companies, and on current literature about the topic. The first meeting took place 6th February 2003, and interviews were held mainly throughout the spring Semester 2003. Results would be presented in a final paper, and a presentation would also be held at the end of the project. Individual summaries of the interviews conducted with the DBA’s are included in Part B. A representative set of questions used during the interviews is also included.
    [Show full text]
  • Data Quality Requirements Analysis and Modeling December 1992 TDQM-92-03 Richard Y
    Published in the Ninth International Conference of Data Engineering Vienna, Austria, April 1993 Data Quality Requirements Analysis and Modeling December 1992 TDQM-92-03 Richard Y. Wang Henry B. Kon Stuart E. Madnick Total Data Quality Management (TDQM) Research Program Room E53-320 Sloan School of Management Massachusetts Institute of Technology Cambridge, MA 02139 USA 617-253-2656 Fax: 617-253-3321 Acknowledgments: Work reported herein has been supported, in part, by MITís Total Data Quality Management (TDQM) Research Program, MITís International Financial Services Research Center (IFSRC), Fujitsu Personal Systems, Inc. and Bull-HN. The authors wish to thank Gretchen Fisher for helping prepare this manuscript. To Appear in the Ninth International Conference on Data Engineering Vienna, Austria April 1993 Data Quality Requirements Analysis and Modeling Richard Y. Wang Henry B. Kon Stuart E. Madnick Sloan School of Management Massachusetts Institute of Technology Cambridge, Mass 02139 [email protected] ABSTRACT Data engineering is the modeling and structuring of data in its design, development and use. An ultimate goal of data engineering is to put quality data in the hands of users. Specifying and ensuring the quality of data, however, is an area in data engineering that has received little attention. In this paper we: (1) establish a set of premises, terms, and definitions for data quality management, and (2) develop a step-by-step methodology for defining and documenting data quality parameters important to users. These quality parameters are used to determine quality indicators, to be tagged to data items, about the data manufacturing process such as data source, creation time, and collection method.
    [Show full text]
  • Chapter 9 – Designing the Database
    Systems Analysis and Design in a Changing World, seventh edition 9-1 Chapter 9 – Designing the Database Table of Contents Chapter Overview Learning Objectives Notes on Opening Case and EOC Cases Instructor's Notes (for each section) ◦ Key Terms ◦ Lecture notes ◦ Quick quizzes Classroom Activities Troubleshooting Tips Discussion Questions Chapter Overview Database management systems provide designers, programmers, and end users with sophisticated capabilities to store, retrieve, and manage data. Sharing and managing the vast amounts of data needed by a modern organization would not be possible without a database management system. In Chapter 4, students learned to construct conceptual data models and to develop entity-relationship diagrams (ERDs) for traditional analysis and domain model class diagrams for object-oriented (OO) analysis. To implement an information system, developers must transform a conceptual data model into a more detailed database model and implement that model in a database management system. In the first sections of this chapter students learn about relational database management systems, and how to convert a data model into a relational database schema. The database sections conclude with a discussion of database architectural issues such as single server databases versus distributed databases which are deployed across multiple servers and multiple sites. Many system interfaces are electronic transmissions or paper outputs to external agents. Therefore, system developers need to design and implement integrity controls and security controls to protect the system and its data. This chapter discusses techniques to provide the integrity controls to reduce errors, fraud, and misuse of system components. The last section of the chapter discusses security controls and explains the basic concepts of data protection, digital certificates, and secure transactions.
    [Show full text]
  • Database-Design-1375466250.Pdf
    Database Design Database Design Adrienne Watt Port Moody Except for third party materials and otherwise stated, content on this site is made available under a Creative Commons Attribution 2.5 Canada License. This book was produced using PressBooks.com, and PDF rendering was done by PrinceXML. Contents Preface v 1. Chapter 1 Before the Advent of Database Systems 1 2. Chapter 2 Fundamental Concepts 4 3. Chapter 3 Characteristics and Benefits of a Database 7 4. Chapter 4 Types of Database Models 10 5. Chapter 5 Data Modelling 13 6. Chapter 6 Classification of Database Systems 18 7. Chapter 7 The Relational Data Model 21 8. Chapter 8 Entity Relationship Model 26 9. Chapter 9 Integrity Rules and Constraints 37 10. Chapter 10 ER Modelling 44 11. Chapter 11 Functional Dependencies 49 12. Chapter 12 Normalization 53 13. Chapter 13 Database Development Process 59 14. Chapter 14 Database Users 67 Appendix A University Registration Data Model example 69 Appendix B ERD Exercises 74 References and Permissions 77 About the Author 79 iv Preface v vi Database Design The primary purpose of this text is to provide an open source textbook that covers most Introductory Data- base courses. The material in the textbook was obtained from a variety of sources. All the sources are found in the reference section at the end of the book. I expect, with time, the book will grow with more information and more examples. I welcome any feedback that would improve the book. If you would like to add a section to the book, please let me know.
    [Show full text]
  • Designing High-Performance Data Structures for the Couchbase Data Platform
    Designing High-Performance Data Structures for the Couchbase Data Platform The NoSQL Data Modeling Imperative Danny Sandwell, Product Marketing, erwin, Inc. Leigh Weston, Product Management, erwin, Inc. Learn More at erwin.com When Not DBMS products based on rigid schema requirements impede our ability to fully realize business opportunities that can expand the depth and breadth of relevant data streams “If” NoSQL for conversion into actionable information. New, business-transforming use cases often involve variable data feeds, real-time or near-time processing and analytics requirements, We’ve heard the and the scale to process large volumes of data. NoSQL databases, such as the Couchbase business case Data Platform, are purpose-built to handle the variety, velocity and volume of these new data use cases. Schema-less or dynamic schema capabilities, combined with increased and accepted processing speed and built-in scalability, make NoSQL, and Couchbase in particular, the the modern ideal platform. technology Now the hard part. Once we’ve agreed to make the move to NoSQL, the next step is justifications to identify the architectural and technological implications facing the folks tasked with for adopting building and maintaining these new mission-critical data sources and the applications they feed. As the data modeling industry leader, erwin has identified a critical success factor for NoSQL database the majority of organizations adopting a NoSQL platform like Couchbase. management Successfully leveraging this solution requires a significant paradigm shift in how we design system (DBMS) NoSQL data structures and deploy the databases that manage them. But as with most solutions to technology requirements, we need to shield the business from the complexity and risk support data- associated with this new approach.
    [Show full text]
  • Database Design Document
    SunGuideSM: Database Design Document SunGuide-DBDD-1.0.0-Preliminary Prepared for: Florida Department of Transportation ITS Office 605 Suwannee Street, M.S. 90 Tallahassee, Florida 32399-0450 (850) 410-5600 February 19, 2004 Database Detailed Design Document Control Panel File Name: SunGuide-DBDD-1.0.0-Preliminary File Location: SunGuide CM Repository CDRL: 2-3.1 Name Initial Date Created By: Tammy Duncan, SwRI TD 12/05/03 James Halbert, SwRI JH 12/05/03 Reviewed By: Robert Heller, SwRI RWH 2/18/04 Steve Dellenback, SwRI SWD 2/19/04 Steve Novosad, SwRI SEN 2/05/04 Susan Crumrine, SwRI SBC 2/19/04 Modified By: Completed By: SunGuide-DBDD-1.0.0-Preliminary i Database Detailed Design Table of Contents 1. Scope..................................................................................................1 1.1 Document Identification............................................................................ 1 1.2 Project Overview ....................................................................................... 1 1.3 Related Documents ................................................................................... 2 1.4 Contacts ..................................................................................................... 2 2. Conceptual Model..............................................................................4 2.1 System Context ......................................................................................... 4 2.2 Purpose of Database................................................................................
    [Show full text]
  • A Knowledge-Based System for Physical Database Design
    AlllDE 7mfi2D NATL INST OF STANDARDS & TECH R.I.C. r Computer Science A1 11 02764820 abrowskl, Chrlstoph/A knowledge-based s QC100 .U57 NO.500-151 1988 V19 C.I NBS-P and Technology PUBLICATIONS NBS Special Publication 500-151 A Knowledge-Based System for Physical Database Design Christopher E. Dabrowski and David K. Jefferson #500-151 1988 C.2 Tm he National Bureau of Standards' was established by an act of Congress on March 3, 1901. The Bureau's overall is to strengthen and advance the nation's science and technology and facilitate their effective application for public benefit. To this end, the Bureau conducts research to assure international competitiveness and leadership of U.S. industry, science arid technology. NBS work involves development and transfer of measurements, standards and related science and technology, in support of continually improving U.S. productivity, product quality and reliability, innovation and underlying science and engineering. The Bureau's teclmical work is performed by the National Measurement Laboratory, the National Engineering Laboratory, the Institute for Computer Sciences and Technology, and the Institute for Materials Science and Engineering. The National Measurement Laboratory Provides the national system of physical and chemical measurement; • Basic Standards^ coordinates the system with measurement systems of other nations and • Radiation Research furnishes essential services leading to accurate and uniform physical and • Chemical Physics chemical measurement throughout the Nation's scientific community, • Analytical Chemistry industry, and commerce; provides advisory and research services to other Government agencies; conducts physical and chemical research; develops, produces, and distributes Standard Reference Materials; provides calibration services; and manages the National Standard Reference Data System.
    [Show full text]
  • Development of Concept Plan for the Route 1 North Area
    September 29, 2016 | RFP Town of Falmouth Development of Concept Plan for the Route 1 North Area www.vhb.com September 29, 2016 Nathan Poore Town Manager Town of Falmouth 271 Falmouth Road Falmouth, Maine 04105 Re: Development of Concept Plan for the Route 1 North Area Dear Mr. Poore: The Town of Falmouth has embarked on an important initiative aimed at exploring opportunities to enhance its local economy and increase revenues through a variety of planning and policy efforts focused on the Route 1 North corridor. The Town of Falmouth 2013 Comprehensive Plan designated the Route 1 corridor as a Desginated Growth Area, and the Town is seeking a qualified team to help develop a Concept Plan for the Route 1 North Area that not only describes a future vision for the corridor, but also describes how best to direct Town resources to support that vision. To undertake this effort, the Town needs a multidisciplinary team with a depth of experience in zoning, land use planning, market analysis, economic development, transportation, site/civil engineering and civic en- gagement. VHB is ready to help you through this process by facilitating creative, sustainable, and implementable solutions, and turning the Town’s vision into reality. VHB is a multidisciplinary firm with 23 offices along the east coast, including an office in South Portland. We pro- vide planning, engineering, transportation, landscape architecture, and environmental services. Over the past 35 years, we have had the privilege of working with communities throughout New England on comprehensive plans, zoning, and economic development studies. To guide this process, we will leverage lessons learned on land use planning, visioning, strategic planning, market analysis, and environmental and infrastructure assessments for municipalities throughout the region.
    [Show full text]
  • Applying Tssl in Database Schema Modeling: Visualizing the Syntax of Gradual Transitions
    Journal of Technology and Science Education JOTSE, 2018 – 8(4): 238-253 – Online ISSN: 2013-6374 – Print ISSN: 2014-5349 https://doi.org/10.3926/jotse.365 APPLYING TSSL IN DATABASE SCHEMA MODELING: VISUALIZING THE SYNTAX OF GRADUAL TRANSITIONS Adi Katz Sami Shamoon College of Engineering (SCE) (Israel) [email protected] Received December 2017 Accepted February 2018 Abstract Since database conceptual modeling is a complex cognitive activity, finding an appropriate pedagogy to deliver the topic to novice database designers is a challenge for Information Systems (IS) educators. The four-level TSSL model that is known in the area of human-computer interactions (HCI) is used to explain and demonstrate how instructional design can minimize extraneous cognitive load in the conceptual modeling task of designing a database schema. The instructional design approach puts focus on the syntactic level of TSSL, to explain how visualizing gradual transitions between hierarchic levels of the schema is effective in database modeling. The current work demonstrates the approach, and at the next phase we plan to experimentally test the effectiveness of the approach by comparing performance and attitudes of students who are exposed to emphasizing the syntax of the gradual transitions in schema structure to those who are not exposed to it. Keywords – Conceptual modeling, Database schema, TSSL, Pedagogy, Visualization. ---------- 1. Introduction This is a pedagogic research that offers an approach for effectively delivering and instructing the activity of relational database schema modeling to novice database designers. Modeling users’ requirements is a very important task in information system analysis and design, to ensure that the intended system would meet organizational goals (Dahan, Shoval & Sturm, 2014).
    [Show full text]