Docsity

Data Base Introduction and Concepts, Summaries of Data Structures and Algorithms

Toggle sidebar
bg1
CS6400: System Concepts & Design
Data-Intensive vs. Process-Intensive
Data-intensive systems focus on managing large volumes, fast changes, or complex
structures of data.
Process-intensive systems focus on heavy calculations, logic, or rendering where the central
processing unit (CPU) is the main limit.
Key Differences
The Main Challenge:
oData-intensive: Storing, moving, searching, and organizing information. The limits are
disk speed, network traffic, and memory size. Expectation to build in the class
oProcess-intensive: Running complex math or logic. The limit is CPU or graphics card
(GPU) power.
Real-World Examples:
oData-intensive: Search engines, social media feeds, data warehouses, and fraud
detection tools.
oProcess-intensive: 3D video game rendering, weather forecasting simulations, and
video encoding. Not doing this in the course
How They Scale:
oData-intensive: Add databases, use caching systems, split data across machines
(sharding), or copy data (replication).
oProcess-intensive: Upgrade to a stronger processor (CPU/GPU) or add more
processing cores.
Data base management Systems
Good for “Data intensive systems”
Data intensive apps
Persistent Storage of Data
Centralized Control of data
Control of redundancy
Control of Consistency and Integrity
Multiple user support
Sharing of Data
Data documentation
Data independence
Control of access and security
Back up and Recovery
Not to use Database management Systems
When:
The HW investment its too expensive
Level of security not needed
No data independence needed
No concurrency
No multiuser needed.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f

Partial preview of the text

Download Data Base Introduction and Concepts and more Summaries Data Structures and Algorithms in PDF only on Docsity!

CS6400: System Concepts & Design Data-Intensive vs. Process-IntensiveData-intensive systems focus on managing large volumes, fast changes, or complex structures of data.  Process-intensive systems focus on heavy calculations, logic, or rendering where the central processing unit (CPU) is the main limit. Key DifferencesThe Main Challenge: o Data-intensive: Storing, moving, searching, and organizing information. The limits are disk speed, network traffic, and memory size.  Expectation to build in the class o Process-intensive: Running complex math or logic. The limit is CPU or graphics card (GPU) power.  Real-World Examples: o Data-intensive: Search engines, social media feeds, data warehouses, and fraud detection tools. o Process-intensive: 3D video game rendering, weather forecasting simulations, and video encoding.  Not doing this in the courseHow They Scale: o Data-intensive: Add databases, use caching systems, split data across machines (sharding), or copy data (replication). o Process-intensive: Upgrade to a stronger processor (CPU/GPU) or add more processing cores. Data base management Systems Good for “Data intensive systems”  Data intensive apps  Persistent Storage of Data  Centralized Control of data  Control of redundancy  Control of Consistency and Integrity  Multiple user support  Sharing of Data  Data documentation  Data independence  Control of access and security  Back up and Recovery Not to use Database management Systems When:  The HW investment its too expensive  Level of security not needed  No data independence needed  No concurrency  No multiuser needed.

Major Topics for the program 6400:

  • Data Modeling
  • Process Modeling
  • Data efficiency  Complex Data Modeling Teacher Concept: The Model represents a perception of structures of reality

AI Concept: Data Modeling Captures and represents the structures of reality  Use if Professor

definition is not clear

The Data modeling process is: STEP1: To fix a perception of reality (real world) structures and represent this perception. → By using Extended entity relationship (EER) model STEP2: Represent (Map/Implement) this perception. → By using the relational Model In the Data Modeling process, we select aspects of reality that are important to us( while ignoring others ) , and we use abstraction to organized these aspects. Process Modeling

AI Concept: The Process modeling captures how processes interact with Reality.  Use if Professor

definition is not clear

Teacher Module: The “ process modeling ” Aim to fix and represent the perception of Processes of reality  Processes are not represented (not stored) inside the database (rather they are reflected [executed] in the way we use the database through the database management system)

- Relational Model  We will use to implement that model (the design), in a database management system (DBMS) - Hierarchical Model  First model used in the first database system in 1967 by IBM IMS (fundamental as of today on XML data bases). Relational model – Data structures Varchar (variable character length). The number of columns its also calling the degree of the table. The table name, column name and data types, represent the schema of the table The schema represents aspects of the data that are stable over time, in other words the schema is not expected to change.

The “state” of the database, represented by the rows in the table reflect aspects that are dynamic and change overtime. Relational model – Constraints Constraints express rules that cannot be expressed by the data structures alone: Examples from the table above:

  • Email’s must be unique (the user once and unique)
  • Emails are not allowed to be NULL
  • Birthday must be after 1900-01-
  • Hometown must be cities in the US Notice how all this points do not express the constraints in the data structure alone Data Model – Operations Operations support change and retrieval of data Insert into Regularuser ([email protected], 1992-10-22, Atlanta,12,500); SQL structure: Select Email, BirthDate from RegularUser where Hometown=’Atlanta’ and Salary>12,000; Keys and Identifiers Keys are uniqueness constraints o Making Email the primary key in RegularUser will force all Emails to be unique in RegularUser Integrity and consistency Integrity: does the database reflect reality well? Consistency: is the database without internal conflicts? A) The example highlights user1 and user4, this users “CurrentCity” says Atlanta but “Address” mentions Roswell.  there is inconsistency between this tow fields. B) The other example is the integrity of the data as an example user4, you cannot tell whether the user is male or female, in the example the user was contacted under the believe that as a “male” the user qualifies for a program, however the user turns out to be a “female”  Bad integrity

