Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cloudacus = LAMP + Appaserver ©Tim Riley Appahost Model.

Similar presentations


Presentation on theme: "Cloudacus = LAMP + Appaserver ©Tim Riley Appahost Model."— Presentation transcript:

1 Cloudacus = LAMP + Appaserver ©Tim Riley Appahost Model

2 Why LAMP? ©Tim Riley Why Linux? Why Apache? Why MySQL? Which Programming Language?

3 What is a structured database? ©Tim Riley Cloudacus = LAMP + Appaserver Appahost Model

4 What is a structured database? Set Name ©Tim Riley Database sets are also known as: * categories * tables * folders * collections

5 What is a structured database? Set Name Attribute 1datatype Attribute 2datatype … Attribute ndatatype Attributes are also known as: * columns * fields * properties ©Tim Riley

6 What is a structured database? Set Name Attribute 1datatype Attribute 2datatype … Attribute ndatatype Examples of datatypes: * Integer number * Floating point (real) number * Date * Time * Line of text * Notepad of text ©Tim Riley

7 Example Set Person full_nametext skin_colortext religiontext height_inchesinteger weight_poundsinteger birth_datedate annual_incomefloat general_characteristsnotepad ©Tim Riley

8 Set Elements Person Full Name Linus Torvalds Guido van Rossum Bill Henry Gates III Sets contain elements ©Tim Riley Elements are also known as: * members * records * rows * tuples

9 Making Subsets Person full_nametext skin_colortext religiontext height_inchesinteger weight_poundsinteger birth_datedate annual_incomefloat general_characteristsnotepad ©Tim Riley

10 Set Relationships ©Tim Riley Set 1Set 2 Verb phrase

11 Set Relationships PersonState Reside in ©Tim Riley

12 Many Set Relationships ©Tim Riley PersonState Reside in School Attend

13 Many Set Relationships PersonState Reside in Born in ©Tim Riley

14 Set Relationship Types Set 1 There are 5 types of set relationships: 1) many-to-one 2) one-to-many 3) many-to-many 4) one-to-one 5) is-a Set 2 Verb phrase ©Tim Riley

15 Many-to-one Relationship Person ”Many persons State Reside in manyone one state.” reside in ©Tim Riley

16 One-to-many Relationship Person Reverse the arrow to reverse the relationship. ”One state has as residents many persons.” State Has resident manyone ©Tim Riley

17 Many-to-many Relationship Person ”One person can visit many states. And one state can have as visitors many persons.” State Visit many ©Tim Riley

18 One-to-one Relationship Office ”One office has one phone.” Phone Has one ©Tim Riley

19 Is-a Relationship Accountant ”An accountant is a person.” Person Is a one ©Tim Riley

20 Enforcing Business Rules Two broad categories of business rule enforcement are: 1) Implementational restrictions (bad) 2) Integrity constraints (good) ©Tim Riley

21 Enforcing Business Rules Implementational restrictions are business rules the information system cannot enforce. PersonState Reside in manyone ©Tim Riley

22 Implementational Restrictions ©Tim Riley PersonState Visit many

23 one many Implementational Restrictions ©Tim Riley PersonState many Person Visit

24 Enforcing Business Rules Integrity constraints are business rules the information system succeeds at enforcing. Two imperative integrity constraints are: 1) Relational integrity 2) Element uniqueness ©Tim Riley

25 Enforcing Business Rules Relational integrity is the constraint that an element in each set must exist in order for a relationship to exist between them. PersonState Reside in manyone A state element can exist without any persons residing in it. A person element can exist without residing in a state. ©Tim Riley

26 Enforcing Business Rules Element uniqueness is the constraint that an element cannot exist more than once in a set. Person full_nametext * Only one person named Bill Henry Gates III can belong to the person set. The set of attributes enforcing uniqueness is called the primary key. ©Tim Riley

27 Element Uniqueness Natural primary key: the set of attributes that naturally enforce uniqueness. Person full_nametext * street_addresstext * Names are likely to be naturally duplicated. If a set has more than one attribute assigned to its primary key, then it's called a multi-attribute primary key. ©Tim Riley

28 Element Uniqueness Primary keys naturally occur. To identify the natural primary key, always consider the four dimensions. Uniqueness can always be naturally identified with: 1) Longitude 2) Latitude 3) Elevation 4) Time All of the organization's places should be categorized. All events need a date/time stamp. ©Tim Riley

29 Foreign key: in a many-to-one relationship, the many table needs to have as attributes the primary key of the one table. Person full_nametext * street_addresstext * statetext State statetext * Reside in manyone Foreign key is the primary key of the one table. Primary key of the one table. ©Tim Riley Element Uniqueness

30 Mutable primary keys: The value of primary keys can change when using Appaserver. Person full_nametext * street_addresstext * ©Tim Riley You can change the person's name if she gets married or change the street address if he moves.

31 Story Telling: Seabed Study ©Tim Riley

32 Cloudacus = LAMP + Appaserver Appahost Model

33 ©Tim Riley Cloudacus = LAMP + Appaserver

34 Appaserver's Database Structure Table table_nametext * Column column_nametext * Is described by many Table is the relational database synonym for set. Column is the relational database synonym for attribute. ©Tim Riley

35 TableColumn Is described by many Appaserver's Database Structure ©Tim Riley

36 Appaserver's Database Structure Folder foldertext * Attribute attributetext * many Appaserver stores tables in the table called ”Folder.” Appaserver stores columns in the table called ”Attribute.” ©Tim Riley

37 one many Appaserver's Database Structure Folder foldertext * Attribute attributetext * Folder_Attribute foldertext * attributetext * ©Tim Riley

38 Appaserver's Database Structure Storing Relationships Person State Reside in School Attend ©Tim Riley

39 Appaserver's Database Structure Storing Relationships Person AccountantTeacher Is a ©Tim Riley

40 Appaserver's Database Structure Storing Relationships Folder Has relationship many ©Tim Riley

41 Appaserver's Database Structure Storing Relationships FolderRelation ©Tim Riley

42 Relational Database Operations ©Tim Riley 1) Select 2) Insert 3) Update 4) Delete

43 Building Non-trivial Databases ©Tim Riley

44 Appaserver's Screen Types ©Tim Riley 1) Insert 2) Lookup 3) Update 4) View 5) Detail

45 Insert Screen ©Tim Riley

46 Insert Screen ©Tim Riley

47 Lookup Screen ©Tim Riley

48 Update Screen ©Tim Riley

49 View Screen ©Tim Riley

50 Detail Screen ©Tim Riley

51 Cloudacus = LAMP + Appaserver Appahost Model

52 ©Tim Riley Cloudacus = LAMP + Appaserver Appahost Model TimRiley@Appahost.com


Download ppt "Cloudacus = LAMP + Appaserver ©Tim Riley Appahost Model."

Similar presentations


Ads by Google