Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Database Development CH2. CH2. Introduction to DB Development Database n Components of Database Systems (Figure 2-1) –User data –Metadata.

Similar presentations


Presentation on theme: "Introduction to Database Development CH2. CH2. Introduction to DB Development Database n Components of Database Systems (Figure 2-1) –User data –Metadata."— Presentation transcript:

1 Introduction to Database Development CH2

2 CH2. Introduction to DB Development Database n Components of Database Systems (Figure 2-1) –User data –Metadata –Index –Application Metadata

3 CH2. Introduction to DB Development

4 1. User Data n User data is represented in relation n Relation: Table containing data n Columns: field or attribute –Rows: record for particular entities –Normalization Problem R1(StudentName, StudentPhone, AdviserName, AdviserPhone) : Problem Therefore, separate R1 into R2 and R3 R2(StudentName, StudentPhone, AdviserName) R3(AdviserName, AdviserPhone) R1 R2 R3

5 CH2. Introduction to DB Development

6 2. Metadata n Description of DB structure (System table) n Efficient for DBMS, convenient for users –user can use the same query tools for metadata as they do for user data n Ex. (Figure 2-2) –SysTables Table(Table Name, Number of Columns, Primary Key) –SysColumns Table(Column Name, Table Name, DataType, Length)

7 CH2. Introduction to DB Development

8 3. Index n Overhead data n Improves the performance and accessibility of DB n Helpful for sorting and searching, but at a cost n Ex.(Figure2-3): LastName Index, Major Index 4. Application Metadata n Used to store the structure and format of user forms, reports, queries, and other application components

9 CH2. Introduction to DB Development

10 DBMS n 3 sub-systems –The Design Tools Subsystem includes tools for creating tables, forms, queries, and reports DBMS products provide programming languages and interfaces to programming languages –Run-Time Subsystem processes the application components that are developed using the design tools Ex.: Access 2000 has a run-time facility that materialize forms and connects form elements with table data

11 CH2. Introduction to DB Development DBMS n 3 sub-systems –DBMS Engine Intermediary between the design tools and run-time subsystems and the data Involved with transaction management, locking, and backup and recovery

12 CH2. Introduction to DB Development Creating the DB n DB Schema : defines a DB’s structure, its tables, relationships, domains, and business rules n An Example of a Schema: Highline College –Table CAPTAIN(CAPTAIN_ID, CaptainName, Phone, Street, City, State, Zip) ITEM(ITEM_ID, Quantity, Description, Date-Out, Date-In) –Relationship CAPTAIN (CAPTAIN_ID, CaptainName, Phone, Street, City, State, Zip) ITEM(ITEM_ID, Quantity, Description, Date-Out, Date-In, CAPTAIN_ID)

13 CH2. Introduction to DB Development –Domain: set of values that a column may have ITEM_ID, Quantity & CAPTAIN_ID → Integer, Description → Text, Data-Out & Date-In → Date –Business Rule: restrictions on the business’s activities that need to be reflected in the database and database applications Ex.: No captain may have more than seven soccer balls checked out at any one time n Creating Tables: after the schema has been designed, tables are created using the DBMS table creation tools –ITEM Table (Figure 2-4, pp.33)

14 CH2. Introduction to DB Development

15 n Defining Relationships: Foreign Key is used –CAPTAIN Table & ITEM Table(Figure 2-5, pp. 33) –Foreign Key: CAPTAIN_ID in ITEM table

16 CH2. Introduction to DB Development n Forms n Queries n Reports n Menus n Application Programs Components of Applications

17 CH2. Introduction to DB Development n Forms –Ex.: presentations of CAPTAIN and ITEM data (Figure 2-6) –Ex.: Creating a Form (Figure 2-7) n Queries –From more than one relations, generate one relation that satisfies given conditions 1. SQL(Structured Query Language): Data access language (CH 9) 2. QBE(Query By Example): (Figure 2-8) 3. QBF(Query By Form): user types query constraints on a data entry form and press search button

18 CH2. Introduction to DB Development n Reports –Formatted display of database data (Figure 2-10) –MS Access report definition (Figure 2-11) n Menus –used to organize the application components so as to make them more accessible to the end user and to provide control over the user’s activities –create menu suitable for the purposes of users n Application Programs –written in a language that is specific to the DBMS or in a standard language that interfaces with the DBMS –Ex.: Access Basic (Figure 2-14)

19 CH2. Introduction to DB Development DB Development Processes n General Strategies –Top-down: Entity-Relation Approach proceeds from the general to the specific Study strategic goal, means, information requirements, systems → construct abstract data model High-level Data Model → Lower-Level Data Model → Databases and Applications –Bottom-up: Semantic-Object Approach proceeds from the specific to the general a particular system is selected → obtain statements of requirements → build data model → design and implement database

20 CH2. Introduction to DB Development n Data Modeling –Interviewing users → Documenting requirements → Building the data model and prototypes –Data Modeling as Inferencing User may not be able to describe exactly what model is reverse-engineer: shadows → original shapes (Art) –Modeling in Multi-User Systems many users may envision many different data models DB becomes the logical union of the pieces of the work- group’s or organization’s model → developer must document that logical union –Confusion about the Term Model Requirement data model or User’s data model Entity-Relationship model and Semantic Object data model (Tools)


Download ppt "Introduction to Database Development CH2. CH2. Introduction to DB Development Database n Components of Database Systems (Figure 2-1) –User data –Metadata."

Similar presentations


Ads by Google