For Example: When we want to search for some data we write a query against the schema, and that query will bring back a result of all the data that fits the structure of the schemas that were used to get the query. The separation into a single schema and data however is not the end of it, if the data base only consists of Schema and Data, then the Schema will have to describe aspects of data. The following example (dummy), describes a scenario where instead of just one schema and data, there is an internal schema where the requests are changed into one and then access to retrieve the data and the response is sent back to the application. The benefit of that is that now it makes it possible to change the way data is stored without affecting the application that runs against(towards) the schema. HOWEVER, a Data base its used by many different applications and many different needs to display data. THEREFORE, FOR EACH NEED, we can create an “external schema”, and that is why the ANSI/SPARC 3-Level Architecture , describes a third level named “the external schema” level that separates our aspects on how data is used by DIFFERENT APPLICATIONS.

Three Level Ansi/Sparc database architecture normally depicted: The concept of internal schema focuses in storage data The conceptual schema focuses in meaning of data The internal schema focuses on storage of data AI CONCEPTS (job hunting purpose):External Schema (User Views): Frame this as building customized interfaces and views for different stakeholders. In telecom, field engineers need high-level KPI summaries, while R&D teams require raw, granular protocol traces. Designing external schemas ensures each application or team sees only the structural abstraction relevant to them without altering the underlying data.Conceptual Schema (Enterprise Logic): This is where you translate complex real- world domain requirements into time-invariant Entity-Relationship (ER) models. You

define core entities (e.g., Cell Sites, Radios, Software Builds, Defect Tickets,

Performance Metrics) and enforce integrity constraints regardless of how the

physical data is stored.Internal Schema (Physical Storage & Indexing): Connect this to data ingestion efficiency. The internal schema deals with file organization, indexing strategies (B- Trees, Hash indexes), and storage allocation to ensure high-throughput queries over massive time-series telemetry streams. The Conceptual Schema

  • Describes all conceptually relevant, general, time-invariant structural aspects of reality. (nothing related to data representation, physical organization, access or data use). Example: For the table below as (Regular User Table):

The Internal Schema The internal schema describes how the information in the conceptual schema is physically represented in order to get the overall best ‘query’ performance and update performance on the data base. Conceptual schema (on top) is represented by internal schema table (below),It can be sorted (in any particular way) by last name in this case , and as example let’s say that there are MANY queries on salary , queries will be processed more efficiently if there was an index define on salary ( B+tree for example). B+tree creates logarithmic time access to data and it will be possible to ask queries more efficiently (like mentioned before for conceptual schema based on salary).

(O(log m (N))

O (Big O): A symbol that means "Order of". It indicates the worst-case time complexity, guaranteeing that the search will never take more steps than this formula dictates.log (Logarithm): The mathematical function that represents how the search space is divided at each step.m (Order / Branching Factor): The maximum number of child pointers a single node can hold (the base of the logarithm).N (Total Keys): The total number of records or index entries stored in the tree.

Furthermore, if we would like to have a faster access on “hometown” (for example same color above), and we can create an additional index (not specific B+-Tree) on the database for “hometown”; That index will basically be a table with two columns in it: Hometo wn

PTR

**1) the list of hometowns

  1. pointers to the rows in the data base that contain the particular values of hometown Notice that neither the B-tree base on salary or the index discussed based on hometown aren’t visible by way up, from the applications and because of that, it is possible to replace, to remove, to modify, to add new indexes, without affecting the application that run on the database. Physical Data Independence Physical data independence is a measure of how much the internal schema can change without affecting the applications that run on the external schemas (data base technology allows you to make that separation almost perfectly). Exam gives this opions: What does physical data independence allow you to do? Change the External Schema without changing the Conceptual Schema Change the Application Programs without changing the Internal Schema Change the Internal Schema without changing the Conceptual Schema (went with this) Change the Conceptual Schema without changing the Internal Schema The professor used an analogy of this method saying it is very similar to the idea of oriented programing that supports encapsulation, where the implementation of a class can be changed without affecting the applications that access the class through its methods.**

Database Application Development Methodology – Assumptions This process/methodology will only work for applications that are supported for “Data Bases” It will not work for general software development projects. Further more for the methodology to actually works following assumptions must be true :

  • Business processes are well-designed
  • Documents are known o Input to or output from the applications that run in the DB
  • Tasks are known o processes taking place using the input and generating output document & properly updating the DB in the process
  • System boundary is known
  • One database schema unifying all view can be designed. o If we cannot create a database schema that unifies ALL the views the methodology fails, known challenges are:  Conflict of Interest  Different Goals  Power struggles involved  Politics involved
  • Common questions due to struggles of unifying schema are: o Is there a problem with methodology?

