37 Pages

Cprogramming_tutorial

Course: CNT 4007, Spring 2012
School: University of Florida
Rating:
 
 
 
 
 

Word Count: 2020

Document Preview

Whatmechanismsareavailablefora programmerwhowritesnetworkapplications? SocketProgramminginC CNT4007C,CISEdept. UniversityofFlorida (SlidesAdaptedon JrnAltmannsSlides) QuestionsthatwillbeAddressed Howtowriteanetworkapplicationthatsends packetsbetweenhosts(clientandserver) acrossanIPnetwork? Answer:socketAPI Client CNT4007C IPNetwork Server 2 SocketProgramming TableofContents...

Register Now

Unformatted Document Excerpt

Coursehero >> Florida >> University of Florida >> CNT 4007

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Whatmechanismsareavailablefora programmerwhowritesnetworkapplications? SocketProgramminginC CNT4007C,CISEdept. UniversityofFlorida (SlidesAdaptedon JrnAltmannsSlides) QuestionsthatwillbeAddressed Howtowriteanetworkapplicationthatsends packetsbetweenhosts(clientandserver) acrossanIPnetwork? Answer:socketAPI Client CNT4007C IPNetwork Server 2 SocketProgramming TableofContents NetworkApplicationProgrammingInterface: SocketsandInternetSockets NetworkProgrammingTips ClientServerArchitecture Example:ClientProgramming Example:ServerProgramming NetworkProgrammersMistakes CNT4007C 3 LayersoftheIPProtocolSuite ApplicationLayer TransportLayer NetworkLayer LinkLayer CNT4007C e.g.ftp e.g.TCP,UDP e.g.IP Ethernet ApplicationLayer TransportLayer NetworkLayer LinkLayer 4 ProtocolSuiteLocation InternetProtocolLayer ApplicationLayer TransportLayer(TCP,UDP) Location Applications (e.g.browser,game,ftp) ApplicationProgramming Interface(API) (e.g.networkAPI) OperatingSystem (e.g.Unix) NetworkLayer(IP) InterfacetotheNetworkCard LinkLayer CNT4007C NetworkCard& DeviceDriver (e.g.Ethernetcard) 5 NetworkAPI OperatingsystemprovidesApplicationProgramming Interface(API)fornetworkapplication APIisdefinedbyasetoffunctiontypes,data structures,andconstants Desirablecharacteristicsofthenetworkinterface Simpletouse Flexible independentfromanyapplication allowsprogramtouseallfunctionalityofthenetwork Standardized allowsprogrammertolearnonce,writeanywhere ApplicationProgrammingInterfacefornetworksis calledsocket CNT4007C 6 Sockets Socketsprovidemechanismstocommunicate betweencomputersacrossanetwork Therearedifferentkindofsockets DARPAInternetaddresses(InternetSockets) Unixinterprocesscommunication(UnixSockets) CCITTX.25addresses andmanyothers BerkeleysocketsisthemostpopularInternetSocket runsonLinux,FreeBSD,OSX,Windows fedbythepopularityofTCP/IP CNT4007C 7 InternetSockets Supportstreamanddatagrampackets(e.g.TCP,UDP, IP) IsSimilartoUNIXfileI/OAPI(providesafiledescriptor) BasedonC,singlethreadmodel doesnotrequiremultiplethreads CNT4007C 8 TypesofInternetSockets Differenttypesofsocketsimplementdifferent communicationtypes(streamvs.datagram) Typeofsocket:streamsocket connectionoriented twowaycommunication reliable(errorfree),inorderdelivery canusetheTransmissionControlProtocol(TCP) e.g.telnet,ssh,http Typeofsocket:datagramsocket connectionless,doesnotmaintainanopen connection,eachpacketisindependent canusetheUserDatagramProtocol(UDP) e.g.IPtelephony CNT4007C 9 Othertypesexist:similartotheoneabove NetworkProgrammingTips ByteOrdering Naming Addressing CNT4007C 10 ByteOrderingofIntegers DifferentCPUarchitectureshavedifferentbyte ordering memory address A +1 memory address A Storedatlittleendiancomputer high-order byte Integerrepresentation(2byte) D3 F2 low-order byte high-order byte Storedatbigendiancomputer CNT4007C low-order byte 11 ByteOrderingProblem Question:Whatwouldhappeniftwocomputers withdifferentintegerbyteorderingcommunicate? Answer: Nothingiftheydonotexchangeintegers! But:Iftheyexchangeintegers,theywouldgetthe wrongorderofbytes,therefore,thewrongvalue! Example: 48454C4C6F0100 CNT4007C Messageis:[Hello,512] Messageissent acrossNetwork MessageinMemoryof ofbigendianComputer Processing MessageinMemoryof littleendianComputer Processing Messageis:[Hello,1] 48454C4C6F0100 12 ByteOrderingSolution Therearetwosolutionsifcomputerswithdifferentbyte orderingsystemwanttocommunicate Theymustknowthekindofarchitectureofthesending computer (badsolution,ithasnotbeenimplemented) Introductionofanetworkbyteorder.Thefunctionsare: uint16_t uint32_t uint16_t uint32_t htons(uint16_t htonl(uint32_t ntohs(uint16_t ntohs(uint32_t host16bitvalue) host32bitvalue) net16bitvalue) net32bitvalue) Note:useforallintegers(shortandlong),which aresentacrossthenetwork IncludingportnumbersandIPaddresses CNT4007C 13 NetworkProgrammingTips ByteOrdering Naming Addressing CNT4007C 14 NamingandAddressing Hostname identifiesasinglehost(seeDomainNameSystem slides) variablelengthstring(e.g.www.berkeley.edu) ismappedtooneormoreIPaddresses IPAddress writtenasdottedoctets(e.g.10.0.0.1) 32bits.Notanumber!Butoftenneedstobe convertedtoa32bittouse. Portnumber identifiesaprocessonahost 16bitnumber CNT4007C 15 ClientServerArchitecture response Client Server request Clientrequestsservicefromserver Serverrespondswithsendingserviceor errormessagetoclient CNT4007C 16 SimpleClientServerExample Client socket() connect() send() recv() close() CNT4007C response request Connection establishment Server socket() bind() listen() accept() Datarequest recv() Dataresponse send() Endoffilenotification recv() close() 17 Example:ClientProgramming Createstreamsocket(socket()) Connecttoserver(connect()) Whilestillconnected: sendmessagetoserver(send()) receive(recv())datafromserverand processit CloseTCPconnectionandSocket (close()) CNT4007C 18 socket():InitializingSocket Gettingthefiledescriptor int chat_sock; if ((chat_sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { perror("socket"); printf("Failed to create socket\n"); abort (); } 1.parameterspecifiesprotocol/addressfamily 2.parameterspecifiesthesockettype Otherpossibilities:SOCK_DGRAM 3.parameterspecifiestheprotocol. 0meansprotocolischosenbytheOS. CNT4007C 19 IPAddressDataStructure struct sockaddr_in { short int unsigned short int struct in_addr unsigned char }; sin_family; //Ad d re s s fa m ily sin_port; //P o rtnum b e r sin_addr; //Inte rn e ta d d re s s sin_zero[8]; struct in_addr { unsigned long }; s_addr; //4 b yte s Paddingofsin_zeros:struct sockaddr_in hassamesizeasstruct sockaddr CNT4007C 20 connect():MakingTCP ConnectiontoServer struct sockaddr_in sin; struct hostent *host = gethostbyname (argv[1]); unsigned int server_address = *(unsigned long *) host->h_addr_list[0]; unsigned short server_port = atoi (argv[2]); memset (&sin, 0, sizeof (sin)); sin.sin_family = AF_INET; sin.sin_addr.s_addr = server_address; sin.sin_port = htons (server_port); if (connect(chat_sock, (struct sockaddr *) &sin, sizeof (sin) ) < 0) { perror("connect"); printf("Cannot connect to server\n"); abort(); } CNT4007C 21 send():SendingPackets int send_packets(char *buffer, int buffer_len) { sent_bytes = send(chat_sock, buffer, buffer_len, 0); if (send_bytes < 0) { perror (send"); } return 0; } Needssocketdescriptor, Buffercontainingthemessage,and Lengthofthemessage Canalsousewrite() CNT4007C 22 ReceivingPackets: SeparatingDatainaStream Fixed length record A 0 receive buffer B 1 2 C 3 4 5 D 6 7 8 9 slidethrough length record Fixed Userecords(datastructures)to partitionthedatastream CNT4007C 23 ReceivingPackets int receive_packets(char *buffer, int buffer_len, int *bytes_read) { int left = buffer_len - *bytes_read; received = recv(chat_sock, buffer + *bytes_read, left, 0); if (received < 0) { buffer_len buffer perror (recv"); } if (received <= 0) { return close_connection(); } *bytes_read *bytes_read += received; while (*bytes_read > RECORD_LEN) { process_packet(buffer, RECORD_LEN); *bytes_read -= RECORD_LEN; memmove(buffer, buffer + RECORD_LEN, *bytes_read); } return 0; } CNT4007C Canalsouseread() 24 ServerProgramming:Simple Createstreamsocket(socket()) Bindporttosocket(bind()) Listenfornewclient(listen()) While acceptuserconnectionandcreateanew socket(accept()) dataarrivesfromclient(recv()) datahastobesendtoclient(send()) CNT4007C 25 bind():AssignIPandPort struct sockaddr_in sin; struct hostent *host = gethostbyname (argv[1]); unsigned int server_address = *(unsigned long *) host->h_addr_list[0]; unsigned short server_port = atoi (argv[2]); memset (&sin, 0, sizeof (sin)); sin.sin_family = AF_INET; sin.sin_addr.s_addr = server_address; sin.sin_port = htons (server_port); if (bind(chat_sock, (struct sockaddr *) &sin, sizeof (sin) ) < 0) { perror("bind"); printf("Cannot bind server application to network\n"); abort(); } CNT4007C 26 bind(): bind()tellstheOStoassignalocalIPaddress andlocalportnumbertothesocket. ManyapplicationslettheOSchooseanIP address. UsewildcardINADDR_ANYaslocaladdressinthiscase. Atserver,userprocessmustcallbind()to assignaport Atclient,bind()isnotrequiredsinceOSmay assignavailableportandIPaddress Theserverwillgettheportnumberoftheclientthroughthe UDP/TCPpacketheader Note:Eachapplicationisrepresentedbya Cserverportnumber NT4007C 27 listen():WaitforConnections int listen(int sockfd, int backlog); Putssocketinalisteningstate,willingto handleincomingTCPconnectionrequest. Backlog:numberofTCPconnectionsthatcan bequeuedatthesocket. CNT4007C 28 ServerExample #include<stdio.h> #include<string.h> #include<unistd.h> #include<pthread.h> #include<arpa/inet.h> #include<sys/types.h> #include<sys/socket.h> #define MYPORT 3490 // the port users will be connecting to #define BACKLOG 10 // how many pending connections queue will hold int main(void) { int sockfd, new_fd; // listen on sockfd, new connection on new_fd struct sockaddr_in my_addr; // my address information struct sockaddr_in their_addr; // connector's address information int sin_size; if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) { exit(1); } perror("socket"); my_addr.sin_family = AF_INET; // host byte order my_addr.sin_port = htons(MYPORT); // short, network byte order my_addr.sin_addr.s_addr = INADDR_ANY; // auto. filled with local IP memset(&(my_addr.sin_zero), '\0', 8); // zero the rest of the struct CNT4007C 29 if (bind(sockfd, (struct sockaddr *)&my_addr, sizeof(struct sockaddr)) == -1) { perror("bind"); exit(1); } if (listen(sockfd, BACKLOG) == -1) { perror("listen"); exit(1); } while(1) { // main accept() loop sin_size = sizeof(struct sockaddr_in); if ((new_fd = accept(sockfd, (struct sockaddr *)&their_addr, &sin_size)) == -1) { perror("accept"); continue; } printf("server: got connection from %s\n", inet_ntoa(their_addr.sin_addr)); if (send(new_fd, "Hello, world!\n", 14, 0) == -1) perror("send"); close(new_fd); } return 0; } CNT4007C 30 ClientExample #include<stdio.h> #include<stdlib.h> #include<string.h> #include<unistd.h> #include<arpa/inet.h> #include<sys/types.h> #include<sys/socket.h> #include<netinet/in.h> #include<netdb.h> #define PORT 3490 #define MAXDATASIZE 100 int main(int argc, char *argv[]) { int sockfd, numbytes; char buf[MAXDATASIZE]; struct hostent *he; struct sockaddr_in their_addr; // the port client will be connecting to // max number of bytes we can get // at once // server's address information if (argc != 2) { fprintf(stderr,"usage: client hostname\n"); exit(1); } if ((he=gethostbyname(argv[1])) == NULL) { // get the host info perror("gethostbyname"); exit(1); } if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) { perror("socket"); exit(1); } CNT4007C 31 their_addr.sin_family = AF_INET; // host byte order their_addr.sin_port = htons(PORT); // short, network byte order their_addr.sin_addr = *(struct in_addr *)*he->h_addr_list; // already network byte order memset(&(their_addr.sin_zero), '\0', 8); // zero the rest of the struct if (connect(sockfd, (struct sockaddr *)&their_addr, sizeof(struct sockaddr)) == -1){ perror("connect"); exit(1); } if ((numbytes=recv(sockfd, buf, MAXDATASIZE-1, 0)) == -1) { perror("recv"); exit(1); } buf[numbytes] = '\0'; printf("Received: %s",buf); close(sockfd); return 0; } CNT4007C 32 NetworkProgrammers Mistakes byteordering separatingrecordsinstreams useofselect() misinterpretingtheprojectspecification notknowingallavailablesystemcalls CNT4007C 33 TherearemoreSystemCalls Dependsoncommunicationtype Datagramsocketsuserecvfrom()andsendto() forreceivingandsendingdata Closingconnection:close(),shutdown() Convenientfunctions(onUNIX) inet_aton,inet_ntoa inet_pton,inet_ntop CNT4007C 34 Compile&Run Compile Server $sand>gccoserverserver.clnsllsocketlpthread Client $rain>gccoclientclient.clnsllsocket Run Server $sand>./server Client $rain>./clientsand.cise.ufl.edu CNT4007C 35 Literature short tutorial: Beej's Guide to Network Programming http://www.ecst.csuchico.edu/~beej/guide/net/ http://beej.us/guide/bgnet/ UnixNetworkProgramming,volumes1and 2byW.RichardStevens.Publishedby PrenticeHall;ISBNsforvolumes1and2: 013490012X,0130810819. AdvancedProgrammingintheUnix EnvironmentbyW.RichardStevens. PublishedbyAddisonWesley.ISBN 0201563177. manpagesonaUnixcomputer CNT4007C 36 JavaReferences JavaSocketProgrammingTutorials Textbook p159~p177 http://perleybrook.umfk.maine.edu/slides/spring %202004/cos420/Socket_Programming.ppt http://www.cs.rpi.edu/academics/courses/netprog/ c09.html http://www.cs.odu.edu/~cs476/SocketProgrammin g/java/java.htm http://zerioh.tripod.com/ressources/sockets.html CNT4007C 37
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

University of Florida - CNT - 4007
CNT 4007 Computer Network Fundamentals, Spring 2012Assignment 1given byJonathan C.L. LiuOut: Feb. 01 (Wed.), 2012Due: Beginning of the lecture on Feb. 08 (Wed.), 2012 The problem sets form an important part of the learning in this course. Thus youa
University of Florida - CNT - 4007
CNT 4007 Computer Network Fundamentals, Spring 2012Assignment 2given byJonathan C.L. LiuOut: Feb. 22 (Wednesday), 2012Due: Beginning of the lecture on Feb. 29 (Wednesday), 2012 The problem sets form an important part of the learning in this course.
University of Florida - CNT - 4007
CNT 4007 Computer Network Fundamentals, Spring 2012Assignment 3given byJonathan C.L. LiuOut: Mar. 30 (Friday), 2012Due: Beginning of the lecture on Apr. 06 (Friday), 2012 The problem sets form an important part of the learning in this course. Thus y
University of Florida - CNT - 4007
Homework #1 SolutionProblem 1: List six access technologies. Classify each one as residential access,company access, or mobile access.Solution:1. Residential access: dial-up modem, DSL, fiber-coaxial cable.2. Company access: LAN (Ethernet)3. Wireles
University of Florida - CNT - 4007
Homework #2 solutionProblem 1Consider an HTTP client that wants to retrieve a Web document at a given URL. The IP address of theHTTP server is initially unknown. What transport- and application-layer protocols besides HTTP areneeded in this scenario?
University of Florida - CNT - 4007
Homework #3 solutionProblem 1When a TCP receiver receives a segment that is not expected, it will send an duplicate ACK of previoussuccessful segment. Since the sender often sends a large number of segments back to back, if onesegment is lost, there w
University of Florida - CNT - 4007
Midterm Exam solutionProblem 1(a) DNS (domain name system) is an application layer protocol that provides directory service totranslate hostnames to IP addresses. It is a distributed database implemented in a hierarchy of DNSservers, and it allows hos
University of Florida - CNT - 4007
CNT4007C Computer Network Fundamentals, Spring 2012Programming Assignment 1- Yi Wang: yiwan@cise.ufl.eduDate assigned: Friday, Feb 10, 2012Date due:Friday, Feb 24, 2012 (3:00 pm EST)NO LATE submission will be accepted for grading!How to submit: Ema
University of Florida - CNT - 4007
CNT4007C Computer Network Fundamentals, Spring 2012Programming Assignment 2- Yi Wang: yiwan@cise.ufl.eduDate assigned: Friday, March 16, 2012Date due:Monday, March 26, 2012 (3:00 pm EST)NO LATE submission will be accepted for grading!How to submit:
University of Florida - CNT - 4007
CNT4007C Computer Network Fundamentals, Spring 2012Programming Assignment 3- Yi Wang: yiwan@cise.ufl.eduDate assigned: Wed. April 11, 2012Date due:Wed. April 25, 2012 (3:00 pm EST)NO LATE submission will be accepted for grading!How to submit: Email
University of Florida - CNT - 4007
CNT 4007 Computer Networks- Chapter 4 : Network LayerJonathanC.L.Liu,Ph.D.DepartmentofComputer,InformationScienceandEngineering(CISE),UniversityofFloridaIP datagram formatIPprotocolversionnumberheaderlength(bytes)typeofdatamaxnumberremainingh
University of Florida - CNT - 4007
CNT 4007 Computer Network Fundamentals, Spring 2012Sample Questions for Midterm Examgiven byJonathan C.L. Liu This sample set provides you an opportunity to practice the midterm exam. There will be no key solutions for these sample questions. There
University of Florida - MAC - 2313
CHAPTER 11Vectors and the Space GeometryOur space may be viewed as a collection of points. Every geometrical gure, such as a sphere, plane, or line, is a special subset of points inspace. The main purpose of an algebraic description of various objects
University of Florida - MAC - 2313
Concepts in Calculus IIIBeta VersionUNIVERSITY PRESS OF FLORIDAFlorida A&amp;M University, TallahasseeFlorida Atlantic University, Boca RatonFlorida Gulf Coast University, Ft. MyersFlorida International University, MiamiFlorida State University, Tallah
University of Florida - MAC - 2313
MAC 2313 HW Problems Part 2Section 91A. p. 173 (1)-(9)B. Assume that z = f (x, y ) is implicitly dened by the function:arctan(xyz ) + x2 + y 2 = xz + yzUse the Implicit Function Theorem to ndzxandz.yC. Supposew = x2 + y 2 , x = 2st, y = s2 t2
University of Florida - MAC - 2313
MAC 2313 HW Problems Part 2 AnswersSection 91A. p.173 (1) dz = dt11+x2 +2y 26xt2 +2yt(2) z = ex (y cos(xy ) sin(xy ) t + xex cos(xy ) s2s+t2 ;sz= ex (y cos(xy ) sin(xy ) s + xex cos(xy ) s2t+t2tzzz(4) u = 23, v = 32, and w = 39(5) Note:
University of Florida - MAC - 2313
MAC 2313 HW Problems Part 3Section 102A. p. 268 (1), (4), (6), (7) oddSection 103A. p. 280 (1) i, iv, v, viii, (2), (4) iSection 105A. p. 299 (1)Section 104A. p. 291 (1) (ii, iii), (2), (3) (i, iii, iv), (4), (5), (6) odd, (7), (8), (9)1
University of Florida - MAC - 2313
MAC 2313 HW Problems Answers Part 3Section 102A. (1) (i) 11, (ii) e2r , (iii) (u2 + v 2 )(4) (i) D = cfw_(x, y ) | 0 x 1, 0 y 1 x2 , (ii) D = cfw_(x, y ) | 0 x y, 0 y 1,(iii) D = cfw_(x, y ) | 1 x 1, 1 y 1(6) (i) 192, (ii) / 3, (iv) 7 (e1 e1/2 )3(7
University of Florida - MAC - 2313
MAC 2313 Section 3122SyllabusSpring 2012Instructor: Jo Ann LeeOffice: LIT 417Phone: (352) 392-0281 ext 307Email: joann5@ufl.eduWebsite: www.math.ufl.edu/~joann5Class time: Class meets MWRF 6th period (12:50-1:40 pm) in LIT 223Office Hours: (tenta
University of Florida - EMA - 4760
Biomechanics of the Normaland Arthritic Knee ImplantDesignDesignProfessorGaryJ.Miller,Ph.D.UniversityofFloridaandExactech,Inc.Gainesville,Fl.USAGoal of the Presentation: Briefly describe the normal kneesbiomechanical functions as related tomotio
University of Florida - COP - 5725
Database Management Systems (COP 5725)Spring 2012Instructor:Dr. Markus SchneiderTA:Nam NguyenExam 1 SolutionsName:UFID:Email Address:Pledge (Must be signed according to UF Honor Code)On my honor, I have neither given nor received unauthorized a
University of Florida - COP - 5725
Database Management Systems (COP 5725)(Spring 2012)InstructorDr. Markus SchneiderTANam NguyenExam 2SolutionsName:UFID:Email Address:Pledge (Must be signed according to UF Honor Code)On my honor, I have neither given nor received unauthorized a
University of Florida - COP - 5725
Database Management Systems (COP 5725)(Spring 2012)Instructor: Dr. Markus SchneiderTA: Nam NguyenHomework 2 SolutionsNameUFIDEmail AddressPledge (Must be signed according to UF Honor Code)On my honor, I have neither given nor received unauthorize
University of Florida - COP - 5725
Database Management Systems (COP 5725)(Spring 2012)Instructor: Dr. Markus SchneiderTA: Nam NguyenHomework 3NameUF IdEmail AddressPledge (Must be signed according to UF Honor Code)On my honor, I have neither given nor received unauthorized aid in
University of Florida - COP - 5725
Database Management Systems (COP 5725)(Spring 2012)Instructor: Dr. Markus SchneiderTA: Nam NguyenHomework 3 SolutionsNameUF IdEmail AddressPledge (Must be signed according to UF Honor Code)On my honor, I have neither given nor received unauthoriz
University of Florida - COP - 5725
Database Management Systems (COP 5725)(Spring 2012)Instructor: Dr. Markus SchneiderTA: Nam NguyenHomework 4NameUF IdEmail AddressPledge (Must be signed according to UF Honor Code)On my honor, I have neither given nor received unauthorized aid in
University of Florida - COP - 5725
Database Management Systems (COP 5725)(Spring 2012)Instructor: Dr. Markus SchneiderTA: Nam NguyenHomework 4 SolutionsNameUF IdEmail AddressPledge (Must be signed according to UF Honor Code)On my honor, I have neither given nor received unauthoriz
University of Florida - COP - 5725
Database Management Systems (COP 5725)(Spring 2012)Instructor:Dr. Markus SchneiderTA:Nam NguyenHomework 5Name:UFID:Email Address:Pledge (Must be signed according to UF Honor Code)On my honor, I have neither given nor received unauthorized aid i
University of Florida - COP - 5725
What you should have learned after this lecture . what aggregation functions are grouping in SQLdistinction between upper and lower caseString patterns in SQL are expressed with the aid of the like operator.example: Find all students with names Meier
University of Florida - COP - 5725
What you should have learned after this lecture . sorting in SQL what nested queries are how different kinds of joins can be explicitly expressedexamples (relation lectures extended by the attribute hpw (hours per week) Determine the number of hours
University of Florida - COP - 5725
What you should have learned after this lecture . how to determine whether a given FD is contained in the closure of a set of FDs what a canonical cover of a set of functional dependencies is how a canonical cover is computedContainment of a FD in a c
University of Florida - COP - 5725
What you should have learned after this lecture . what normalization means and how it is done what the benefits and the drawbacks of the normalization process are what the normal forms aredependency preservation goal: All FDs that hold for schema R a
University of Florida - COP - 5725
What you should have learned after this lecture .what the normal forms are The following anomalies can occur:+ insertion anomaly: What do we do with students who do not attend a lecture?+ update anomaly: If a student reaches the next semester, we must
University of Florida - COP - 5725
What you should have learned after this lecture .what the normal forms arefundamentals of database application programmingstep 1: computation of a canonical cover (precomputed) FD 1:cfw_pers-id cfw_name, rank, room, city, street, state FD 2:cfw_roo
University of Florida - COP - 5725
What you should have learned after this lecture .fundamentals of database application programmingPL/SQLexample:/ Creation of a new object of class StatementStatement stmt = con.createStatement();/ Translation of the query and creation of a new objec
University of Florida - COP - 5725
What you should have learned after this lecture . PL/SQL what data integrity means how integrity constraints are expressed in SQL PL/SQL also supports the definition of recordstype person_type is record (name varchar(50), salary int);variable declar
University of Florida - COP - 5725
What you should have learned after this lecture . How integrity constraints are expressed in QBE Why (purely) relational database systems are not sufficient any more What object-relational database systems (ORDBS) are What the benefits of ORDBS are9.
University of Florida - COP - 5725
What you should have learned after this lecture . further concepts of object-relational database systems (ORDBS) what query processing isinsert into company values(XYZ, array[Mall Avenue, Sales Street, Sellers Drive]);Alternatively:insert into compa
University of Florida - COP - 5725
What you should have learned after this lecture .how algebraic optimization is done10.2 Phases of translation/optimizationgoal: syntactical and semantical analysis of the querygiven: query in a relational query language, e.g. SQLstep 1: translation o
University of Florida - COP - 5725
What you should have learned after this lecture .how algebraic optimization is donerule 8: permutation of a selection with a join or a cross product, if it only usesattributes of one of the two operand relations. cfw_ , : F(R1 R2) = F(R1) R2(attr(F)
University of Florida - COP - 5725
10.4 Physical Optimization(We here deal only with some few aspects. This theme is especially a topic of a courseImplementation of Database Systems.)Introduction The physical algebra operators realize/implement the logical operators. A logicaloperator
University of Florida - COP - 3530
cop3530sp12Parameter passingcall by value- appropriate for small objects that should not be altered by the functioncall by constant reference- appropriate for large objects that should not bealtered by the functioncall by reference -appropriate for a
University of Florida - COP - 3530
COP 3530Data Structures &amp; AlgorithmsDiscussion Session 3OutlineInput-output streams in C+Floating point precisionFile manipulationPointers in CVector class in C+Strings in C and C+About meEyup Serdar Ayazayaz@cise.ufl.eduTA Office: E309This
University of Florida - COP - 3530
Copyright 2003 Pearson Education, Inc.Slide 1Chapter 11Strings and VectorsCreated by David Mann, North Idaho CollegeCopyright 2003 Pearson Education, Inc.Slide 2OverviewAn Array Type for Strings (11.1)The Standard string class (11.2)Vectors(11.3
University of Florida - EEL - 4712
University of Florida - EEL - 4712
University of Florida - EEL - 4712
EEL 4712Midterm 2 Spring 2011VERSION 1Name:UFID:Sign your name here if you would like for your test to be returned in class:_IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read it with areasonable effort, it is assumed wron
University of Florida - EEL - 4712
EEL4712Name: Midterm1Spring2012VERSION1UFID: IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read it with areasonable effort, it is assumed wrong. As always, the best answer gets the most points.COVERSHEET:Problem#: Points
University of Florida - EEL - 4712
EEL4712Name: Midterm2Spring2012VERSION1UFID: Signyournamehereifyouwouldlikeforyourtesttobereturnedinclass:_IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read it with areasonable effort, it is assumed wrong. As always, the
University of Florida - EEL - 4712
University of Florida - EEL - 3396
Book sections to be covered in EEL 3396 Spring 2012 during (tentatively):Week 1: Ch 1 superficially, 2.3W2: 2.5 ,3.1.allW3: 3.2. all except 3.2.5W4: 3.3 allW5: 3.4 all, 3.5W6: 4.1, 4.2, 4.3W7: 4.4, except 4.4.5W8: 5.1 superficially, 5.2, 5.3W9: 5
University of Florida - EEL - 3396
Home work assignments in preparation for the weekly Wednesday 10 minute quizzes.Note that you can only work the quiz problem successfully if you have studied theseassignments. Quizzes will be closed book, no notes. Physical constants will be given.The
University of Florida - EEL - 3396
Home work assignments in preparation for the weekly Wednesday 10 minute quizzes.Note that you can only work the quiz problem successfully if you have studied theseassignments. Quizzes will be closed book, no notes. Physical constants will be given.Brin
University of Florida - EEL - 3396
Home work assignments in preparation for the weekly Wednesday 10 minute quizzes.Note that you can only work the quiz problem successfully if you have studied theseassignments. Quizzes will be closed book, no notes. Physical constants will be given.Brin
University of Florida - EEL - 3396
Course Number and TitleEEE 3396- Solid State Electron Devices1. Catalog Description (3 hrs) Introduction to the principles of semiconductorelectron device operation.2. Pre-requisites and Co-requisites EEL 3111 - Circuits I3. Course Objectives: To pre
University of Florida - EEL - 3396
University of Florida - EEL - 3396
University of Florida - EEL - 3396
University of Florida - EEL - 3396
University of Florida - EEL - 3396
University of Florida - EEL - 3396