You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: databases/relational-databases.md
+24-18Lines changed: 24 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -65,22 +65,27 @@ To understand, query, and insert information into a relational database, a techn
65
65
### Relational Database Basics
66
66
67
67
- The specific problems a database solves
68
+
68
69
- Storage of information
69
70
- Centralized information
70
71
- Search stored information
71
72
- Form relationships between tables containing information
72
-
73
-
-[Few basic column data types](https://www.w3schools.com/sql/sql_datatypes.asp)
73
+
74
+
-[Common column data types](https://www.postgresql.org/docs/8.4/datatype.html#DATATYPE-TABLE)
75
+
74
76
-`varchar` (Just like **string** available in different programming languages like JS)
75
-
-`int` (For holding Numeric Values)
76
-
-`boolean or bool` (For storing true, false or null)
77
+
-`integer` (For holding Numeric Values)
78
+
-`boolean` (For storing trueor false)
77
79
-`date` (stores the dates only)
78
-
-`primary key`
79
-
- exact type varies depending on database type
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.
84
+
80
85
- The [four basic SQL operators](https://blog.sqlauthority.com/2008/05/13/sql-server-four-basic-sql-statements-sql-operations/) and their use
81
86
82
87
-`SELECT`
83
-
- The SELECT statement is used to select/retrieve data from a database.
88
+
- The SELECT statement is used to read rows from a database table.
84
89
- selecting specific columns: \*, specific columns, AS column aliasing. Below are the syntax for the same.
85
90
```sql
86
91
SELECT*FROM table_name;
@@ -133,7 +138,7 @@ To understand, query, and insert information into a relational database, a techn
133
138
```sql
134
139
DELETE FROM table_name WHERE condition;
135
140
```
136
-
_The above examples are from [w3schools.](https://www.w3schools.com/sql/sql_select.asp)_
141
+
_The above examples are from [w3schools.](https://www.w3schools.com/sql/sql_select.asp)_
137
142
138
143
### Guided Practice
139
144
@@ -191,19 +196,20 @@ Solve the quizzes mentioned below
191
196
192
197
### Common Mistakes & Misconceptions
193
198
194
-
- A database can be referred to as a table or collection of tables, a database server, or SQL. You have to consider the context for better understanding.
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.
195
200
196
201
### Resources for Non-Relational Databases (OPTIONAL)
197
202
198
-
- Different types of [non-relational databases](https://medium.com/@mark.rethana/introduction-to-nosql-databases-c5b43f3ca1cc) (non-sql databases):
- 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.
- 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.
206
-
- [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.
203
+
Different types of [non-relational databases](https://medium.com/@mark.rethana/introduction-to-nosql-databases-c5b43f3ca1cc) (non-sql databases):
- 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.
- 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.
0 commit comments