o Problem with the organization? It is always the organization. (organization: entity created to pursue a shared set of goals). Software waterflow Process (from regular computer science)

  • Business design (process re-design)
  • Analysis
  • Specification
  • Design
  • Implementation
  • Testing
  • Operation
  • Maintenance Overview of the Methodology: Data First! For Database application methodology data its always first in general software development methodology process its often first so they will concentrate on laying out the “class” diagrams in just the right way to get the functionality just the right way, and then the data will be hanged under the classes where they fit. In database development it’s data first, and once data its designed just right we will hang the processes on where they fit.

In the example see the doted line as boundary, take as example D1 is an input document to task (T1), may then interact with the database by writing things in the database and reading things from the database. Document D2 its both an input and output document, T1 will read information from D2, will interact with the database , potentially writing in the database and reading from the database and returning information for D2. 2) Specification  Remember Data is first in the specification stage the first part it’s to create an Entity Relationship (ER) diagram or Enhanced ER(EER) diagram, this diagram represents the data; then with the diagram as foundation we can proceed with specifications/definitions of the tasks (via Task forms) or applications that need to run on the database represented by this ER or EER diagram.  Inputs: IFDs and finalized system requirements.  Outputs: ER/EER Diagrams and completed Task Forms.

 5 specific rules of thumb for breaking down Tasks:

 Different enabling conditions  Different frequencies  Avoiding Database lock contention  Managing operation diversity  Tools & Techniques: Conceptual data modeling and the two core specification questions (tracking what goes into and comes out of the database). Clear Note: ER/EER and Tasks are governed by the rules that all stored data must originate from an input document (or future intent) and all outputs must be computable from the database.

What goes into the database?

What comes out of the database? —along with their governing rules

  1. Design  In this stage the focus is to translate the ER/EER diagram to a relational schema, with that in place then we take the tasks that represented what needs to happened in the ER/EER diagram and represent it in abstract code accessing the relational database represented by the schema.  Inputs: ER/EER Diagrams and Task Forms.  Outputs: Normalized Relational Schema (targeting Boyce-Codd Normal Form) and optimized SQL statements/Views.  Tools & Techniques: Normalization algorithms, constraint translation, and view factoring. Clear Note: Relational schema (targeting Boyce-Codd Normal Form) and refines Task Form operations into SQL. Common sub-queries are factored out into Views.

Mapping ER to relational schema, ensuring Boyce-Codd Normal Form (BCNF),

translating constraints into SQL

  1. Implementation  With the relational schema and it’s used for specific implementation in our example case use mySQL to create the relational platform, then with abstract code with embedded SQL and use programming language (like PHP) to present the tasks that need to run in this databes.  Inputs: Relational schema, SQL queries, and application specifications.  Outputs: Physical database, internal schema, and the Logical Access Path (LAP) Schema.  Tools & Techniques: DDL execution, host language embedding (e.g., Java/JDBC), primary file organization tuning, and indexing strategies. Clear Note: Implementation: Creates the physical database via DDL, implements the internal schema, and embeds SQL into a 3rd-generation host language (e.g., Java/JDBC, C++ with embedded SQL).

solved in potentially many types of information being written into the database, the person's information, interests, education information and profession information. But, notice that there will also be information that's read from the database. For example, because the drop down-list for school and the drop-down list for employer needs to be consoled in the database to populate the screen. Let's now see what that looks like from the view profile screen. You see that Michael Bluth now has Sex, BirthDate, Currency, Hometown, and a list of Interests entered. He also has two schools entered one is a college/university, the other one is a high school. He has graduated from both. He also has a job in the tier with a title Assistant to the Regional Manager. As you noticed on the previous screen, to enter a school there was a drop-down menu. Likewise, to enter an employer for a job there was a drop-down menu. A number of administrative users behind the scenes will maintain the list of scores andthe list of employers. The View Profile screen also contains a number of links that will allow you to go to other screens. For example, the view friend screen will show the list of Friends for this particular user. Log Out, of course, will log you out of the system. The View Pending Requests screen, you could see the list of friends' requests that have not yet been accepted or rejected. And the Edit Profile link will send you back to the Edit Profile screen that we looked at previously. Notice that the View Profile screen is not an input to the database, it is an output document from the database where all the information about the user's profile has been read from the database and written onto this output document. There is, of course, control information here that leads you to a different screen, depending on which link you choose.

The search screen is an output document. It returns to search result based on the search criteria. The request new friends screen is an input document to the system. The pending friend request screen for Michael Bluth shows here the people that have requested to be friends with Michael. Michael can then either then push accept or reject for each one of these friends. This is the list of friends with whom he has requested to become friends. So, Michael here, has asked Phylis to be friends. Michael could decide to cancel that request if he wanted to.