Monday, 13 April 2015

Databases

Databases

A database is a collection of structured persistent data. An example of a database could be a database that stores your purchased Apple apps. 

There are 3 levels in a database:

Physical Data Level:

The physical data level is how the data is stored physically for example on a hard drive, and how the database files are stored and structured on the hard drive.

Conceptual view:

The conceptual view is how the database is internally managed. For example sql being used to access data on the database.

External view:

The external view is what the typical user will see, for example a search on google is an external view of Googles database, with data sorted and obtained from the physical data using the conceptual view.


  Example Table





Keyterms

Some example key terms are:

Column/Field - This is essentially an attribute of a record. For example an attribute of a "contact" database may be email or phone number.

Data Base Management System (DBMS) - Is the software used to create a database. An example of a GUI DBMS may be Microsoft Access whereas a non-GUI DBMS may be SQLite.

Data Type - Datatype is the type of data stored in a field, an example datatype may be integer or string, more "advanced" data types may be TIME/DATE.

Primary Key - The primary key is essentially the thing that identifys the record.     

SQL

Structured Query Language, is a language that is used, mostly when you are using code to access a database, to write database querys in. An example of an SQL query is: SELECT `email` FROM `contacts` WHERE `contact_name` = 'JohnJoe Stack'.
This would return "email" from a record that has a "contact_name" of "JohnJoe Stack", from a table that is called "contacts".

No comments:

Post a Comment