Pair Work:
Choose as a pair (or you may work individually) one of the following websites to analyse:
http://www.ebay.com.au/
http://au.linkedin.com/
Try creating an account if you need to for either Ebay or LinkedIn
http://www.ebay.com.au/
http://au.linkedin.com/
Try creating an account if you need to for either Ebay or LinkedIn
- Think of 2-3 reasons why this organisation acquires data and supplies data via a website.
- Why would individuals (such as customers or members) supply data via this website?
- List a range of techniques that the organisation uses on this website to acquire data.
- List ways the organisation uses to protect the rights of the websites data providers (customers, members).
- Can you think of any ways to protect the rights of the websites data providers (customers, members), that the website has not used.
The structure of a table is as below:
- Field – One column of a Table common to all the records
- Record – One row of a Table containing all data about a particular entry
- Table – One set of related data
MAMP
MAMP provides a local server environment.
The video below is useful for installing MAMP and if you get any errors while installing.
We will use this to create a database through myPHP admin.
The video below is useful for installing MAMP and if you get any errors while installing.
We will use this to create a database through myPHP admin.
1. Once you have installed MAMP - it's important that your Servers are checked green.
Then click on Open Start Page.
Then click on Open Start Page.
2. Select Databases and enter a name for it, such as below. Then click on create.
3. Now its time to define our data (just like we did in a Data Dictionary!).
4. Once you have set up how your table will look at the different types of data it will hold. You will need to add this data.
Click on the Insert option to start entering in data. Enter this data in the Value section.
Click on the Insert option to start entering in data. Enter this data in the Value section.
Summary:
Answer the following questions:
- What is a Primary Key or Unique Identifier? What is the purpose?
- What are the different Data Types that can be used?
Saving and Opening existing Tables and Databases.
Saving - You will use the Export option, which will save your work as a .sql file.
Opening - Create a new Database first, then once you have named the database, select the Import option. This will open .sql files.
Opening - Create a new Database first, then once you have named the database, select the Import option. This will open .sql files.
Relational Database Management System (DBMS) vs Flatfile Database (Non-Relational)
Non-relational databases are exactly like what you were using at the start of the term with Excel. This is called a Flatfile too.
Even though you can have multiple tables in a flatfile, you cannot link or create a relationship between them.
Relational Database Management Systems
Have relationships or links between the data in different tables.
Let's work on an example together, before we look at how to do this in myphpadmin.
Consider the many different tables you would have in a school database:
What might they be?
Now consider which data in which tables might link together.
Even though you can have multiple tables in a flatfile, you cannot link or create a relationship between them.
Relational Database Management Systems
Have relationships or links between the data in different tables.
Let's work on an example together, before we look at how to do this in myphpadmin.
Consider the many different tables you would have in a school database:
What might they be?
Now consider which data in which tables might link together.
Primary Key vs Foreign Key
Take the example below:
subjectID is a primary key or a unique identifier as it uniquely identifies a record.
sstudentID is a foreign key - this means that it will link to the primary key in the other table, creating the relationship. It is foreign as it is more unique to the other table this this Subject table.
sstudentID is a foreign key - this means that it will link to the primary key in the other table, creating the relationship. It is foreign as it is more unique to the other table this this Subject table.
5 simple steps to creating a relationship... between tables.
SAC Folio
See handout.