From previous lectures & practices / 3.18 – 4.08 /
> PHP features /demo & publish & quiz/ > lectures & practices > 3.18
> PHP-MySQL interface /demo & publish/ > lectures & practices > 3.18
> 3rd Task /simple Database planning/ > lectures&practices > 4.08
Questions from previous tasks /~ for 2nd colloquium /
- PHP and PHP-MySQL junction & interface / source: w3schools /
- What is PHP script? Example?
- What is PHP agent? Example?
- What is $b ? Example?
- How to use the PHP echo Statement?
- What is mysqli_connect(..)? How to use it?
- What is mysqli_query(..) ? How to use?
- etc.
- ER modelling / source: slides /
- What is ER modelling? Why it is important?
- What is ER diagram? Example?
- What is Entity? Examples?
- What is Attribute? Examples?
- What is relation? What types they are?
- Describe 1-1 relationship. Examples?
- What is 1-* ? Example?
- What is *-* ? Example?
- etc.
- About facts finding / source: slides /
- What are DB requirements?
- How DB requirements should be described?
- How facts about DB needs should be found? Examples?
- etc.
For Today > MultiTable Database planning /3rd Task/
- Theme selection /Online Database Project. What Database you would like to create?/
- Requirements /Facts finding; description of DB requirements/
- Requirements analysis
- Objects?
- Attributes?
- Relations? /reasonably/
- 1-1 ?
- 1-* ?
- *-* ?
- Database conceptual model
- Conceptual DB model conversion into relational > see conversion rules (below)
- DB relational model
- Example
- DB theme > Studies.
- DB requirements /description/
- Recently established school needs a database to store study process data. Initially, it was decided to collect the most important data, i.e. data on school students (name, age) as well as data on teachers (name, occupation, length of service). In addition, the proposal has been accepted to include into the database the subjects of study (subject name, number lessons). It is known that the school is located in a small village and has about a hundred learners. Staff is about twenty.
- Let’s create a Database plan.
======================================================================
- Conversion Rules /from conceptual to relational model/
- Objects > turn into Tables
- Object Attributes > turn into Fields of relevant Tables
- Relations between Objects > turn into Relations between Fields of Tables [depending on the type of relation < IMPORTANT]
- 1-1 > this relation in Relational model turns into
- relation between Primary Keys of Tables
- 1-* > this relation turns into Relational model during these two phases
- in * Table additional field (foreign Key) should be created.
- then Relation between Primary and Foreign Keys should be established.
- *-* > this relation turns into Relational model during these two phases
- additional 3rd Table should be created
- foreign keys should be created in this 3rd table
- relations between relevant Primary and Foreign Keys should be created.
- 1-1 > this relation in Relational model turns into