BMIS 289: Spring 2002 Gonzaga College.

Uploaded on:
Category: Food / Beverages
BMIS 289: Spring 2002 Gonzaga College Class # 09 Prologue to Databases and ASP Plan Program 7 Database Fundamentals MS Information Access Model Prologue To MS Access ADO Object Model Essential ADO and ASP Sample Program 8 Review Program 7 This system was a content document processor:
Slide 1

BMIS 289: Spring 2002 Gonzaga University Class # 09 Introduction to Databases & ASP

Slide 2

Agenda Program 7 Database Basics MS Data Access Model Introduction To MS Access ADO Object Model Basic ADO & ASP Example Program 8 Overview BMIS 289: Spring 2002

Slide 3

Program 7 This system was a content document processor: Individual dat documents are utilized to info representative records. Configuration of dat records: <name>,<job title>,<hire date>,<salary> User chooses dat document by scanning from HTML record selector: NOTE: on account of this system we are accepting the client of this project is searching off the server, generally the ASP code can\'t read the dat file’s substance. BMIS 289: Spring 2002

Slide 4

Program 7 Once we have a way to a dat record we can start handling it. We utilize the TextStream item to peruse the substance of the dat record: The ReadLine system for the TextStream article gives back an individual line from a content document as a string. We then need to parse out the individual information in every string. BMIS 289: Spring 2002

Slide 5

Program 7 Parsing data out of a string: We know the string\'s organization (i.e., there are 4 bits of data in every line delimited by commas). The most straightforward approach to get at every component of data is to utilize the Split capacity. The Split capacity takes a string and delimiter as contentions. It gives back an exhibit containing every individual component in the string, in light of the delimiter. BMIS 289: Spring 2002

Slide 6

Program 7 Computing number of days worker has been with the organization: One of the bits of data in the dat document records (individual lines of data) is the date the representative was procured. A different ASP document was given to you that has one capacity in it: DateDiffDays. This ASP document must be “included” in project 7’s handling page keeping in mind the end goal to get to that capacity. BMIS 289: Spring 2002

Slide 7

Program 7 The principle handling circle will perform these strides: ReadLine from TextStream. Parse data out of line utilizing Split into a cluster. Yield representative data. Figure number of days representative has been with organization utilizing DateDiffDays. Increase worker counter. BMIS 289: Spring 2002

Slide 8

Intro To Databases The database is a crucial data administration idea. A database is simply a gathering of related data (like a table or a rundown). Almost every significant program ever composed uses a database of some structure or another, it is that basic. Databases let us, as software engineers, make, get to, and control huge accumulations of data in a speedy and productive way. BMIS 289: Spring 2002

Slide 9

Intro To Databases Cont. From the essential database idea the thought of a social database was produced. A social database is “set of formally-depicted tables from which information can be gotten to or reassembled in a wide range of courses without needing to redesign the database tables.” The Structured Query Language (SQL) is utilized to get to and control social databases. A standout amongst the most prevalent social database administration frameworks out there is Microsoft Access , which we will use in this class. BMIS 289: Spring 2002

Slide 10

Why Use Databases? Simply, databases assist us with arranging bits of data. Databases pull together incidental bits of information and power people to compose it into some significant relationship. For software engineers, they give proficient, helpful access to organized accumulations of information. BMIS 289: Spring 2002

Slide 11

Databases In Web Applications E-Commerce: Products Customers Logins Intranets Time sheets Expense reports Sales data Misc Music accumulations Wedding visitor records Personal funds BMIS 289: Spring 2002

Slide 12

Basic Database Elements Tables Records Fields Keys BMIS 289: Spring 2002

Slide 13

Table A table is an individual gathering of data inside of a database. Every table ought to speak to a solitary thought, protest, or thing. For instance, a “Employee” table ought exclude data about the company’s quarterly income. A database is comprised of one or more tables. BMIS 289: Spring 2002

Slide 14

Record Think of a record as a solitary column in a table . In the event that you are an understudy at Gonzaga then you have one record in the Students table of the GU database. Generally as a table has numerous records, a record has numerous bits of data connected with it. Those bits of record data are fields. BMIS 289: Spring 2002

Slide 15

Field Each individual bit of data in a record is one field. In the event that a record is viewed as a line, then a field is a section, or, in every example of a record, a cell. Each record contains one example of every field. A field is characterized by its name and its information sort. For instance, a client name field may be called “Uname” and have a string information sort. In code, Fields are synonymous with variables. BMIS 289: Spring 2002

