Presentation is loading. Please wait.

Presentation is loading. Please wait.

MS Office & Internet I Database Concepts Part 01 & 02.

Similar presentations


Presentation on theme: "MS Office & Internet I Database Concepts Part 01 & 02."— Presentation transcript:

1 MS Office & Internet I Database Concepts Part 01 & 02

2 The Database Environment The Database Environment consists of all the parts and pieces that makeup a database system

3 The Database Environment DUNSHA DData UUsers NNetwork SSoftware HHardware AAdministration

4 What is a Database? A Database is a: Collection of Related Data for A Known Group of Users that meet Specific Requirements and Models or Represents the Real World

5 Database Structures Relational TypeObject TypeMS Access Type RelationTable TupleRowRecord AttributeColumnField Primary Key Foreign Key

6 Relation Rules No Duplicate rows in a Table No order of Rows No order of Columns

7 Relationships Defines how Tables are related to each other in the database

8 Relationships Relationships are created by using a Foreign Key

9 Relationships Primary Key Must be UNIQUE Is MANDATORY Is UNCHANGING Is CONTROLLED BY IT DEPT

10 Relationships Foreign Key (FK) Is the Primary Key (PK) of the parent table

11 Relationships Rules: No Part of the Primary Key can be NULL (We call this enforcing Entity Integrity) NULL = Nothing (It is not Zero (0) it is nothing)

12 Relationships Rules: A Foreign Key can be NULL It must be a PK in the related table (We call this enforcing Referential Integrity)

13 Database Model Represents Reality Has Relations (Tables) that: Equals one Entity Type per Table Each Row represents only one occurrence of the Entity Each occurrence (Row) is Unique

14 Database Model A Primary Key and Foreign Key may be Composite Keys Made up of more than one Column (Attribute)

15 Example Table (w/Data) ANAMEAFAMILYWEIGHT CandiceCamel1800 ZonaZebra900 SamSnake5 ElmerElephant5000 LeonardLion1200 Primary Key (Underlined) Relation (Table) Attributes (Columns) Tuples (Rows)

16 Example Relationship MIDMNAMEMADDRANAME 171N. Harrison1400 Blush RdZona 144J. Montagano1108 5 th AveLeonard 194J. Spence1244 Lark LnCandice 303E. Wingate5222 Gains DrCandice 101H. Yarchun177 Beach Rd 270K. Steeg140 Crystal DrZona 291S. Ackerman1172 Park DrSam 301K. Snyder196 279 th Ave ANAMEAFAMILYWEIGHT CandiceCamel1800 ZonaZebra900 SamSnake5 ElmerElephant5000 LeonardLion1200 Animal Foreign Key (Circled) Zoo-Member

17 MS Access MS Access is a Personal or Small Business Relational Database It is limited in scope but powerful for its intended purpose

18 Microsoft SQL Server This is the Enterprise or Large Business Relational Database which is very powerful and complete in scope

19 ORACLE Database This is the Enterprise or Large Business Relational Database which is very powerful and complete in scope Taught at Rio in courses: IT 20303 DBMS Concepts IT 20803 Database Communications IT 21003 Database Administration Can lead to Oracle Certification (OCA) or the URG Database Technology Certificate

20 MS Access We will build a database in Class using MS Access utilizing all of the parts and pieces: Tables Rows Columns PK’s FK’s

21 Questions End Part 01

22 Entity-Relationship Diagrams Logical Database Design What is a Data Model? A way to represent reality A schematic of data items and relationships A “blueprint” for the database

23 Entity-Relationship Diagrams The Entity-Relationship Approach Represents reality using well-defined graphics and rules Basic building blocks are: “things” (entities) and relationships Member Animal M 1 Adopts

24 Relational Database Theory Entity-Relationship Model: Basic Concepts –Entity Thing, Object, Concept of interest to the enterprise Each occurrence can be uniquely identified

25 Relational Database Theory Entity-Relationship Model: Basic Concepts –Attribute Property of an entity Column

26 Relational Database Theory Entity-Relationship Model: Basic Concepts –Relationship Association between two (or more) entities

27 Relational Database Theory Entity-Relationship Model: Basic Concepts –Entity Identifier Attribute(s) whose value uniquely identifies an entity Primary Key

28 Relational Database Theory What is an Entity? –Physical entity types Person Building Machine Book Usually Singular

29 Relational Database Theory What is an Entity? –Conceptual entity types Contract Account Order Course

30 Relational Database Theory What is an Entity? –Event entity types Transaction Shipment Reservation Phone Call Seminar Offering

31 Relational Database Theory Entity-Relationship Model: Diagrams –Example: –Soft Rectangle represents entities Noun Singular –Connecting Line represents relationships Verb Member Animal Adopts

32 Relational Database Theory Relationships have Characteristics –A relationship has Cardinality (Degree) One-to-OneOne-to-Many Many-to-Many

33 Relational Database Theory Each entity’s participation is Mandatory or Optional Cardinality & Optionality are based on business rules Mandatory Optional

34 Relational Database Theory One:One Relationship –One Member adopts one animal –One Animal is adopted by one member Member Animal Adopts

35 Relational Database Theory One:Many relationship –One member adopts one animal –One animal is adopted by many members Member Animal Adopts

36 Relational Database Theory Many:Many relationship –One member adopts many animals –One animal is adopted by many members Member Animal Adopts

37 Relational Database Theory Optionality: Participation in a Relationship Zoo Employee Animal Cares for

38 Relational Database Theory Mandatory –Every instance of the entity MUST participate in the relationship –Example: Every animal is cared for by at least one employee

39 Relational Database Theory Optional –An instance of the entity CAN participate in the relationship –Example: Some employees do not take care of animals

40 E-R Diagrams Guidelines to Develop an E-R Diagram –Identify the Major Entities –Identify the Attributes for each entity –Determine the Unique Identifier(s) –Identify the Relationships –Assign Cardinality –Determine Optionality –Resolve M:N Relationships

41 E-R Diagrams Mapping the E-R Diagram to the Relational Database –Each entity becomes a Table –Each attribute becomes a Column –Unique Identifier becomes the PK –Each 1:M becomes a FK on the Many Side

42 E-R Diagrams Practice 01 –A company has ten departments –A company has five divisions –A company has one hundred employees –Each employee must work for one department –Each division has two departments

43 E-R Diagrams Practice 02 –A company has twenty employees –Each employee works for a department –There are two departments in the company

44 E-R Diagrams Practice 03 –A company has three divisions –A company has one manager per division –Each manager is in charge of one committee

45 E-R Diagrams Practice 04 –A company has a sales department with fifteen salespersons –Each salesperson works for the sales department –Each salesperson is supervised by one manager –The managers may not have an salesperson to supervise

46 Questions End Part 02

47 Assignment 04 In-Class Project Develop a Database in MS ACCESS 2003 Choices Are: Music Library Book Library Club or Organization


Download ppt "MS Office & Internet I Database Concepts Part 01 & 02."

Similar presentations


Ads by Google