목록Computer Science/Databases (6)
Code&Data Insights
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/6VrcK/btr0Iv6FiWS/9nEUSAdKznVlRckFuh0eL1/img.png)
Schemas and Instances - Databases instance: the current content of the DB - Databases schema: the structure of the data(relations/classes) -> Relation(table) is as a set or tuple! What is the meaning of Data Independence?? : the ability to modify definition of schema at one level with little or no effect on the schema at a high level - Logical data independence: adding new fields to a record or ..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/dba38I/btr0GbgJZBB/vfKr4OXTy61Wk22lLHOLAk/img.png)
What is a Database? : a collection (Not a random pile of data) of data that exists over a long period time. DBMS : a complex software package developed to store and manage databases è Mysql, mongoDB, … è Provide convenient, efficient, and secure access and manipulation of large amounts of data è Controls access to shared data from multiple, simultaneous users with properties Atomicity, Consisten..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/mawdw/btrZIfEZLuZ/h0EKMUTiD8dnV30mcQqia1/img.png)
5. Give details of employees who worked in at least two different facilities. Details include employee’s first-name, last-name, start date, end date, facility name, role (nurse, doctor, etc.), Medicare card number, telephone-number, and email address. Results should be displayed sorted in ascending order by first name, then by last name, then by start date. QUERY) SELECT e.firstName, e.lastName..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/oGDjP/btrYwn9V1YR/KIwKWPS9C7dhH6okkCLLgk/img.png)
Inner Join : selects records that have matching values in both tables. => intersection of two tables SELECT column_name(s) FROM table1 INNER JOIN table2 ON table1.column_name = table2.column_name; Left Join SELECT column_name(s) FROM table1 LEFT JOIN table2 ON table1.column_name = table2.column_name; Right Join SELECT column_name(s) FROM table1 RIGHT JOIN table2 ..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/2RMla/btrXVSqgaXW/kgtb8J1we3S0DyCKF1rZzK/img.png)
What is a NULL Value? : NULL value is a filed with no value. NULL is not value, it's just a place holder ** Therefore, we can't compare between NULL values! Null is unknown, so they can't be same ! null != null Can we test for NULL? : Yes, it's possible to test for using IS NULL & IS NOT NULL NULL Value with Groung and Aggregating : Nulls are counted when grouping, but ig..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bb9Wk8/btrXWJzx7jW/4uokClKC4sglhkpei5fXM0/img.png)
Databases : an organized collection of data that exists over a long period of time ( Persistent storage ) - collection of data about different kinds of individuals(Entities) and the relationship between individuals. DBMS ( Database Management System ) : a complex software package developed to store and mange databases - supports convenient, efficient, and secure access and manipulation of large ..