Slide 16

Pulling It All Together Table Record Field BMIS 289: Spring 2002

Slide 17

Keys One issue we have with databases is in what manner would we be able to separate between records? For instance, there may be more than one representative in a given organization named John Smith. The answer is to utilize Keys. A key is some kind of distinguishing proof number/string that is special to a specific record. A key that particularly distinguishes a record is known as an essential key . No two records may have the same essential key inside of a given table . BMIS 289: Spring 2002

Slide 18

Foreign Keys sometimes, essential keys of one table can be utilized as a part of different tables to connection information between records (a.k.a., make connections among information). For instance, an e-trade site may have a Customer and Purchase table. Clients and Purchases are interestingly distinguished by means of essential keys called CustID and PurchID separately. The Purchase table would contain a CustID field that would just acknowledge values from the Customer table. In this way the field Purchase.CustID would permit us to follow an individual buy back to a specific client. BMIS 289: Spring 2002

Slide 19

Illustrating Foreign Keys Link with a Product table BMIS 289: Spring 2002

Slide 20

Microsoft Data Access Model Microsoft is an advocate of an innovation it calls Universal Data Access (UDA) UDA is a typical method for getting to information put away in different configurations, as Microsoft Access, Oracle, and even Microsoft Word. Microsoft calls these heterogeneous information sources “ information stores .” The pleasant thing about the UDA idea is it permits us to get to a wide exhibit of information stores utilizing a solitary programming interface. So the code to bring a record from Oracle dwelling on Unix is (generally) the same as it is for Microsoft Access running on Windows 98. BMIS 289: Spring 2002

Slide 21

Microsoft Data Access Model ODBC Open Database Connectivity A before Microsoft endeavor at UDA, it dealt with a wide range of database bundles yet that was it. Application ODBC Oracle SQL Server Access BMIS 289: Spring 2002

Slide 22

Microsoft Data Access Model OLE-DB Microsoft’s next endeavor at UDA. It is a lower level interface that gives access to more than just databases (i.e., information stores) It is speedier and more effective than ODBC. Application OLE-DB ODBC Oracle Access Excel MS Exchange ODBC Data BMIS 289: Spring 2002

Slide 23

Microsoft Data Access Model Data Provider versus Information Consumer Microsoft considers information access as far as suppliers and purchasers. Information Provider Something that gives information To sample, OLE-DB And in OLE-DB there are different suppliers for particular information store frameworks. Information Consumer Something that uses information For instance, ASP pages BMIS 289: Spring 2002

Slide 24

Microsoft Data Access Model ADO ActiveX Data Objects ADO is an application programming interface between an information purchaser and OLE-DB (the supplier) It has an arrangement of articles which embody a few regular moves we can make on databases. ASP & ADO are not the same Many individuals tend to consider ASP & ADO as one and the same. They are most certainly not. ADO is a different innovation that can be utilized as a part of ASP. It can likewise be utilized as a part of Visual Basic or a C++ windows application, to give some examples. BMIS 289: Spring 2002

Slide 25

Microsoft Data Access Model MDAC Microsoft Data Access Components (MDAC) ADO is a piece of the MDAC, which is Microsoft’s free suite of information access parts for utilization by software engineers. You can get the most recent variants at (and our class site) NOTE: the most current form (as of this class) of MDAC is 2.7. At the season of your books composing it was 2.5. BMIS 289: Spring 2002

Slide 26

Database Software As we have specified, there are different programming bundles accessible that give social database usefulness. There are four noteworthy database bundles we will quickly inspect: Microsoft Access Microsoft SQL Server Oracle MySQL BMIS 289: Spring 2002

Slide 27

Microsoft Access is what is known as a desktop database . It is intended to be easy to use and keep running on individual customer machines, instead of go about as a backend on a server. It has numerous components for making the making of custom inquiries, reports, and even applications based upon its information simple. Access can act like a backend database however it truly was not intended to be one. BMIS 289: Spring 2002

Slide 28

Microsoft SQL Server An intense database framework that is intended to keep running as a backend database on a server. SQL server can hold a great deal of information and has various components that make it all the more speedier, strong, and secure than Microsoft Access. It is more costly than Microsoft Access and not as simple to utilize or keep up. For vast applications that have numerous clients SQL Server is more suitable than Access. BMIS 289: Spring 2002

Slide 29

Oracle was one of the first “enterprise strength” social

View more...