Download presentation
Presentation is loading. Please wait.
1
PHPMyAdmin
2
PHPMyAdmin is a web interface to a MySQL database
3
Choose a database
4
Create a table
5
Enter field/property/attributes for Person table
The password and username probably belong in another table – for security reasons
6
A few terms VARCHAR – a string of characters (letters, numbers, etc.) with a length up to some limit Length – maximum number of characters allowed in field “not null” – you must have an entry to have a proper record Primary key – field that uniquely identifies each record Unique – the field value cannot be repeated for any other record
7
Result of save SQL code for creating the table
8
Return to database level by clicking on database name
9
Start next table
10
Location table Questions: Should the contact person be a relationship to the Person table? If Contact Person for Location is a many-to-many relationship, we might need another table.
11
Subject table If you had the notion of a prerequisite, the Subject table would have a relationship with itself.
12
Session table
13
Relationships in phpmyadmin
Indicating that the values in the field of one table (such as Session’s LocationID) match values from another table (such as Location) is called enforcing referential integrity. Whether one can enforce referential integrity or not in phpmyadmin depends on how it was configured.
14
PersonAttendsSession table
Might add field for registration order -- and offer prizes to the first 10 people who register. Might add a field to designate if the person actually attended. ???
15
Adding a field
16
Adding Attended field
17
Bool turned into tinyint
18
Insert some data: select table and click Insert tab
19
Enter Location data
20
Result of inserting data – shows SQL for the insert
21
Enter Subject data
22
Entering Session data
23
Other way to enter date
24
Enter Person data
25
Enter PersonAttendsSession data
26
SQL with NULL data
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.