Skip to content

Commit 1cc0afd

Browse files
authored
Merge pull request #1436 from vegetabill/bill-pr-1396
Revise intro to relational databses
2 parents 65f4bc0 + 60475bd commit 1cc0afd

File tree

1 file changed

+34
-26
lines changed

1 file changed

+34
-26
lines changed

databases/relational-databases.md

+34-26
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ To understand, query, and insert information into a relational database, a techn
5252

5353
- [Khan Academy's introductory SQL, videos](https://www.khanacademy.org/computing/computer-programming/sql/sql-basics/v/welcome-to-sql)
5454
- [four basic SQL operators](https://blog.sqlauthority.com/2008/05/13/sql-server-four-basic-sql-statements-sql-operations/)
55-
- [streaming(cassandra)](https://dzone.com/articles/cassandra-sink-for-spark-structured-streaming)
5655

5756
#### Tools
5857

@@ -61,28 +60,32 @@ To understand, query, and insert information into a relational database, a techn
6160
### Lesson
6261

6362
- [Slides](https://drive.google.com/open?id=1xK7_t_yJcu4RcBkj0Gv-t5uyBCNr0g4cHKqAJSxNwY0) | [Video Walkthrough of Slides](https://drive.google.com/file/d/1V0bk3fH_8PsRE3Vz4J3qe3TTiqBClT6y/view)
64-
6563
- Look through the rest of the links in the Materials Section. [SQL Fiddle](http://sqlfiddle.com) is the tool where you can implement your sql knowledge. Practically implement creating a database schema and perform operations on it using the tool.
6664

67-
#### Relational Database Basics
65+
### Relational Database Basics
6866

6967
- The specific problems a database solves
7068

71-
- Persistence of information
69+
- Storage of information
7270
- Centralized information
7371
- Search stored information
74-
- Form relationships between sets of information
72+
- Form relationships between tables containing information
73+
74+
- [Common column data types](https://www.postgresql.org/docs/8.4/datatype.html#DATATYPE-TABLE)
75+
76+
- `varchar` (Just like **string** available in different programming languages like JS)
77+
- `integer` (For holding Numeric Values)
78+
- `boolean` (For storing true or false)
79+
- `date` (stores the dates only)
80+
81+
#### Primary key
82+
83+
Every table must have a unique primary key, which is ofen a single integer column that increments automatically like a counter, but primary keys can be other types as well.
7584

76-
- Few basic column types
77-
- `varchar`
78-
- `text`
79-
- `integer`
80-
- `primary key`, `auto increment`
81-
- exact type varies depending on database type
8285
- The [four basic SQL operators](https://blog.sqlauthority.com/2008/05/13/sql-server-four-basic-sql-statements-sql-operations/) and their use
8386

8487
- `SELECT`
85-
- The SELECT statement is used to select data from a database.
88+
- The SELECT statement is used to read rows from a database table.
8689
- selecting specific columns: \*, specific columns, AS column aliasing. Below are the syntax for the same.
8790
```sql
8891
SELECT * FROM table_name;
@@ -135,19 +138,7 @@ To understand, query, and insert information into a relational database, a techn
135138
```sql
136139
DELETE FROM table_name WHERE condition;
137140
```
138-
-
139-
_The above examples are from [w3schools.](https://www.w3schools.com/sql/sql_select.asp)_
140-
141-
- Other types of non-relational, non-sql databases that will be encountered
142-
143-
- key-value [(redis)](https://www.shellhacks.com/en/redis-set-get-key-value-redis-cli/)
144-
- Redis is a key-value database (also known as a key-value store) that uses a simple key/value method to store data.
145-
Strings are the simplest data type in Redis and are simple key/value entries.
146-
- graph [(Neo4j)](https://github.com/JNOSQL/artemis-demo/tree/master/artemis-demo-java-se/graph-neo4j)
147-
- Neo4j is a graph database management system developed by Neo4j, Inc. Described by its developers as an ACID-compliant transactional database with native graph storage and processing.
148-
- document [(mongo)](https://docs.mongodb.com/getting-started/cpp/documents/)
149-
- MongoDB is a document database: each record in a MongoDB collection is document. Documents are a structure composed of file and value pairs, similar to JSON objects or other mapping data types.
150-
- [streaming(cassandra)](https://dzone.com/articles/cassandra-sink-for-spark-structured-streaming): Give the read to this article so that you can get idea about cassandra which is another non-sql database. You can even try out the code given in the article later to get complete understanding.
141+
_The above examples are from [w3schools.](https://www.w3schools.com/sql/sql_select.asp)_
151142

152143
### Guided Practice
153144

@@ -162,7 +153,7 @@ To understand, query, and insert information into a relational database, a techn
162153

163154
### Independent Practice
164155

165-
**(IMP: While working on the following activities you can refer back to the prerequisites at any point of time for better understanding.)**
156+
**(IMPORTANT: While working on the following activities you can refer back to the prerequisites at any point of time for better understanding.)**
166157

167158
**Activity #1**
168159

@@ -203,6 +194,23 @@ Solve the quizzes mentioned below
203194
- How does SELECT command work?
204195
- How do you model data for relational databases?
205196
197+
### Common Mistakes & Misconceptions
198+
199+
- The term "database" can mean a collection of tables, a running database application like Postgres, or a physical/virtual machine running the application . You have to consider the context for better understanding.
200+
201+
### Resources for Non-Relational Databases (OPTIONAL)
202+
203+
Different types of [non-relational databases](https://medium.com/@mark.rethana/introduction-to-nosql-databases-c5b43f3ca1cc) (non-sql databases):
204+
205+
- key-value [(redis)](https://www.shellhacks.com/en/redis-set-get-key-value-redis-cli/)
206+
- Redis is a key-value database (also known as a key-value store) that uses a simple key/value method to store data.
207+
Strings are the simplest data type in Redis and are simple key/value entries.
208+
- graph [(Neo4j)](https://github.com/JNOSQL/artemis-demo/tree/master/artemis-demo-java-se/graph-neo4j)
209+
- Neo4j is a graph database management system developed by Neo4j, Inc. Described by its developers as an ACID-compliant transactional database with native graph storage and processing.
210+
- document [(mongo)](https://docs.mongodb.com/getting-started/cpp/documents/)
211+
- MongoDB is a document database: each record in a MongoDB collection is document. Documents are a structure composed of file and value pairs, similar to JSON objects or other mapping data types.
212+
- [streaming(cassandra)](https://dzone.com/articles/cassandra-sink-for-spark-structured-streaming): Give the read to this article so that you can get idea about cassandra which is another non-sql database. You can even try out the code given in the article later to get complete understanding.
213+
206214
### Supplemental Resources
207215
208216
- [Medium: Omar El Gabry's Tutorials on Databases, Modeling, Design Process, & Normalization](https://medium.com/omarelgabrys-blog/database-introduction-part-1-4844fada1fb0)

0 commit comments

Comments
 (0)