Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Microsoft SQL Server wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Ingres (database) wikipedia , lookup
Functional Database Model wikipedia , lookup
Clusterpoint wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
PHPMyAdmin PHPMyAdmin is a web interface to a MySQL database http://gamma.lasalle.edu/phpmyadmin/ Choose a database Create a table Enter field/property/attributes for Person table The password and username probably belong in another table – for security reasons 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 Result of save SQL code for creating the table Return to database level by clicking on database name Start next table 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. Subject table If you had the notion of a prerequisite, the Subject table would have a relationship with itself. Session table 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. 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. ??? Adding a field Adding Attended field Bool turned into tinyint Insert some data: select table and click Insert tab Enter Location data Result of inserting data – shows SQL for the insert Enter Subject data Entering Session data Other way to enter date Enter Person data Enter PersonAttendsSession data SQL with NULL data