Basics of Internet and Databases Internet global system

Basics of Internet and Databases

Internet • global system of interconnected computer networks • It is a network of networks that consists of private, public, academic, business, and government networks of local to global scope, linked by a broad array of electronic, wireless, and optical networking technologies

WWW • an information space where documents and other web resources are identified by Uniform Resource Locators (URLs), interlinked by hypertext links, and can be accessed via the Internet

Internet Vs WWW • The Internet is a global system of interconnected computer networks. In contrast, the World Wide Web is a global collection of documents and other resources, linked by hyperlinks and URLs

• Hypertext-Machine readable text that is not sequential but is organized so that related items of information are connected • Web page-The hypertext document connected to the World Wide Web • Website-Set of related web pages • Home page -Index page • Browser -is a software application for retrieving, presenting and traversing information resources on the World Wide Web. • URL -is a string of characters used to identify a resource • Internet Service Provider(ISP) - an organization that provides services accessing and using the Internet. • Web Server-The primary function of web server is to store, process and deliver web pages to clients

Getting Connected to the Internet

Internet Applications Email File Transfer Protocol(FTP) Telnet-Putty Internet Relay chat-Chatrooms-m. IRC, Leafchat Instant Messaging-fb messenger, Yahoo Messenger • Internet Telephony • Video conferencing • E-Commerce • • •

Data Over the Internet • • • Static component Dynamic component Scripts supports dynamism Server side scripting-Perl, Python, etc Client side scripting-Javascript, VB script, etc XML-e. Xtensible Markup Language

Internet tools • • Web browser Email Search engines Messengers

Database Fundamentals

• May 1940 -World War II- Dunkirk –Christopher Nolan-2017 - the battle- Germany –British and French - between- evacuated from the beach. Soldiers- end of the mission- 330, 000 - safely evacuated.

Data Vs Information -set of isolated and unrelated raw data. -can be anything such as number, person’s name, images, sounds, and so on Information - Processed Data -can be defined as a set of organized and validated collection of data Knowledge - act of understanding the context - learning through information

Database • Can be defined as a collection of related data in an organized way • The organized information serves as a base from which the desired information can be retrieved, conclusions can be drawn, decisions can be made. • An organized body of related information

Database terms • Field/Column- represents one related part of a table. • Record/Row- Collection of multiple related fields for a particular entry • Table- Collection of logically related multiple records • Data type – determines the type of data that can be stored in a column.

Logical data • Abstract or conceptual model of a databased on the requirements • It represents various pieces of data and their relationships at a very high level of abstraction • Mainly focuses on what data are required and how it should be organized rather than what operations are to be performed on the data. • Can be represented using Entity-Relationship model (E-R model)

E-R model • E-R model views the real world as a set of basic objects (Entities), their characteristics (Attributes), and the associations among these objects (Relationships). • The entities, attributes and relationships are the basic constructs of E-R model

• Entity – is an object that has an independent existence in the real world. • Attribute- properties of an entity that characterize and describe it. I • Relationship- is an association, dependency or link between two or more entities. – One – to –One relationship – One – to- Many relationship – Many- to- Many relationship


Physical Data • Refers the physical organization of the records of a file for better storage and retrieval. – Sequential files E. g Audio cassette – Direct Files E. g CD – Indexed sequential files E. g Book index

Database Management Systems • Database a collection of well organized data. • The software which helps to organize data is called DBMS • The main goal is to provide an environment that is friendly and efficient to retrieve and store information. • (i. e) DBMS eases the maintenance and retrieval of information from a database.

File based Vs DBMS Enterprise: Application System A Application System B Application Program A Application Program B File System A Customer File System B Invoice File System N Inventory … Application System N Application Program N

Customer No. Customer Name Customer Addr. Social Security ID Inventory Part No. Part Description Unit Price Supplier Quantities Remain Quantities Ordered Invoice Customer No. Customer Name Part No. Quantities Unit Price Parts Part No. Part Description Supplier Quantities Ordered Customer Name Unit Price

Drawbacks of using file systems to store data • • Data redundancy and inconsistency – Multiple file formats, duplication of information in different files Difficulty in accessing data – Need to write a new program to carry out each new task Data isolation – Multiple files and formats Integrity problems – Integrity constraints (e. g. , account balance > 0) become “buried” in program code rather than being stated explicitly – Hard to add new constraints or change existing ones

Drawbacks of using file systems to store data (Cont. ) • • • Atomicity of updates – Failures may leave database in an inconsistent state with partial updates carried out – Example: Transfer of funds from one account to another should either complete or not happen at all Concurrent access by multiple users – Concurrent access needed for performance – Uncontrolled concurrent accesses can lead to inconsistencies • Example: Two people reading a balance (say 100) and updating it by withdrawing money (say 50 each) at the same time Security problems – Hard to provide user access to some, but not all, data Database systems offer solutions to all the above problems

• Database Management System (DBMS) DBMS contains information about a particular enterprise – Collection of interrelated data – Set of programs to access the data – An environment that is both convenient and efficient to use

What is a Database System? DBMS Application program End-user 1 -26

Benefits of DBMS • Reduction in Data redundancy and inconsistency • Data sharing • Improvement in Data security • Data integrity • Efficient • Enforcement of standards. (Conventions )

Students Corner • • Database administrator-DBA Database languages DDL Vs DML Data Dictionary

DBMS Architecture • View – In a DBMS, a view is a way of portraying information in the database. – This can be done by arranging the data items in a specific order, by highlighting certain items, or by showing only certain items. – For any database, there a number of possible views that may be specified.

Schema • The database schema of a database system is its structure described in a formal language supported by the DBMS. • The term "schema" refers to the organization of data as a blueprint of how the database is constructed.

• External Level or View level – It is the users' view of the database – This level deals with the way in which individual users view data – Same database can have different views for different users. – For example, one user may view dates in the form (day, month, year), while another may view dates as (year, month, day).

• Conceptual Level or Logical level – The middle level in the three level architecture is the conceptual level. – This level describes what data is stored in the database and the relationships among the data. – The conceptual level represents all entities, their attributes, and their relationships.

• Internal level or Storage level – It is the physical representation of the database on the computer. – This level describes how the data is stored in the database. – The internal level is the one that concerns the way the data are physically stored on the hardware.


Data Independence-Equitas

Logical Data Independence • is a kind of mechanism, which liberalizes itself from actual data stored on the disk. • If we do some changes on table format, it should not change the data residing on the disk.

Physical Data Independence • Physical data independence is the power to change the physical data without impacting the schema or logical data. • For example, in case we want to change or upgrade the storage system itself − suppose we want to replace hard-disks with SSD − it should not have any impact on the logical data or schemas.

Self study • E-R diagram • Database models • Types of databases
- Slides: 38