1. Trang chủ
  2. » Công Nghệ Thông Tin

Beginning Database Design- P2 ppsx

20 310 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 20
Dung lượng 610,38 KB

Nội dung

Current Head This book contains a glossary, allowing for the rapid look up of terms without having to page through the index and the book to seek explicit definitions. ❑ Part I: Approaching Relational Database Modeling — Part I examines the history of relational database modeling. It describes the practical needs the relational database model fulfilled. Also included are details about dealing with people, extracting information from people and existing systems, problematic scenarios, and business rules. ❑ Chapter 1: Database Modeling Past and Present — This chapter introduces basic concepts behind database modeling, including the evolution of database modeling, different types of databases, and the very beginnings of how to go about building a database model. ❑ Chapter 2: Database Modeling in the Workplace — This chapter describes how to approach the designing and building of a database model. The emphasis is on business rules and objectives, people and how to get information from them, plus handling of awkward and difficult existing database scenarios. ❑ Chapter 3: Database Modeling Building Blocks — This chapter introduces the building blocks of the relational database model by discussing and explaining all the various parts and pieces making up a relational database model. This includes tables, relation- ships between tables, and fields in tables, among other topics. ❑ Part II: Designing Relational Database Models — Part II discusses relational database modeling theory formally, and in detail. Topics covered are normalization, Normal Forms and their appli- cation, denormalization, data warehouse database modeling, and database model performance. ❑ Chapter 4: Understanding Normalization — This chapter examines the details of the nor- malization process. Normalization is the sequence of steps (normal forms) by which a relational database model is both created and improved upon. ❑ Chapter 5: Reading and Writing Data with SQL — This chapter shows how the relational database model is used from an application perspective. A relational database model contains tables. Records in tables are accessed using Structured Query Language (SQL). ❑ Chapter 6: Advanced Relational Database Modeling — This chapter introduces denormal- ization, the object database model, and data warehousing. ❑ Chapter 7: Understanding Data Warehouse Database Modeling — This chapter discusses data warehouse database modeling in detail. ❑ Chapter 8: Building Fast-Performing Database Models — This chapter describes various fac- tors affecting database performance tuning, as applied to different database model types. If performance is not acceptable, your database model does not service the end- users in an acceptable manner. ❑ Part III: A Case Study in Relational Database Modeling — The case study applies all the formal the- ory learned in Part I and Part II—particularly Part II. The case study is demonstrated across four entire chapters, introducing some new concepts as the case study progresses. The case study is a steady, step-by-step learning process, using a consistent example relational database model for an online auction house company. The case study introduces new concepts, such as analysis and design of database models. Analysis and design are non-formal, loosely defined processes, and are not part of relational database modeling theory. xix Introduction 03_574906 flast.qxd 10/28/05 11:42 PM Page xix Current Head ❑ Chapter 9: Planning and Preparation Through Analysis — This chapter analyzes a relational database model for the case study (the online auction house company) from a company operational capacity (what a company does for a living). Analysis is the process of describing what is required of a relational database model — discovering what is the information needed in a database (what all the basic tables are). ❑ Chapter 10: Creating and Refining Tables During the Design Phase — This chapter describes the design of a relational database model for the case study. Where analysis describes what is needed, design describes how it will be done. Where analysis described basic tables in terms of company operations, design defines relationships between tables, by the application of normalization and Normal Form, to analyzed information. ❑ Chapter 11: Filling in the Details with a Detailed Design — This chapter continues the design process for the online auction house company case study — refining fields in tables. Field design refinement includes field content, field formatting, and indexing on fields. ❑ Chapter 12: Business Rules and Field Settings — This chapter is the final of four chapters covering the case study design of the relational database model for the online auction house company. Business rules application to design encompasses stored procedures, as well as specialized and very detailed field formatting and restrictions. ❑ Part IV: Advanced Topics —Part IV contains a single chapter that covers details on advanced database structures (such as materialized views), followed by brief information on hardware resource usage (such as RAID arrays). ❑ Appendices — Appendix A contains exercise answers for all exercises found at the end of many chapters ion this book. Appendix B contains a single Entity Relationship Diagram (ERD) for many of the relational database models included in this book. What You Need to Use This Book This book does not require the use on any particular software tool — either database vendor-specific or front-end application tools. The topic of this book is relational database modeling, meaning the content of the book is not database vendor-specific. It is the intention of this book to provide non-database ven- dor specific subject matter. So if you use a Microsoft Access database, dBase database, Oracle Database, MySQL, Ingres, or any relational database — it doesn’t matter. All of the coding in this book is written intentionally to be non-database specific, vendor independent, and as pseudo code, most likely match- ing American National Standards Institute (ASNI) SQL coding standards. You can attempt to create structures in a database if you want, but the scripts may not necessarily work in any particular database. For example, with Microsoft Access, you don’t need to create scripts to create tables. Microsoft Access uses a Graphical User Interface (GUI), allowing you to click, drag, drop, and type in table and field details. Other databases may force use of scripting to create tables. The primary intention of this book is to teach relational database modeling in a step-by-step process. It is not about giving you example scripts that will work in any relational database. There is no such thing as universally applicable scripting — even with the existence of ANSI SQL standards because none of the relational database vendors stick to ANSI standards. xx Introduction 03_574906 flast.qxd 10/28/05 11:42 PM Page xx Current Head This book is all about showing you how to build the database model — in pictures of Entity Relationship Diagrams (ERDs). All you need to read and use this book are your eyes, concentration, and fingers to turn the pages. Any relational database can be used to create the relational database models in this book. Some adapta- tion of scripts is required if your chosen database engine does not have a GUI table creation tool. Conventions To help you get the most from the text and keep track of what’s happening, a number of conventions are used throughout the book. Examples that you can download and try out for yourself generally appear in a box like this: Example title This section gives a brief overview of the example. Source This section includes the source code. Source code Source code Source code Output This section lists the output: Example output Example output Example output Try It Out Try It Out is an exercise you should work through, following the text in the book. 1. They usually consist of a set of steps. 2. Each step has a number. 3. Follow the steps through one by one. How It Works After each Try It Out, the code you’ve typed is explained in detail. xxi Introduction 03_574906 flast.qxd 10/28/05 11:42 PM Page xxi Current Head Tips, hints, tricks, and asides to the current discussion are offset and placed in italics like this. As for styles in the text: ❑ New terms and important words are italicized when introduced. ❑ Keyboard strokes are shown like this: Ctrl+A. ❑ File names, URLs, and code within the text are shown like so: persistence.properties. ❑ Code is presented in two different ways: In code examples we highlight new and important code with a gray background. The gray highlighting is not used for code that’s less important in the present context, or has been shown before. Syntax Conventions Syntax diagrams in this book use Backus-Naur Form syntax notation conventions. Backus-Naur Form has become the de facto standard for most computer texts. ❑ Angle Brackets: < > — Angle brackets are used to represent names of categories, also known as substitution variable representation. In this example <table> is replaced with a table name: SELECT * FROM <table>; Becomes: SELECT * FROM AUTHOR; ❑ OR: | — A pipe or | character represents an OR conjunction meaning either can be selected. In this case all or some fields can be retrieved, some meaning one or more: SELECT { * | { <field>, } } FROM <table>; ❑ Optional: [ ] — In a SELECT statement a WHERE clause is syntactically optional: SELECT * FROM <table> [ WHERE <field> = ]; ❑ At least One Of: { | | } — For example, the SELECT statement must include one of *, or a list of one or more fields: SELECT { * | { <field>, } } FROM <table>; This is a not precise interpretation of Backus-Naur Form, where curly braces usually represent zero or more. In this book curly braces represent one or more iterations, never zero. Boxes like this one hold important, not-to-be forgotten information that is directly relevant to the surrounding text. xxii Introduction 03_574906 flast.qxd 10/28/05 11:42 PM Page xxii Current Head xxiii Introduction Errata Every effort has been made to ensure that there are no errors in the text or in the code; however, no one is perfect, and mistakes do occur. If you find an error in one of our books, such as a spelling mistake or faulty piece of code, your feedback would be greatly appreciated. By sending in errata you may save another reader hours of frustration and at the same time you will be helping us provide even higher quality information. To find the errata page for this book, go to http://www.wrox.com and locate the title using the Search box or one of the title lists. On the book details page, click the Book Errata link. On this page you can view all errata that has been submitted for this book and posted by Wrox editors. A complete book list including links to each book’s errata is also available at www.wrox.com/misc-pages/booklist.shtml. If you don’t spot “your” error on the Book Errata page, go to www.wrox.com/contact/techsupport .shtml and complete the form there to send the error you have found. The information will be checked and, if appropriate, a message will be posted to the book’s errata page and the problem will be fixed in subsequent editions of the book. p2p.wrox.com For author and peer discussion, join the P2P forums at p2p.wrox.com. The forums are a Web-based sys- tem for you to post messages relating to Wrox books and related technologies and interact with other readers and technology users. The forums offer a subscription feature to e-mail you topics of interest of your choosing when new posts are made to the forums. Wrox authors, editors, other industry experts, and your fellow readers are present on these forums. At http://p2p.wrox.com you will find a number of different forums that will help you not only as you read this book, but also as you develop your own applications. To join the forums, follow these steps: 1. Go to p2p.wrox.com and click the Register link. 2. Read the terms of use and click Agree. 3. Complete the required information to join as well as any optional information you want to pro- vide and click Submit. You will receive an e-mail with information describing how to verify your account and complete the joining process. You can read messages in the forums without joining P2P, but you must join to post your own messages. After you join, you can post new messages and respond to messages other users post. You can read mes- sages at any time on the Web. If you would like to have new messages from a particular forum e-mailed to you, click the Subscribe to this Forum icon by the forum name in the forum listing. For more information about how to use the Wrox P2P, be sure to read the P2P FAQs for answers to ques- tions about how the forum software works as well as many common questions specific to P2P and Wrox books. To read the FAQs, click the FAQ link on any P2P page. 03_574906 flast.qxd 10/28/05 11:42 PM Page xxiii 03_574906 flast.qxd 10/28/05 11:42 PM Page xxiv Beginning Database Design 03_574906 flast.qxd 10/28/05 11:42 PM Page xxv 03_574906 flast.qxd 10/28/05 11:42 PM Page xxvi Part I Approaching Relational Database Modeling In this Part: Chapter 1: Database Modeling Past and Present Chapter 2: Database Modeling in the Workplace Chapter 3: Database Modeling Building Blocks 04_574906 pt01.qxd 10/28/05 11:44 PM Page 1 04_574906 pt01.qxd 10/28/05 11:44 PM Page 2 [...]... the following: ❑ The definition of a database ❑ The definition of a database model ❑ The evolution of database modeling ❑ The hierarchical and network database models ❑ The relational database model ❑ The object and object-relational database models ❑ Database model types ❑ Database design objectives ❑ Database design methods Grasping the Concept of a Database A database is a collection of information... 1-1 shows a general overview of a database A database is often represented graphically by a cylindrical disk, as shown on the left of the diagram The database contains both metadata and raw data The database itself is stored and executed on a database server computer 4 Database Modeling Past and Present Figure 1-1: General overview of a database In Figure 1-1, the database server computer is connected... related information and preferably organized A database consists of the physical files you set up on a computer when installing the database software On the other hand, a database model is more of a concept than a physical object and is used to create the tables in your database This section examines the database, not the database model By definition, a database is a structured object It can be a pile... data is stored in a database and is similar to an architectural approach for how data is stored — a pretty picture commonly known as an entity relationship diagram (a database on paper) A database, on the other hand, is the implementation or creation of a physical database on a computer A database model is used to create a database In this chapter, you also examine the evolution of database modeling... data in a database Different types of applications use a database in different ways — this can affect how a database model should be designed Before you set off to figure out a design strategy, you must have a general idea of the kind of applications your database will serve Different types of database models underpin different types of applications You must understand where different types of database. .. Evolution of Database Modeling The various data models that came before the relational database model (such as the hierarchical database model and the network database model) were partial solutions to the never-ending problem of how to store data and how to do it efficiently The relational database model is currently the best solution for both storage and retrieval of data Examining the relational database. .. critical problems the relational database model is used to solve; therefore, it is essential that you understand how the different data models evolved into the relational database model as it is today 6 Database Modeling Past and Present The evolution of database modeling occurred when each database model improved upon the previous one The initial solution was no virtually database model at all: the file... know how Figure 1-7: The relational database model — a picture of the data 10 BUDGET 35,000 50,000 25,000,000 250,000 Database Modeling Past and Present Relational Database Management System A relational database management system (RDBMS) is a term used to describe an entire suite of programs for both managing a relational database and communicating with that relational database engine Sometimes Software... relational database vendors proceeded as follows Development from one database to another usually resided in different companies, and was characterized by movement of personnel rather than of database source code In other words, the people invented the different databases (not the companies), and people moved between different companies Additionally, numerous object databases have been developed Object databases... object databases have their roots in relational technology, once again in terms of the movement of personnel skills 11 Chapter 1 Dr Codd: Normal Forms DBase Access Foxpro System R Many small scale relational databases Berkeley: Ingres SQL Informix Ingres DB2 Postgres Oracle Object Databases Sybase SQL Server ObjectRelational Databases Figure 1-8: The history of the relational database model Object Database . of a database model ❑ The evolution of database modeling ❑ The hierarchical and network database models ❑ The relational database model ❑ The object and object-relational database models ❑ Database. a physical database on a computer. A database model is used to create a database. In this chapter, you also examine the evolution of database modeling. As a natural progression of improvements in database. Microsoft Access database, dBase database, Oracle Database, MySQL, Ingres, or any relational database — it doesn’t matter. All of the coding in this book is written intentionally to be non -database specific,

Ngày đăng: 03/07/2014, 01:20

TỪ KHÓA LIÊN QUAN